HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
textureCpuData.h
Go to the documentation of this file.
1 //
2 // Copyright 2020 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_IMAGING_HD_ST_TEXTURE_CPU_DATA_H
8 #define PXR_IMAGING_HD_ST_TEXTURE_CPU_DATA_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/imaging/hdSt/api.h"
12 
14 
15 struct HgiTextureDesc;
16 
17 /// \class HdStTextureCpuData
18 ///
19 /// Represents CPU data that can be stored in a HdStUvTextureObject, mostly,
20 /// likely during the load phase to be committed to the GPU.
21 ///
23 public:
24  HDST_API
25  virtual ~HdStTextureCpuData();
26 
27  /// The metadata of the texture (width, height, ...) including a
28  /// pointer to the CPU data (as initialData).
29  virtual const HgiTextureDesc &GetTextureDesc() const = 0;
30 
31  /// Make GPU generate mipmaps. The number of mipmaps is specified
32  /// in the texture descriptor and the mipmaps are generate from
33  /// the mip level 0 data.
34  virtual bool GetGenerateMipmaps() const = 0;
35 
36  /// Are the data valid (e.g., false if file could not be found).
37  virtual bool IsValid() const = 0;
38 };
39 
41 
42 #endif
virtual const HgiTextureDesc & GetTextureDesc() const =0
virtual bool GetGenerateMipmaps() const =0
virtual HDST_API ~HdStTextureCpuData()
virtual bool IsValid() const =0
Are the data valid (e.g., false if file could not be found).
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define HDST_API
Definition: api.h:23
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74