Sprite Rotation With Sdl

This is a discussion on Sprite Rotation With Sdl within the Game Programming forums, part of the General Programming Boards category; Hi all, I'm writing a program in which I need to implement simple 2D rotations of small sprites. It must ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    32

    Sprite Rotation With Sdl

    Hi all,
    I'm writing a program in which I need to implement simple 2D rotations of small sprites. It must be as accurate as possible, so I'm not interested in precaching 360 images of every sprite I've got... is there a rotation function I can use?
    Thank you.

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    903
    You could use the OGL part of SDL to use glRotatef(). You'd have to push and pop matrices though.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    32

    ?

    Yeah... what does that mean? that I need to install an extension named OGL? I don't know... Any other ideas anyone?

  4. #4
    Registered User
    Join Date
    Aug 2003
    Posts
    1,197
    Next time you are probably better off in the game programmings board.

    Now to your problem: Desolation is saying that you are probably much better off using SDL together with OpenGL (which is a crossplatform graphics api), to do rotations.

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,419
    Moved to GD board.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bullet start locations on a sprite after rotation
    By JeremyCAFE in forum Game Programming
    Replies: 13
    Last Post: 07-24-2006, 12:39 PM
  2. SDL question (long)
    By yahn in forum C++ Programming
    Replies: 0
    Last Post: 04-16-2006, 08:46 PM
  3. Sprite rotation
    By kawk in forum Game Programming
    Replies: 1
    Last Post: 01-25-2005, 12:39 PM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. Image rotation in SDL
    By Kinasz in forum Game Programming
    Replies: 1
    Last Post: 12-25-2003, 10:48 AM

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