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

Rendering with subpixel accuracy in SDL

Started by jwezorek Jan 16, 2012 at 7:52 PM 0 replies 3.1k views
Original Post
jwezorek
jwezorek
I was thinking about using SDL for my next project to ease the pain of supporting multiple platforms. I'm currently using a custom implementation of standard 2D graphics functions, e.g. Blit, written on top of DirectX. This custom API is actually very close to what's in SDL with the exception that it uses floats for coordinates. SDL functions such as SDL_BlitSurface all seem to take SDL_Rects, which are composed of integers. Are there SDL functions that I'm missing that don't have to render to whole pixel locations?
jwezorek
jwezorek
After looking into this more, it looks like you can't do this with SDL calls and if you want to render 2D with subpixel accuracy using SDL you'd have to make OpenGL calls directly ... Is this true?

Obvious next question, is there a small thin library that someone has written that sits on top of OpenGl and exposes 2D functionality that supports blitting with subpixel accuracy?

Topic Locked

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

Sign in to reply to this topic.