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-09-07 02:20:55 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-07 14:59:51 +0300
commitc38debd39fac1e3d44b84e8092419da34f0b613d (patch)
treebba08fc983f7e18025f4e09fa346737053ba4ed0 /source/blender/gpu/opengl/gl_vertex_buffer.hh
parentbb2aeb4504907cab1cf8c4afc4dd1d6495c940e4 (diff)
GPUVertBuf: GL Backend Isolation
Part of the Vulkan port T68990 This makes a few changes in how the data is being handled by the backend to allow more flexibility in the future. The overall code logic is left unchanged.
Diffstat (limited to 'source/blender/gpu/opengl/gl_vertex_buffer.hh')
-rw-r--r--source/blender/gpu/opengl/gl_vertex_buffer.hh15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/gpu/opengl/gl_vertex_buffer.hh b/source/blender/gpu/opengl/gl_vertex_buffer.hh
index 76c5e86a1c7..eee5222f467 100644
--- a/source/blender/gpu/opengl/gl_vertex_buffer.hh
+++ b/source/blender/gpu/opengl/gl_vertex_buffer.hh
@@ -37,19 +37,20 @@ class GLVertBuf : public VertBuf {
friend class GLShader; /* For transform feedback. */
private:
- // GLuint vbo_id_ = 0;
+ /** OpenGL buffer handle. Init on first upload. Immutable after that. */
+ GLuint vbo_id_ = 0;
/** Size on the GPU. */
- // size_t vbo_size_ = 0;
+ size_t vbo_size_ = 0;
public:
void bind(void);
protected:
- uchar *acquire_data(void);
- uchar *resize_data(void);
- void release_data(void);
- void upload_data(void);
- void duplicate_data(VertBuf *dst);
+ void acquire_data(void) override;
+ void resize_data(void) override;
+ void release_data(void) override;
+ void upload_data(void) override;
+ void duplicate_data(VertBuf *dst) override;
MEM_CXX_CLASS_ALLOC_FUNCS("GLVertBuf");
};