Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed direction of rotation with OpenGL ES 2

  • Loading branch information
slouken committed Jan 27, 2013
1 parent 99d3522 commit 9145deac72dbbbdef69cab14416134e8a5f17d62
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/render/opengles2/SDL_render_gles2.c
@@ -1341,7 +1341,7 @@ GLES2_RenderCopyEx(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect

rdata->glEnableVertexAttribArray(GLES2_ATTRIBUTE_CENTER);
rdata->glEnableVertexAttribArray(GLES2_ATTRIBUTE_ANGLE);
fAngle[0] = fAngle[1] = fAngle[2] = fAngle[3] = (GLfloat)angle;
fAngle[0] = fAngle[1] = fAngle[2] = fAngle[3] = (GLfloat)(360.0f - angle);
/* Calculate the center of rotation */
translate[0] = translate[2] = translate[4] = translate[6] = (center->x + dstrect->x);
translate[1] = translate[3] = translate[5] = translate[7] = (center->y + dstrect->y);

0 comments on commit 9145dea

Please sign in to comment.