[Bf-blender-cvs] [4250c03] compositor-2016: glutil: add glaGetOneInt helper

Campbell Barton noreply at git.blender.org
Thu Jun 9 13:28:37 CEST 2016


Commit: 4250c03ba9b4352f371eb384ee55e99e87008285
Author: Campbell Barton
Date:   Thu Jun 9 05:12:42 2016 +1000
Branches: compositor-2016
https://developer.blender.org/rB4250c03ba9b4352f371eb384ee55e99e87008285

glutil: add glaGetOneInt helper

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

M	source/blender/editors/include/BIF_glutil.h
M	source/blender/editors/screen/glutil.c

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

diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index 0ac5c17..d3d2c46 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -94,6 +94,7 @@ void glutil_draw_filled_arc(float start, float angle, float radius, int nsegment
  * The param must cause only one value to be gotten from GL.
  */
 float glaGetOneFloat(int param);
+int glaGetOneInt(int param);
 
 /**
  * Functions like glRasterPos2i, except ensures that the resulting
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 0142682..93bac3f 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -327,6 +327,13 @@ float glaGetOneFloat(int param)
 	return v;
 }
 
+int glaGetOneInt(int param)
+{
+	GLint v;
+	glGetIntegerv(param, &v);
+	return v;
+}
+
 void glaRasterPosSafe2f(float x, float y, float known_good_x, float known_good_y)
 {
 	GLubyte dummy = 0;




More information about the Bf-blender-cvs mailing list