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 00:45:51 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-07 14:59:51 +0300
commitbb2aeb4504907cab1cf8c4afc4dd1d6495c940e4 (patch)
tree550d043273b767d55ef32409e58de17cb75e724e /source/blender/gpu/intern/gpu_texture.cc
parent99e3541d3b1a1fc62fcd24e9f0d12a631e4caead (diff)
GPUVertBuf: Rename GPUVertBuf to VertBuf and add some getters
to avoid more typecasts.
Diffstat (limited to 'source/blender/gpu/intern/gpu_texture.cc')
-rw-r--r--source/blender/gpu/intern/gpu_texture.cc4
1 files changed, 2 insertions, 2 deletions
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);