HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fallbackLightingShader.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 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_FALLBACK_LIGHTING_SHADER_H
8 #define PXR_IMAGING_HD_ST_FALLBACK_LIGHTING_SHADER_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/imaging/hdSt/api.h"
13 
14 #include <memory>
15 
17 
18 class HioGlslfx;
19 
20 /// \class HdSt_FallbackLightingShader
21 ///
22 /// A shader that provides fallback lighting behavior.
23 ///
25 {
26 public:
27  HDST_API
29  HDST_API
31 
32  // HdStShaderCode overrides
33  HDST_API
34  ID ComputeHash() const override;
35  HDST_API
36  std::string GetSource(TfToken const &shaderStageKey) const override;
37  HDST_API
38  void BindResources(int program,
39  HdSt_ResourceBinder const &binder) override;
40  HDST_API
41  void UnbindResources(int program,
42  HdSt_ResourceBinder const &binder) override;
43  HDST_API
44  void AddBindings(HdStBindingRequestVector *customBindings) override;
45 
46  // HdStLightingShader overrides
47  HDST_API
48  void SetCamera(GfMatrix4d const &worldToViewMatrix,
49  GfMatrix4d const &projectionMatrix) override;
50 
51 private:
52  std::unique_ptr<HioGlslfx> _glslfx;
53 };
54 
55 
57 
58 #endif // PXR_IMAGING_HD_ST_FALLBACK_LIGHTING_SHADER_H
HDST_API void AddBindings(HdStBindingRequestVector *customBindings) override
Add custom bindings (used by codegen)
HDST_API void SetCamera(GfMatrix4d const &worldToViewMatrix, GfMatrix4d const &projectionMatrix) override
Sets camera state.
std::vector< class HdStBindingRequest > HdStBindingRequestVector
Definition: binding.h:23
HDST_API void UnbindResources(int program, HdSt_ResourceBinder const &binder) override
Unbinds shader-specific resources.
Definition: token.h:70
HDST_API ~HdSt_FallbackLightingShader() override
HDST_API ID ComputeHash() const override
HDST_API void BindResources(int program, HdSt_ResourceBinder const &binder) override
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
HDST_API HdSt_FallbackLightingShader()
HDST_API std::string GetSource(TfToken const &shaderStageKey) const override
GLbitfield GLuint program
Definition: glcorearb.h:1931