src/render/opengles2/SDL_render_gles2.c
changeset 7239 04dda95ba22c
parent 7191 75360622e65f
child 7420 fe82b639c4d6
equal deleted inserted replaced
7238:daff4d9cedc6 7239:04dda95ba22c
   903 GLES2_SetOrthographicProjection(SDL_Renderer *renderer)
   903 GLES2_SetOrthographicProjection(SDL_Renderer *renderer)
   904 {
   904 {
   905     GLES2_DriverContext *rdata = (GLES2_DriverContext *)renderer->driverdata;
   905     GLES2_DriverContext *rdata = (GLES2_DriverContext *)renderer->driverdata;
   906     GLfloat projection[4][4];
   906     GLfloat projection[4][4];
   907     GLuint locProjection;
   907     GLuint locProjection;
       
   908 
       
   909     if (!renderer->viewport.w || !renderer->viewport.h) {
       
   910         return 0;
       
   911     }
   908 
   912 
   909     /* Prepare an orthographic projection */
   913     /* Prepare an orthographic projection */
   910     projection[0][0] = 2.0f / renderer->viewport.w;
   914     projection[0][0] = 2.0f / renderer->viewport.w;
   911     projection[0][1] = 0.0f;
   915     projection[0][1] = 0.0f;
   912     projection[0][2] = 0.0f;
   916     projection[0][2] = 0.0f;