[Bf-blender-cvs] [1ad52872604] blender2.8: use COMP instead of GL enum to construct vertex format

Mike Erwin noreply at git.blender.org
Fri Apr 7 22:01:14 CEST 2017


Commit: 1ad52872604efb0a11011bcc7cd198c56ea97163
Author: Mike Erwin
Date:   Fri Apr 7 15:51:39 2017 -0400
Branches: blender2.8
https://developer.blender.org/rB1ad52872604efb0a11011bcc7cd198c56ea97163

use COMP instead of GL enum to construct vertex format

I converted all other files a day or two ago; this file was part of a recent merge.

===================================================================

M	source/blender/windowmanager/manipulators/intern/manipulator_library/dial_manipulator.c

===================================================================

diff --git a/source/blender/windowmanager/manipulators/intern/manipulator_library/dial_manipulator.c b/source/blender/windowmanager/manipulators/intern/manipulator_library/dial_manipulator.c
index 844de194845..63b02cb1509 100644
--- a/source/blender/windowmanager/manipulators/intern/manipulator_library/dial_manipulator.c
+++ b/source/blender/windowmanager/manipulators/intern/manipulator_library/dial_manipulator.c
@@ -102,7 +102,7 @@ static void dial_geom_draw(
 	glLineWidth(dial->manipulator.line_width);
 
 	VertexFormat *format = immVertexFormat();
-	unsigned int pos = VertexFormat_add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT);
+	unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT);
 
 	if (clip_plane) {
 		immBindBuiltinProgram(GPU_SHADER_3D_CLIPPED_UNIFORM_COLOR);
@@ -139,7 +139,7 @@ static void dial_ghostarc_draw_helpline(const float angle, const float co_outer[
 	gpuPushMatrix();
 	gpuRotate3f(RAD2DEGF(angle), 0.0f, 0.0f, -1.0f);
 
-	unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", GL_FLOAT, 3, KEEP_FLOAT);
+	unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 3, KEEP_FLOAT);
 
 	immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
 
@@ -161,7 +161,7 @@ static void dial_ghostarc_draw(
 	const float width_inner = DIAL_WIDTH - dial->manipulator.line_width * 0.5f / U.manipulator_scale;
 
 	VertexFormat *format = immVertexFormat();
-	unsigned int pos = VertexFormat_add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT);
+	unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT);
 	immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
 	immUniformColor4fv(color);
 	imm_draw_disk_partial_fill(




More information about the Bf-blender-cvs mailing list