Browse Source

* Include local ChoosePixelFormat def

peter 22 years ago
parent
commit
d88436f131
1 changed files with 5 additions and 1 deletions
  1. 5 1
      packages/extra/opengl/gl.pp

+ 5 - 1
packages/extra/opengl/gl.pp

@@ -1539,6 +1539,10 @@ procedure FreeOpenGL;
 
 
 implementation
 implementation
 
 
+{$ifdef win32}
+function WinChoosePixelFormat(DC: HDC; p2: PPixelFormatDescriptor): Integer; extdecl; external 'gdi32' name 'ChoosePixelFormat';
+{$endif}
+
 procedure FreeOpenGL;
 procedure FreeOpenGL;
 begin
 begin
 
 
@@ -2234,7 +2238,7 @@ begin
   {$IFDEF Win32}
   {$IFDEF Win32}
   @ChoosePixelFormat := GetProcAddress(LibGL, 'ChoosePixelFormat');
   @ChoosePixelFormat := GetProcAddress(LibGL, 'ChoosePixelFormat');
   if not Assigned(ChoosePixelFormat) then
   if not Assigned(ChoosePixelFormat) then
-    @ChoosePixelFormat := @Windows.ChoosePixelFormat;
+    @ChoosePixelFormat := @WinChoosePixelFormat;
   {$ENDIF}
   {$ENDIF}
 
 
 end;
 end;