10-05-2005, 08:45 AM
Hello
I'm writing a 2D game project at the moment with the help of glOrtho(). I already implemented a class for primitive drawing like rectangles, pixels, lines, alpha blending and so on, and I'm really impressed what you can do when using the power of OpenGL for 2D effects.
Well, now I'm working at loading and drawing bitmaps, and all works nice. I use quads and put the bitmaps as a texture onto them - and now I tried to rotate such a quad around the Z-axis. It rotates, but not around itself, rather around some invisible point somewhere on the screen.
So my question: How to make a quad rotates around its own center?
As english is not my native language, I hope you understand what I mean. Maybe somebody had a similar problem.
Thank you.
I'm writing a 2D game project at the moment with the help of glOrtho(). I already implemented a class for primitive drawing like rectangles, pixels, lines, alpha blending and so on, and I'm really impressed what you can do when using the power of OpenGL for 2D effects.
Well, now I'm working at loading and drawing bitmaps, and all works nice. I use quads and put the bitmaps as a texture onto them - and now I tried to rotate such a quad around the Z-axis. It rotates, but not around itself, rather around some invisible point somewhere on the screen.
So my question: How to make a quad rotates around its own center?
As english is not my native language, I hope you understand what I mean. Maybe somebody had a similar problem.
Thank you.