src/video/SDL_renderer_gles.c
changeset 2964 0faae272a372
parent 2949 4eabc35fbb4a
child 3099 82e60908fab1
     1.1 --- a/src/video/SDL_renderer_gles.c	Fri Jan 02 15:47:49 2009 +0000
     1.2 +++ b/src/video/SDL_renderer_gles.c	Fri Jan 02 16:03:37 2009 +0000
     1.3 @@ -632,15 +632,15 @@
     1.4                      (GLfloat) renderer->b * inv255f,
     1.5                      (GLfloat) renderer->a * inv255f);
     1.6  
     1.7 -	GLshort vertices[2];
     1.8 -	vertices[0] = x;
     1.9 -	vertices[1] = y;
    1.10 -	
    1.11 -	data->glVertexPointer(2, GL_SHORT, 0, vertices);
    1.12 -	data->glEnableClientState(GL_VERTEX_ARRAY);
    1.13 -	data->glDrawArrays(GL_POINTS, 0, 1);
    1.14 -	data->glDisableClientState(GL_VERTEX_ARRAY);
    1.15 -	
    1.16 +    GLshort vertices[2];
    1.17 +    vertices[0] = x;
    1.18 +    vertices[1] = y;
    1.19 +
    1.20 +    data->glVertexPointer(2, GL_SHORT, 0, vertices);
    1.21 +    data->glEnableClientState(GL_VERTEX_ARRAY);
    1.22 +    data->glDrawArrays(GL_POINTS, 0, 1);
    1.23 +    data->glDisableClientState(GL_VERTEX_ARRAY);
    1.24 +
    1.25      return 0;
    1.26  }
    1.27  
    1.28 @@ -656,16 +656,16 @@
    1.29                      (GLfloat) renderer->b * inv255f,
    1.30                      (GLfloat) renderer->a * inv255f);
    1.31  
    1.32 -	GLshort vertices[4];
    1.33 -	vertices[0] = x1;
    1.34 -	vertices[1] = y1;
    1.35 -	vertices[2] = x2;
    1.36 -	vertices[3] = y2;
    1.37 +    GLshort vertices[4];
    1.38 +    vertices[0] = x1;
    1.39 +    vertices[1] = y1;
    1.40 +    vertices[2] = x2;
    1.41 +    vertices[3] = y2;
    1.42  
    1.43 -	data->glVertexPointer(2, GL_SHORT, 0, vertices);
    1.44 -	data->glEnableClientState(GL_VERTEX_ARRAY);
    1.45 -	data->glDrawArrays(GL_LINES, 0, 2);
    1.46 -	data->glDisableClientState(GL_VERTEX_ARRAY);
    1.47 +    data->glVertexPointer(2, GL_SHORT, 0, vertices);
    1.48 +    data->glEnableClientState(GL_VERTEX_ARRAY);
    1.49 +    data->glDrawArrays(GL_LINES, 0, 2);
    1.50 +    data->glDisableClientState(GL_VERTEX_ARRAY);
    1.51  
    1.52      return 0;
    1.53  }
    1.54 @@ -682,25 +682,25 @@
    1.55                      (GLfloat) renderer->b * inv255f,
    1.56                      (GLfloat) renderer->a * inv255f);
    1.57  
    1.58 -	GLshort minx = rect->x;
    1.59 -	GLshort maxx = rect->x + rect->w;
    1.60 -	GLshort miny = rect->y;
    1.61 -	GLshort maxy = rect->y + rect->h;
    1.62 -	
    1.63 -	GLshort vertices[8];
    1.64 -	vertices[0] = minx;
    1.65 -	vertices[1] = miny;
    1.66 -	vertices[2] = maxx;
    1.67 -	vertices[3] = miny;
    1.68 -	vertices[4] = minx;
    1.69 -	vertices[5] = maxy;
    1.70 -	vertices[6] = maxx;
    1.71 -	vertices[7] = maxy;
    1.72 -	
    1.73 -	data->glVertexPointer(2, GL_SHORT, 0, vertices);
    1.74 -	data->glEnableClientState(GL_VERTEX_ARRAY);
    1.75 -	data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
    1.76 -	data->glDisableClientState(GL_VERTEX_ARRAY);
    1.77 +    GLshort minx = rect->x;
    1.78 +    GLshort maxx = rect->x + rect->w;
    1.79 +    GLshort miny = rect->y;
    1.80 +    GLshort maxy = rect->y + rect->h;
    1.81 +
    1.82 +    GLshort vertices[8];
    1.83 +    vertices[0] = minx;
    1.84 +    vertices[1] = miny;
    1.85 +    vertices[2] = maxx;
    1.86 +    vertices[3] = miny;
    1.87 +    vertices[4] = minx;
    1.88 +    vertices[5] = maxy;
    1.89 +    vertices[6] = maxx;
    1.90 +    vertices[7] = maxy;
    1.91 +
    1.92 +    data->glVertexPointer(2, GL_SHORT, 0, vertices);
    1.93 +    data->glEnableClientState(GL_VERTEX_ARRAY);
    1.94 +    data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
    1.95 +    data->glDisableClientState(GL_VERTEX_ARRAY);
    1.96  
    1.97      return 0;
    1.98  }