glutil: add glaGetOneInt helper

This commit is contained in:
Campbell Barton 2016-06-09 05:12:42 +10:00
parent b32fd196a0
commit b41cfb590c
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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;