From 0debbe2b7f7177678c9bce9046c1499b698ac969 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Thu, 6 Apr 2017 00:59:04 -0400 Subject: Gawain: VertexFormat_add_attrib (function name change) See intern/gawain for the API change. Other files are updated to use the new name. Also updated every call site to the recommended style: unsigned int foo = VertexFormat_add_attrib(format, "foo", COMP_ ... ) --- source/blender/gpu/intern/gpu_viewport.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/gpu/intern/gpu_viewport.c') diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index bcfe4f38f3e..3aea6f8bea4 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -251,8 +251,8 @@ static void draw_ofs_to_screen(GPUViewport *viewport) const float h = (float)GPU_texture_height(color); VertexFormat *format = immVertexFormat(); - unsigned texcoord = add_attrib(format, "texCoord", GL_FLOAT, 2, KEEP_FLOAT); - unsigned pos = add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT); + unsigned int texcoord = VertexFormat_add_attrib(format, "texCoord", COMP_F32, 2, KEEP_FLOAT); + unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); immBindBuiltinProgram(GPU_SHADER_3D_IMAGE_MODULATE_ALPHA); GPU_texture_bind(color, 0); @@ -381,8 +381,8 @@ void GPU_viewport_debug_depth_draw(GPUViewport *viewport, const float znear, con const float h = (float)GPU_texture_height(viewport->debug_depth); VertexFormat *format = immVertexFormat(); - unsigned texcoord = add_attrib(format, "texCoord", GL_FLOAT, 2, KEEP_FLOAT); - unsigned pos = add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT); + unsigned int texcoord = VertexFormat_add_attrib(format, "texCoord", COMP_F32, 2, KEEP_FLOAT); + unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); immBindBuiltinProgram(GPU_SHADER_3D_IMAGE_DEPTH); -- cgit v1.2.3