PDA

View Full Version : 2D game with opengl



arcanes
12-02-2010, 10:03 AM
Hi,

I've programmed a lot of 2D games with SDL, and today I would like to take advantage of hardware acceleration for 2D using openGL. I'm really a beginer and I've just learned how to display an image.

My question is the following. For example, I would like , to display a blinking LED, and allow user to interactively zoom it.

My first idea is for each frame ,to create a new black quad for background displaying then to create a new quad for the led at the correct size (depending on the expected zoom) displaying the right texture (changing the image at blinking time).

Is this how it should be done , or should I use things like camera moving in order to handle zoom?

Thanks in advance. ;)

ZbuffeR
12-02-2010, 11:32 AM
In fact it is the same :)
Do as you prefer.

ugluk
12-02-2010, 11:44 AM
learn batching, then write a simple fps. Dont waste your time on leds.

arcanes
12-02-2010, 11:59 AM
In fact it is the same smile
Do as you prefer.

Thanks



learn batching, then write a simple fps. Dont waste your time on leds.

Don't worry i'm not really spending time on leds , I've got a real project. It was just an example, in order to understand that I needed both to update the surface and to zoom it.

And for now I just need 2D, but later I will propably learn 3D.