   rotate doesn't work, it (sheers ?) maintains volume though
  Hi,The following code rotates 2d objects (2d engine), but makes 2d bitmap fatter in one axis, and skinnier in other axis. Sheering? How do I get it to rotate without making the object sheer/distort?thanks in advance!static RESULT display_copy_screen(struct display_screen *src,struct display_rect *srcrect,struct display_screen *dst,struct display_rect *dstrect){double x = 2.0 * ( dstrect->x + dst->size.x ) / dst->rw - 1.0;double y = 2.0 * ( dst->size.h - dstrect->y - dst->size.y ) / dst->rh - 1.0;double w = 2.0 * ( srcrect->w ) / dst->rw;double h = 2.0 * ( srcrect->h ) / dst->rh;thread_mutex_lock( main_display->mutex );/* Put glfinish around both main opengl functions to ensure all operations in * other contexts are complete before and after drawing. * This stops corruption of core's texture during game changes. * Believe this to be an issue of the r200 ati radeon driver in handling context switching */glFinish();glEnable( DISPLAY_TEXTURE );if ( src->channels % 2 == 0 ) glEnable( GL_BLEND );else glDisable( GL_BLEND );glBindTexture( DISPLAY_TEXTURE, src->id );/* Setup scaling, rotation and alpha */glMatrixMode( GL_MODELVIEW );glLoadIdentity();/* Shift to topleft to draw */glTranslatef( x, y, 0 );glTexParameterf( DISPLAY_TEXTURE, GL_TEXTURE_MAG_FILTER, GL_NEAREST );glTexParameterf( DISPLAY_TEXTURE, GL_TEXTURE_MIN_FILTER, GL_NEAREST );/* Transform */if ( src->zoom || src->rotation || src->alpha ) {double zoom = ( 100.0 - src->zoom ) / 100.0;/* Shift to centre to rotate */glTranslatef( w / 2, -h / 2, 0 );/* Transform */if ( src->zoom ) glScalef( zoom, zoom, 0 );if ( src->rotation ) glRotatef( (double)src->rotation / 10, 0, 0, 1 );if ( src->alpha ) glColor4ub( 255, 255, 255, 255 - src->alpha );/* Shift to topleft to draw */glTranslatef( -w / 2, h / 2, 0 );/* Leaves edges on symbols on ATI even when no zoom or rotation */glTexParameterf( DISPLAY_TEXTURE, GL_TEXTURE_MAG_FILTER, GL_LINEAR );glTexParameterf( DISPLAY_TEXTURE, GL_TEXTURE_MIN_FILTER, GL_LINEAR );}glBegin( GL_QUADS );glTexCoord2f( srcrect->x, srcrect->y ); glVertex3f( 0, 0, 0.0 );glTexCoord2f( srcrect->x, srcrect->h + srcrect->y ); glVertex3f( 0, 0 - h, 0.0 );glTexCoord2f( srcrect->w + srcrect->x, srcrect->h + srcrect->y ); glVertex3f( 0 + w, 0 - h, 0.0 );glTexCoord2f( srcrect->w + srcrect->x, srcrect->y ); glVertex3f( 0 + w, 0, 0.0 );glEnd();glBindTexture( DISPLAY_TEXTURE, 0 );glMatrixMode( GL_MODELVIEW );glLoadIdentity();glFinish();thread_mutex_unlock( main_display->mutex );return( ERROR_NONE );}   
  try the scale after the translate   