Jump to content
  • Advertisement
Sign in to follow this  
jwezorek

Rendering with subpixel accuracy in SDL

This topic is 2524 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!