diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-07 00:45:51 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-07 14:59:51 +0300 |
commit | bb2aeb4504907cab1cf8c4afc4dd1d6495c940e4 (patch) | |
tree | 550d043273b767d55ef32409e58de17cb75e724e /source/blender/gpu/opengl/gl_texture.cc | |
parent | 99e3541d3b1a1fc62fcd24e9f0d12a631e4caead (diff) |
GPUVertBuf: Rename GPUVertBuf to VertBuf and add some getters
to avoid more typecasts.
Diffstat (limited to 'source/blender/gpu/opengl/gl_texture.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_texture.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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<GLVertBuf *>(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__ |