glTranslatef with negative values not drawing

This topic contains 1 reply, has 1 voice, and was last updated by  bedmond 6 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30471

    bedmond
    Member

    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

    #34779

    bedmond
    Member

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

    Brian

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.