Search code examples
openglgraphicssdlhardware-acceleration

Does it make sense to OpenGL instead of SDL blitting functions?


I'm writing a simple 2d game using SDL and I was wondering, what if I just apply a bitmap texture to rectangles with OpenGL and use them instead of sprites, eliminating any calls to SDL_BlitSurface? Will my application become faster as a result of OpenGL hardware acceleration?

P.S.: My application will be running in windowed mode (not fullscreen), if that's important.


Solution

  • Yes, in general, that should be faster and more scalable (you can draw more sprites before you start getting a performance hit).