Imagination PowerVR SDK Blog

glTranslatef with negative values not drawing


#1

Hi,





I am rendering a scene with the viewport/project setup to mimic 2D. So I have something like:





glLoadIdentity ();


glMatrixMode (GL_PROJECTION);


glLoadIdentity ();


glViewport(0, 0, width, height);


glOrthof (0, width, height, 0, 0, 1);


glMatrixMode (GL_MODELVIEW);


glTranslatef(trans_x, trans_y, 0);





If I draw textures or triangles in this method things work fine. However if I change my trans_x or trans_y to a negative value then nothing renders. I can for example draw a texture with (vertex) x=-20 then things work fine. However if I draw with x=0 and the trans_x at -20 the texture does not display. Also positive values for translation work as expected.





Thanks for any help,


Brian


#2

Sorry I should have mentioned that I am testing this with the WindowsPC SDK running on a Windows 7 laptop.





Brian