From bb2aeb4504907cab1cf8c4afc4dd1d6495c940e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 6 Sep 2020 23:45:51 +0200 Subject: GPUVertBuf: Rename GPUVertBuf to VertBuf and add some getters to avoid more typecasts. --- source/blender/gpu/opengl/gl_texture.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/gpu/opengl/gl_texture.cc') diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc index f1779601e33..6151a2fc73e 100644 --- a/source/blender/gpu/opengl/gl_texture.cc +++ b/source/blender/gpu/opengl/gl_texture.cc @@ -111,6 +111,7 @@ bool GLTexture::init_internal(void) /* Return true on success. */ bool GLTexture::init_internal(GPUVertBuf *vbo) { + GLVertBuf *gl_vbo = static_cast(unwrap(vbo)); target_ = to_gl_target(type_); /* We need to bind once to define the texture type. */ @@ -119,10 +120,10 @@ bool GLTexture::init_internal(GPUVertBuf *vbo) GLenum internal_format = to_gl_internal_format(format_); if (GLEW_ARB_direct_state_access) { - glTextureBuffer(tex_id_, internal_format, vbo->vbo_id); + glTextureBuffer(tex_id_, internal_format, gl_vbo->vbo_id); } else { - glTexBuffer(target_, internal_format, vbo->vbo_id); + glTexBuffer(target_, internal_format, gl_vbo->vbo_id); } #ifndef __APPLE__ -- cgit v1.2.3