Rotating Bitmaps with SDL

This is a discussion on Rotating Bitmaps with SDL within the Game Programming forums, part of the General Programming Boards category; I'm trying to make my first real graphical C++ program by using SDL in Visual C++. One problem I have ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    22

    Question Rotating Bitmaps with SDL

    I'm trying to make my first real graphical C++ program by using SDL in Visual C++. One problem I have is that it's kind of a lunar lander type of thing, so I need to rotate the ship freely. I could make different animations for each time the ship would rotate 45 degrees, but is there just some way to rotate bitmaps in SDL using a single bitmap? Do I need to use OpenGL to do it? Is it easy?

    thanks in advance.

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    403
    Either use SDL_gfx (kinda slow for realtime when the images are larger)

    Or you could use SDL w/ OpenGL, and if you don't know any OpenGL check out ZEngine which I wrote, requires almost 0 knowledge of SDL or OpenGL unless you're doing something really really fancy.

    Rotation is as simple as:
    PHP Code:
    ZImage image("something.bmp");
    image.DrawRotated(x,y,angle); 

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems compiling this SDL app
    By Rider in forum C++ Programming
    Replies: 3
    Last Post: 03-27-2007, 12:22 PM
  2. SDL or Allegro
    By fungus_mungus in forum Game Programming
    Replies: 7
    Last Post: 04-02-2005, 12:18 PM
  3. SDL and MinGW Studio
    By Vicious in forum Tech Board
    Replies: 0
    Last Post: 07-30-2004, 09:59 PM
  4. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  5. sdl in c++
    By Klinerr1 in forum C++ Programming
    Replies: 8
    Last Post: 07-07-2002, 07:46 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21