src/render/opengles/SDL_render_gles.c
changeset 7239 04dda95ba22c
parent 7191 75360622e65f
child 7420 fe82b639c4d6
equal deleted inserted replaced
7238:daff4d9cedc6 7239:04dda95ba22c
   621     }
   621     }
   622 
   622 
   623     data->glViewport(renderer->viewport.x, renderer->viewport.y,
   623     data->glViewport(renderer->viewport.x, renderer->viewport.y,
   624                renderer->viewport.w, renderer->viewport.h);
   624                renderer->viewport.w, renderer->viewport.h);
   625 
   625 
   626     data->glMatrixMode(GL_PROJECTION);
   626     if (renderer->viewport.w && renderer->viewport.h) {
   627     data->glLoadIdentity();
   627         data->glMatrixMode(GL_PROJECTION);
   628     data->glOrthof((GLfloat) 0,
   628         data->glLoadIdentity();
   629              (GLfloat) renderer->viewport.w,
   629         data->glOrthof((GLfloat) 0,
   630              (GLfloat) renderer->viewport.h,
   630                  (GLfloat) renderer->viewport.w,
   631              (GLfloat) 0, 0.0, 1.0);
   631                  (GLfloat) renderer->viewport.h,
       
   632                  (GLfloat) 0, 0.0, 1.0);
       
   633     }
   632     return 0;
   634     return 0;
   633 }
   635 }
   634 
   636 
   635 static int
   637 static int
   636 GLES_UpdateClipRect(SDL_Renderer * renderer)
   638 GLES_UpdateClipRect(SDL_Renderer * renderer)