24 #ifndef HDX_SIMPLE_LIGHTING_SHADER_H
25 #define HDX_SIMPLE_LIGHTING_SHADER_H
27 #include "pxr/imaging/glf/glew.h"
30 #include "pxr/imaging/hdx/api.h"
31 #include "pxr/imaging/hd/version.h"
32 #include "pxr/imaging/hd/materialParam.h"
33 #include "pxr/imaging/hd/resource.h"
34 #include "pxr/imaging/hdSt/lightingShader.h"
35 #include "pxr/imaging/hdSt/resourceBinder.h"
37 #include "pxr/imaging/glf/bindingMap.h"
38 #include "pxr/imaging/hio/glslfx.h"
39 #include "pxr/imaging/glf/simpleLightingContext.h"
41 #include "pxr/base/gf/matrix4d.h"
43 #include "pxr/base/tf/declarePtrs.h"
44 #include "pxr/base/tf/token.h"
46 #include <boost/scoped_ptr.hpp>
47 #include <boost/shared_ptr.hpp>
51 PXR_NAMESPACE_OPEN_SCOPE
54 typedef boost::shared_ptr<class HdxSimpleLightingShader> HdxSimpleLightingShaderSharedPtr;
55 typedef boost::shared_ptr<class HdStTextureResource>
56 HdStTextureResourceSharedPtr;
66 virtual ~HdxSimpleLightingShader();
74 void BindResources(HdSt_ResourceBinder
const &binder,
int program)
override;
76 void UnbindResources(HdSt_ResourceBinder
const &binder,
int program)
override;
78 void AddBindings(HdBindingRequestVector *customBindings)
override;
82 HdMaterialParamVector
const&
GetParams()
const override;
91 void SetLightingStateFromOpenGL();
93 void SetLightingState(GlfSimpleLightingContextPtr
const &lightingContext);
95 GlfSimpleLightingContextRefPtr GetLightingContext() {
96 return _lightingContext;
100 GlfSimpleLightingContextRefPtr _lightingContext;
101 GlfBindingMapRefPtr _bindingMap;
103 boost::scoped_ptr<HioGlslfx> _glslfx;
105 HdMaterialParamVector _lightTextureParams;
109 PXR_NAMESPACE_CLOSE_SCOPE
111 #endif // HDX_SIMPLE_LIGHTING_SHADER_H
HDST_API HdMaterialParamVector const & GetParams() const override
HdStShaderCode overrides.
HDX_API void AddBindings(HdBindingRequestVector *customBindings) override
Add custom bindings (used by codegen)
A shader that supports simple lighting functionality.
Token for efficient comparison, assignment, and hashing of known strings.
Stores a 4x4 matrix of double elements.
HDX_API void SetCamera(GfMatrix4d const &worldToViewMatrix, GfMatrix4d const &projectionMatrix) override
HdStLightingShader overrides.
A lighting shader base class.
HDX_API void UnbindResources(HdSt_ResourceBinder const &binder, int program) override
Unbinds shader-specific resources.
HDX_API std::string GetSource(TfToken const &shaderStageKey) const override
Returns the shader source provided by this shader for shaderStageKey.
HDX_API ID ComputeHash() const override
HdShader overrides.
HDX_API void BindResources(HdSt_ResourceBinder const &binder, int program) override
Binds shader-specific resources to program XXX: this interface is meant to be used for bridging the G...