Commit: b41cfb590c798de39d569b462820c8eed70faff2
Author: Campbell Barton
Date:   Thu Jun 9 05:12:42 2016 +1000
Branches: master
https://developer.blender.org/rBb41cfb590c798de39d569b462820c8eed70faff2

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;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to