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/intern/gpu_texture.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/gpu/intern/gpu_texture.cc') diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc index e2330b7f990..a4d0d039c8f 100644 --- a/source/blender/gpu/intern/gpu_texture.cc +++ b/source/blender/gpu/intern/gpu_texture.cc @@ -124,7 +124,7 @@ bool Texture::init_buffer(GPUVertBuf *vbo, eGPUTextureFormat format) if (format == GPU_DEPTH_COMPONENT24) { return false; } - w_ = vbo->vertex_len; + w_ = GPU_vertbuf_get_vertex_len(vbo); h_ = 0; d_ = 0; format_ = format; @@ -303,7 +303,7 @@ GPUTexture *GPU_texture_create_compressed_2d( GPUTexture *GPU_texture_create_from_vertbuf(const char *name, GPUVertBuf *vert) { - eGPUTextureFormat tex_format = to_texture_format(&vert->format); + eGPUTextureFormat tex_format = to_texture_format(GPU_vertbuf_get_format(vert)); Texture *tex = GPUBackend::get()->texture_alloc(name); bool success = tex->init_buffer(vert, tex_format); -- cgit v1.2.3