Drawing 2D stuff with SDL_Renderer and OpenGL stuff with SDL_GLContext

前端 未结 2 1524
悲&欢浪女
悲&欢浪女 2020-12-07 03:31

I have been learning about SDL 2D programming for a while and now I wanted to create a program using SDL and OpenGL combined. I set it up like this:

SDL_Init         


        
2条回答
  •  醉梦人生
    2020-12-07 03:54

    You can render to an SDL_Surface with SDL, and then convert it to a texture & upload it to the GPU using OpenGL.

提交回复
热议问题