* fixed some compiler hints in delphi 7
[LazOpenGLCore.git] / glBitmap.pas
index b181705..b1b4c65 100644 (file)
@@ -11,7 +11,7 @@ not use this file except in compliance with the License. You may
 obtain a copy of the License at
 http://www.mozilla.org/MPL/MPL-1.1.html
 ------------------------------------------------------------
-Version 3.0.0 unstable
+Version 3.0.1
 ------------------------------------------------------------
 History
 20-11-2013
@@ -221,7 +221,7 @@ unit glBitmap;
 
 // Please uncomment the defines below to configure the glBitmap to your preferences.
 // If you have configured the unit you can uncomment the warning above.
-{.$MESSAGE warn 'Hey. I''m the glBitmap.pas and i need to be configured. My master tell me your preferences! ;)'}
+{$MESSAGE error 'Hey. I''m the glBitmap.pas and i need to be configured. My master tell me your preferences! ;)'}
 
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Preferences ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -238,7 +238,7 @@ unit glBitmap;
 // activate to enable the support for SDL_surfaces
 {.$DEFINE GLB_SDL}
 
-// activate  to enable the support for TBitmap from Delphi (not lazarus)
+// activate  to enable the support for Delphi (including support for Delphi's (not Lazarus') TBitmap)
 {.$DEFINE GLB_DELPHI}
 
 // activate to enable the support for TLazIntfImage from Lazarus
@@ -1236,7 +1236,6 @@ implementation
 
 uses
   Math, syncobjs, typinfo
-  {$IFDEF GLB_DELPHI}, Types{$ENDIF}
   {$IF DEFINED(GLB_SUPPORT_JPEG_READ) AND DEFINED(GLB_LAZ_JPEG)}, FPReadJPEG{$IFEND};
 
 type
@@ -5003,7 +5002,7 @@ var
     bfFormat: TbmpBitfieldFormat;
     pSourceLine, pDestLine: PByte;
     pSourceMD, pDestMD: Pointer;
-    x, y: Integer;
+    x, y: Cardinal;
     pixel: TglBitmapPixelData;
   begin
     bfFormat  := TbmpBitfieldFormat.Create;
@@ -5387,7 +5386,6 @@ var
   TempPtr: PByte;
   Size: Integer;
 begin
-  result := nil;
   Temp := (ClassType.Create as TglBitmap);
   try
     // copy texture data if assigned
@@ -8053,8 +8051,8 @@ end;
 procedure TglBitmap2D.GetDataFromTexture;
 var
   Temp: PByte;
-  TempWidth, TempHeight: Integer;
-  TempIntFormat: GLint;
+  TempWidth, TempHeight: GLint;
+  TempIntFormat: GLenum;
   IntFormat, f: TglBitmapFormat;
   FormatDesc: TFormatDescriptor;
 begin
@@ -8063,7 +8061,7 @@ begin
   // Request Data
   glGetTexLevelParameteriv(Target, 0, GL_TEXTURE_WIDTH,           @TempWidth);
   glGetTexLevelParameteriv(Target, 0, GL_TEXTURE_HEIGHT,          @TempHeight);
-  glGetTexLevelParameteriv(Target, 0, GL_TEXTURE_INTERNAL_FORMAT, @TempIntFormat);
+  glGetTexLevelParameteriv(Target, 0, GL_TEXTURE_INTERNAL_FORMAT, PGLint(@TempIntFormat));
 
   IntFormat := tfEmpty;
   for f := Low(TglBitmapFormat) to High(TglBitmapFormat) do begin