Fixed direction of rotation with OpenGL ES 2

This commit is contained in:
Sam Lantinga 2013-01-27 15:52:56 -08:00
parent 2420aca939
commit 22321b18ef

View file

@ -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);