Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/opengl/gl_shader_interface.hh')
-rw-r--r--source/blender/gpu/opengl/gl_shader_interface.hh12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/gpu/opengl/gl_shader_interface.hh b/source/blender/gpu/opengl/gl_shader_interface.hh
index 89a5b631047..059fedd83c6 100644
--- a/source/blender/gpu/opengl/gl_shader_interface.hh
+++ b/source/blender/gpu/opengl/gl_shader_interface.hh
@@ -34,6 +34,8 @@
#include "glew-mx.h"
+#include "gl_shader_patcher.hh"
+
#include "gpu_shader_interface.hh"
namespace blender::gpu {
@@ -48,13 +50,21 @@ class GLShaderInterface : public ShaderInterface {
/** Reference to VaoCaches using this interface */
Vector<GLVaoCache *> refs_;
+ /* Reference to the ubo binding that is used for push constants. */
+ const ShaderInput *push_constant_input_ = nullptr;
+
public:
- GLShaderInterface(GLuint program);
+ GLShaderInterface(GLShaderPatcherContext &context, GLuint program);
~GLShaderInterface();
void ref_add(GLVaoCache *ref);
void ref_remove(GLVaoCache *ref);
+ inline const ShaderInput *push_constant_get()
+ {
+ return push_constant_input_;
+ }
+
MEM_CXX_CLASS_ALLOC_FUNCS("GLShaderInterface");
};