Skip to main content
GameDev.net gamedev.net
🔒 Locked

SDL Drawing

Started by Butterman Feb 15, 2007 at 12:36 PM 0 replies 1.3k views
Original Post
Butterman
Butterman
Ive been using SDL to draw objects to the screen. If i move the object to co ordinates before 0,0 (eg. -10,-20) the object will still display at 0,0. Is this usual in SDL or have i made a mistake in my program? [Edited by - Butterman on February 15, 2007 2:23:37 PM]
Game Development Tutorials, a few good game development tutorials located on my site.
nagromo
nagromo
You can't draw to a location that's left of or above the origin. Instead, draw at (0,0) and use the srcrect argument of SDL_BlitSurface() to tell it what part of the image to draw there.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.