HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
extCompGpuPrimvarBufferSource.h
Go to the documentation of this file.
1 //
2 // Copyright 2018 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_EXT_COMP_GPU_PRIMVAR_BUFFER_SOURCE_H
8 #define PXR_IMAGING_HD_ST_EXT_COMP_GPU_PRIMVAR_BUFFER_SOURCE_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/imaging/hdSt/api.h"
13 #include "pxr/imaging/hd/types.h"
14 
15 #include "pxr/base/tf/token.h"
16 
17 #include "pxr/usd/sdf/path.h"
18 
20 
21 /// \class HdStExtCompGpuPrimvarBufferSource
22 /// A buffer source mapped to an output of an ExtComp CPU computation.
23 ///
25 public:
27  HdTupleType const & valueType,
28  int numElements,
29  SdfPath const& compId);
30 
31  HDST_API
32  virtual ~HdStExtCompGpuPrimvarBufferSource() = default;
33 
34  HDST_API
35  virtual size_t ComputeHash() const override;
36 
37  HDST_API
38  virtual bool Resolve() override;
39 
40  HDST_API
41  virtual TfToken const &GetName() const override;
42 
43  HDST_API
44  virtual size_t GetNumElements() const override;
45 
46  HDST_API
47  virtual HdTupleType GetTupleType() const override;
48 
49  HDST_API
50  virtual void GetBufferSpecs(HdBufferSpecVector *specs) const override;
51 
52 protected:
53  virtual bool _CheckValid() const override;
54 
55 private:
56  TfToken _name;
57  HdTupleType _tupleType;
58  size_t _numElements;
59  SdfPath _compId;
60 
63  const HdStExtCompGpuPrimvarBufferSource &) = delete;
65  const HdStExtCompGpuPrimvarBufferSource &) = delete;
66 };
67 
69 
70 #endif // PXR_IMAGING_HD_ST_EXT_COMP_GPU_PRIMVAR_BUFFER_SOURCE_H
virtual HDST_API bool Resolve() override
virtual HDST_API void GetBufferSpecs(HdBufferSpecVector *specs) const override
virtual bool _CheckValid() const override
Definition: token.h:70
virtual HDST_API TfToken const & GetName() const override
Return the name of this buffer source.
GLuint const GLchar * name
Definition: glcorearb.h:786
Definition: path.h:273
std::vector< struct HdBufferSpec > HdBufferSpecVector
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define HDST_API
Definition: api.h:23
virtual HDST_API ~HdStExtCompGpuPrimvarBufferSource()=default
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
virtual HDST_API size_t ComputeHash() const override
Computes and returns a hash value for the underlying data.
virtual HDST_API HdTupleType GetTupleType() const override
Returns the data type and count (array size) for this buffer source.
virtual HDST_API size_t GetNumElements() const override