hedgewars/uStore.pas
changeset 2723 eaa6ac1e95ea
parent 2716 b9ca1bfca24f
child 2724 601158aaa201
equal deleted inserted replaced
2722:d891285e500f 2723:eaa6ac1e95ea
  1140 
  1140 
  1141 	glMatrixMode(GL_MODELVIEW);
  1141 	glMatrixMode(GL_MODELVIEW);
  1142 	// prepare default translation/scaling
  1142 	// prepare default translation/scaling
  1143 	glLoadIdentity();
  1143 	glLoadIdentity();
  1144 	glScalef(2.0 / cScreenWidth, -2.0 / cScreenHeight, 1.0);
  1144 	glScalef(2.0 / cScreenWidth, -2.0 / cScreenHeight, 1.0);
  1145 {$IFDEF IPHONEOS}
       
  1146 	//glRotatef(90, 0, 0, 1);
       
  1147 {$ENDIF}
       
  1148 	glTranslatef(0, -cScreenHeight / 2, 0);
  1145 	glTranslatef(0, -cScreenHeight / 2, 0);
  1149 
  1146 
  1150 	// enable alpha blending
  1147 	// enable alpha blending
  1151 	glEnable(GL_BLEND);
  1148 	glEnable(GL_BLEND);
  1152 	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  1149 	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  1161 	else // other scaling
  1158 	else // other scaling
  1162 	begin
  1159 	begin
  1163 		glPushMatrix; // save default scaling
  1160 		glPushMatrix; // save default scaling
  1164 		glLoadIdentity;
  1161 		glLoadIdentity;
  1165 		glScalef(f / cScreenWidth, -f / cScreenHeight, 1.0);
  1162 		glScalef(f / cScreenWidth, -f / cScreenHeight, 1.0);
  1166 {$IFDEF IPHONEOS}
       
  1167 		//glRotatef(90, 0, 0, 1);
       
  1168 {$ENDIF}
       
  1169 		glTranslatef(0, -cScreenHeight / 2, 0);
  1163 		glTranslatef(0, -cScreenHeight / 2, 0);
  1170 	end;
  1164 	end;
  1171 
  1165 
  1172 	cScaleFactor:= f;
  1166 	cScaleFactor:= f;
  1173 end;
  1167 end;