Skip to main content
14 events
when toggle format what by license comment
Dec 10, 2014 at 19:58 vote accept Thums
Dec 10, 2014 at 19:09 history edited Thums CC BY-SA 3.0
added 1421 characters in body
Dec 10, 2014 at 18:00 answer added user55564 timeline score: 3
Dec 10, 2014 at 17:30 comment added Thums Ok, I'm using push and pop matrix by the way, but putting all drawing inside of it. I'm algo using glOrtho(0, WIDTH, HEIGHT, 0, -1, 1); Same thing happenig with modelview though
Dec 10, 2014 at 17:20 comment added tkausl Yeah... Don't do that. Set up your projection-matrix once and then use modelview for rendering. Call loadIdentity once every frame (at the beginning) and please use pushmatrix and popmatrix instead of rotating back, this can go horribly wrong in some cases.
Dec 10, 2014 at 17:20 comment added Thums I did some research and I am pretty sure I will have to translate it to be able to rotate and have the texture on the same place (rotate around its center)
Dec 10, 2014 at 17:14 comment added Thums I'm using glViewport(0, 0, WIDTH, HEIGHT);, GL_PROJECTION matrix mode and calling glLoadIdentity(); only once. btw, I don't think it stopped being rendered, has only been moved off screen.
Dec 10, 2014 at 17:07 comment added tkausl Then there is something wrong with your matrix. Are you loading the identitymatrix everytime before rendering?
Dec 10, 2014 at 17:03 comment added Thums No texture is shown for the hero when I call glRotatef(90, 0, 0, 1); before glBegin() and glRotatef(-90, 0, 0, 1); after glEnd()
Dec 10, 2014 at 16:59 comment added tkausl Yes, your angle as first parameter and for a 2D game the last three parameters should be 0, 0 and 1.
Dec 10, 2014 at 16:57 comment added Thums I know that, I just found they to be super simple to use and decided to use them on this first simple project which is almost finished by now. All I have to do is call glRotate with the desired angle of rotation?
Dec 10, 2014 at 16:54 comment added tkausl You're using ultra-old and deprecated opengl-functions. If you learned this in a tutorial, look for a newer better tutorial. Btw: You rotate with glRotate. glTranslate is to move it.
Dec 10, 2014 at 16:52 review First posts
Dec 10, 2014 at 17:23
Dec 10, 2014 at 16:51 history asked Thums CC BY-SA 3.0