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-20 14:05:22 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-20 17:11:14 +0300
commit19d72175bac1d78a05e9141e21c234a15b151e89 (patch)
tree47d581306f13dd93b246637455371dd949de0241 /source/blender/gpu/opengl/gl_batch.hh
parent14fcd46ca7e569c1da11d0e4a02d12975226f91a (diff)
GPUShaderInterface: GL backend isolation
Diffstat (limited to 'source/blender/gpu/opengl/gl_batch.hh')
-rw-r--r--source/blender/gpu/opengl/gl_batch.hh16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/gpu/opengl/gl_batch.hh b/source/blender/gpu/opengl/gl_batch.hh
index d70f43aed2a..9a7767d679d 100644
--- a/source/blender/gpu/opengl/gl_batch.hh
+++ b/source/blender/gpu/opengl/gl_batch.hh
@@ -32,11 +32,11 @@
#include "glew-mx.h"
-#include "GPU_shader_interface.h"
-
namespace blender {
namespace gpu {
+class GLShaderInterface;
+
#define GPU_VAO_STATIC_LEN 3
/* Vao management: remembers all geometry state (vertex attribute bindings & element buffer)
@@ -47,7 +47,7 @@ class GLVaoCache {
/** Context for which the vao_cache_ was generated. */
struct GLContext *context_ = NULL;
/** Last interface this batch was drawn with. */
- GPUShaderInterface *interface_ = NULL;
+ GLShaderInterface *interface_ = NULL;
/** Cached vao for the last interface. */
GLuint vao_id_ = 0;
/** Used whend arb_base_instance is not supported. */
@@ -58,13 +58,13 @@ class GLVaoCache {
union {
/** Static handle count */
struct {
- const GPUShaderInterface *interfaces[GPU_VAO_STATIC_LEN];
+ const GLShaderInterface *interfaces[GPU_VAO_STATIC_LEN];
GLuint vao_ids[GPU_VAO_STATIC_LEN];
} static_vaos;
/** Dynamic handle count */
struct {
uint count;
- const GPUShaderInterface **interfaces;
+ const GLShaderInterface **interfaces;
GLuint *vao_ids;
} dynamic_vaos;
};
@@ -76,9 +76,9 @@ class GLVaoCache {
GLuint vao_get(GPUBatch *batch);
GLuint base_instance_vao_get(GPUBatch *batch, int i_first);
- GLuint lookup(const GPUShaderInterface *interface);
- void insert(const GPUShaderInterface *interface, GLuint vao_id);
- void remove(const GPUShaderInterface *interface);
+ GLuint lookup(const GLShaderInterface *interface);
+ void insert(const GLShaderInterface *interface, GLuint vao_id);
+ void remove(const GLShaderInterface *interface);
void clear(void);
private: