Help! to obtain current viewport, GL_VIEWPORT not recognized

Hi,

I have an interface where I’m scrolling across a bunch of squares. When a user clicks a button, I need to draw a selection box around the central square.

For this, I need the current screen coordinates. In order to get that I try using the command,

GLint viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);

However, on compiling it says GL_VIEWPORT not recognized. Any help would be appreciated…

Compare the “asscoiated gets” section of this:
http://www.khronos.org/opengles/documentation/opengles1_1/gl_egl_ref_1_1_20041110/glViewport.html

to this:
http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/viewport.html

As you can see, OpenGL ES does not support querying the current viewport. If your app has set a viewport though it can remember it for later use, you don’t need to query?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.