2D game with opengl

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. :wink:

In fact it is the same :slight_smile:
Do as you prefer.

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

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.