Reputation: 447
I've been learning opengl for a while now and got to the conclusion that for a simple 2D project its rather overkill.
However I can't live without shaders anymore. Is is possible / viable to use shaders with SDL2 without having to use openGL directly? Im guessing that sharing the same rendering context with opengl and sdl is just asking for trouble if possible at all.
Upvotes: 4
Views: 5654
Reputation: 2278
No, In order to use shaders you need OpenGL or DirectX context. SDL itself use software rendering (SDL can give you hardware acceleration with pure SDL but that won't give you access to shaders).
In order to use full hardware acceleration you need to initialize an OpenGL context, I recommend OpenGL 2 context or newer version.
Upvotes: 2