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:
authorClément Foucault <foucault.clem@gmail.com>2020-08-21 14:48:34 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-21 15:16:42 +0300
commit220fbdf59341f620c06959280e2145132003c5df (patch)
tree32f1d80da91aee1bbe13e69b7f8ac3c93e429ccc /source/blender/gpu/GPU_shader.h
parent1e95a7402c62d2380710a56733e6c4cbe390b3be (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/GPU_shader.h')
-rw-r--r--source/blender/gpu/GPU_shader.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index 0aff7b11fc1..33fef266c42 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -31,12 +31,8 @@ struct GPUTexture;
struct GPUUniformBuf;
struct GPUVertBuf;
-/* TODO(fclem) These members should be private and the
- * whole struct should just be an opaque pointer. */
-typedef struct GPUShader {
- /** For debugging purpose. */
- char name[64];
-} GPUShader;
+/** Opaque type hidding blender::gpu::Shader */
+typedef struct GPUShader GPUShader;
typedef enum eGPUShaderTFBType {
GPU_SHADER_TFB_NONE = 0, /* Transform feedback unsupported. */