diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-08 22:12:42 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-08 22:17:43 +0300 |
commit | b41cfb590c798de39d569b462820c8eed70faff2 (patch) | |
tree | 6fa4f0d975d6fb38d9abbe8f134340d2a4cff7c1 /source | |
parent | b32fd196a0276cc83c4f0c99a419b12347291883 (diff) |
glutil: add glaGetOneInt helper
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/include/BIF_glutil.h | 1 | ||||
-rw-r--r-- | source/blender/editors/screen/glutil.c | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index 0ac5c17a552..d3d2c465d46 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 014268262c4..93bac3f6660 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; |