hedgewars/uStore.pas
changeset 2735 f2008d0ce3f8
parent 2724 601158aaa201
child 2747 7889a3a9724f
equal deleted inserted replaced
2734:fb9ad1587054 2735:f2008d0ce3f8
    80 
    80 
    81 
    81 
    82 implementation
    82 implementation
    83 uses uMisc, uConsole, uLand, uLocale, uWorld{$IFDEF IPHONEOS}, PascalExports{$ENDIF};
    83 uses uMisc, uConsole, uLand, uLocale, uWorld{$IFDEF IPHONEOS}, PascalExports{$ENDIF};
    84 
    84 
    85 type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel);
    85 type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple);
    86 
    86 
    87 var HHTexture: PTexture;
    87 var HHTexture: PTexture;
    88     MaxTextureSize: Integer;
    88     MaxTextureSize: Integer;
    89     {$IFNDEF IPHONEOS}cGPUVendor: TGPUVendor;{$ENDIF}
    89     cGPUVendor: TGPUVendor;
    90 
    90 
    91 procedure DrawRoundRect(rect: PSDL_Rect; BorderColor, FillColor: Longword; Surface: PSDL_Surface; Clear: boolean);
    91 procedure DrawRoundRect(rect: PSDL_Rect; BorderColor, FillColor: Longword; Surface: PSDL_Surface; Clear: boolean);
    92 var r: TSDL_Rect;
    92 var r: TSDL_Rect;
    93 begin
    93 begin
    94 r:= rect^;
    94 r:= rect^;
  1131 	else if StrPos(Str2PChar(vendor), Str2PChar('intel')) <> nil then
  1131 	else if StrPos(Str2PChar(vendor), Str2PChar('intel')) <> nil then
  1132 		cGPUVendor:= gvATI
  1132 		cGPUVendor:= gvATI
  1133 	else if StrPos(Str2PChar(vendor), Str2PChar('ati')) <> nil then
  1133 	else if StrPos(Str2PChar(vendor), Str2PChar('ati')) <> nil then
  1134 		cGPUVendor:= gvIntel;
  1134 		cGPUVendor:= gvIntel;
  1135 //SupportNPOTT:= glLoadExtension('GL_ARB_texture_non_power_of_two');
  1135 //SupportNPOTT:= glLoadExtension('GL_ARB_texture_non_power_of_two');
       
  1136 {$ELSE}
       
  1137 	cGPUVendor:= gvApple;
       
  1138 {$ENDIF}
       
  1139 
       
  1140 {$IFDEF DEBUGFILE}
       
  1141 	if cGPUVendor = gvUnknown then
       
  1142 		AddFileLog('OpenGL Warning - unknown hardware vendor; please report');
       
  1143 {$ELSE}
       
  1144 	// just avoid 'never used' compiler warning for now
       
  1145 	if cGPUVendor = gvUnknown then cGPUVendor:= gvUnknown;
  1136 {$ENDIF}
  1146 {$ENDIF}
  1137 
  1147 
  1138 	// set view port to whole window
  1148 	// set view port to whole window
  1139 {$IFDEF IPHONEOS}
  1149 {$IFDEF IPHONEOS}
  1140 	glViewport(0, 0, cScreenHeight, cScreenWidth);
  1150 	glViewport(0, 0, cScreenHeight, cScreenWidth);