Thread: Sprite Rotation With Sdl

  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,218
    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.
    STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    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.

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, 01: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, 11:48 AM