src/render/opengl/SDL_render_gl.c
changeset 6237 240f1bced46b
parent 6232 37e8d0736366
child 6246 c70ec935a4bb
equal deleted inserted replaced
6236:4a7abc1b6b0e 6237:240f1bced46b
    74 
    74 
    75 SDL_RenderDriver GL_RenderDriver = {
    75 SDL_RenderDriver GL_RenderDriver = {
    76     GL_CreateRenderer,
    76     GL_CreateRenderer,
    77     {
    77     {
    78      "opengl",
    78      "opengl",
    79      (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC),
    79      (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE),
    80      1,
    80      1,
    81      {SDL_PIXELFORMAT_ARGB8888},
    81      {SDL_PIXELFORMAT_ARGB8888},
    82      0,
    82      0,
    83      0}
    83      0}
    84 };
    84 };
   319     renderer->RenderReadPixels = GL_RenderReadPixels;
   319     renderer->RenderReadPixels = GL_RenderReadPixels;
   320     renderer->RenderPresent = GL_RenderPresent;
   320     renderer->RenderPresent = GL_RenderPresent;
   321     renderer->DestroyTexture = GL_DestroyTexture;
   321     renderer->DestroyTexture = GL_DestroyTexture;
   322     renderer->DestroyRenderer = GL_DestroyRenderer;
   322     renderer->DestroyRenderer = GL_DestroyRenderer;
   323     renderer->info = GL_RenderDriver.info;
   323     renderer->info = GL_RenderDriver.info;
   324     renderer->info.flags = SDL_RENDERER_ACCELERATED;
   324     renderer->info.flags = SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE;
   325     renderer->driverdata = data;
   325     renderer->driverdata = data;
   326     renderer->window = window;
   326     renderer->window = window;
   327 
   327 
   328     data->context = SDL_GL_CreateContext(window);
   328     data->context = SDL_GL_CreateContext(window);
   329     if (!data->context) {
   329     if (!data->context) {