diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-21 14:48:34 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-21 15:16:42 +0300 |
commit | 220fbdf59341f620c06959280e2145132003c5df (patch) | |
tree | 32f1d80da91aee1bbe13e69b7f8ac3c93e429ccc /source/blender/gpu/intern/gpu_shader_private.hh | |
parent | 1e95a7402c62d2380710a56733e6c4cbe390b3be (diff) |
GPUShader: Make GPUShader* an opaque pointer to blender::gpu::Shader
This avoids the misleading inheritance.
Also cleanup by setting the blender::gpu::Shader as active shader to
avoid some casting.
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_private.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_private.hh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_private.hh b/source/blender/gpu/intern/gpu_shader_private.hh index d51c3b03ecb..e5af22cae92 100644 --- a/source/blender/gpu/intern/gpu_shader_private.hh +++ b/source/blender/gpu/intern/gpu_shader_private.hh @@ -29,11 +29,15 @@ namespace blender { namespace gpu { -class Shader : public GPUShader { +class Shader { public: /** Uniform & attribute locations for shader. */ ShaderInterface *interface; + protected: + /** For debugging purpose. */ + char name[64]; + public: Shader(const char *name); virtual ~Shader(); |