Hello! I am new to SDL and just got a simple platform game with wall jumping and music to run:
I have spent a lot of time trying to figure out how to implement an OpenGL Shader into this game. I use SDL_Surfaces rendered with an SDL_Renderer. I an OpenGL context initialized in my SDL program, and my question is: How do I set up OpenGL fragment shaders so that they will shade what SDL renders?
My plan is to use a God Ray shader.
You don’t. If you want to use shaders, use OpenGL for rendering, instead of SDL.
If you just want to perform post-processing on a rendered scene, you can use SDL to render into an SDL_Texture, then use OpenGL to render that texture to the screen using a shader.
If you want to use OpenGL features during the rendering process, then you should forget about using SDL rendering functions and use OpenGL instead. You can still use SDL for window management and input handling.