Results 1 to 4 of 4

Thread: 2D game with opengl

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2010
    Posts
    2

    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.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: 2D game with opengl

    In fact it is the same
    Do as you prefer.

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Oct 2009
    Posts
    592

    Re: 2D game with opengl

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

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2010
    Posts
    2

    Re: 2D game with opengl

    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.

Similar Threads

  1. Game & OpenGL 1.4
    By AlexZ in forum OpenGL: Windows
    Replies: 1
    Last Post: 08-16-2004, 02:07 AM
  2. Opengl Game
    By PlayBoy in forum OpenGL: User Software
    Replies: 1
    Last Post: 01-05-2003, 03:26 AM
  3. yet another OpenGL game...
    By urban debugger in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-12-2002, 12:40 PM
  4. OpenGL Game OS
    By uzu_manga in forum OpenGL: Advanced Coding
    Replies: 62
    Last Post: 10-27-2002, 09:22 AM
  5. OpenGL game
    By crappy04 in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 07-14-2000, 06:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean