Here is a code snippet:

- Code: Select all
`m_camera.SetViewMatrix(); //just to make sure nothings left from the last render`

int viewport[4];

glGetIntegerv(GL_VIEWPORT, viewport);

float proj[16];

glGetFloatv(GL_PROJECTION_MATRIX, proj);

float model[16];

glGetFloatv(GL_MODELVIEW_MATRIX, model);

m_currentRay.Create(x, y, 0.0f, 1.0f, model, proj, viewport);

Everything looks ok, but it seems like the glGet* functions are simply not working, and are not returning any values.

I have even tried initialising the variables to certain values, but when the glGet* functions are called, the variables are unchanged. For example:

- Code: Select all
`int viewport[4];`

viewport[0] = 1;

viewport[1] = 2;

viewport[2] = 3;

viewport[3] = 4;

and when glGetIntegerv(GL_VIEWPORT, viewport); is called, viewport is still the same. The same applies to all the variables.

A few notes:

I am debugging on a HTC Wildfire

Using GLES 1.0

Android SDK version 2.2 (API version

Any help would be appreciated.

Yes, I have set the viewport using glViewport and set the Projection and View matrices

Thanks!