0

I am getting a rather odd error while displaying bitmap texts on screen and using glRasterPos3f function to position them. When I start the application, all my texts fit inside the view and everything works fine and dandy. However, things start to get really messed up as soon as one of them gets outside the view - all my texts disappear and won't reappear ever again not even if I set the view back to its original position.

I did some investigation and made an explicit check of the raster position validity flag, like this:

glRasterPos3f(xPos, yPos, zPos);

// check raster position validity
GLboolean valid;
pin_ptr<GLboolean> p_valid = &valid;
glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID, p_valid);
if (!valid)
  return;

Well now this is when things start to really boggle my mind - the condition at the end of this code gets triggered not just when a text position gets outside the view, but from then on ever since! It drives me into despair. Even if I restore the view to its usual working state, the validity bit appears to stay cleared forever. Any ideas on what might be the possible cause for this or maybe how to restore raster position manually somehow?

EDIT: Some pics...

Initial state, all is well: http://i.imgur.com/SFGU4QI.png

I zoom in, some raster position gets invalid, texts disappear: http://i.imgur.com/cj2xVAs.png

When I zoom back out again, there still aren't any texts...

4

1 に答える 1