;
type
- // Needed for Delphi 6 and less (defined in system.pas for Delphi 7)
- PPointer = ^Pointer;
- PCardinal = ^Cardinal;
+ {$IFDEF DELPHI6_AND_DOWN}
+ // Delphi 6 compatibility
+ PPointer = ^Pointer;
+ PCardinal = ^Cardinal;
+ {$ENDIF}
GLenum = Cardinal;
GLboolean = BYTEBOOL;
// GL_ARB_imaging
GL_CONSTANT_COLOR_ARB = $8001;
+ GL_CONSTANT_COLOR = $8001;
GL_ONE_MINUS_CONSTANT_COLOR = $8002;
GL_CONSTANT_ALPHA = $8003;
GL_ONE_MINUS_CONSTANT_ALPHA = $8004;
function dglLoadLibrary(Name: PChar): Pointer;
begin
{$IFDEF DGL_WIN}
- Result := Pointer(LoadLibrary(Name));
+ Result := {%H-}Pointer(LoadLibrary(Name));
{$ENDIF}
{$IFDEF DGL_LINUX}
Result := False
else
{$IFDEF DGL_WIN}
- Result := FreeLibrary(HMODULE(LibHandle));
+ Result := FreeLibrary({%H-}HMODULE(LibHandle));
{$ENDIF}
{$IFDEF DGL_LINUX}
{$IFDEF DGL_WIN}
- Result := GetProcAddress(HMODULE(LibHandle), ProcName);
+ Result := GetProcAddress({%H-}HMODULE(LibHandle), ProcName);
if result <> nil then
exit;
function Int_GetExtensionString: AnsiString;
var
- ExtensionCount : GLuint;
+ ExtensionCount : GLint;
i : Integer;
begin
if GL_VERSION_3_0
Buffer: String;
MajorVersion, MinorVersion: Integer;
- procedure TrimAndSplitVersionString(Buffer: String; var Max, Min: Integer);
+ procedure TrimAndSplitVersionString(Buffer: String; out Max, Min: Integer);
// Peels out the X.Y form from the given Buffer which must contain a version string like "text Minor.Major.Build text"
// at least however "Major.Minor".
var
if GL_LibHandle = nil then
InitOpenGL;
- FillChar(PFDescriptor, SizeOf(PFDescriptor), 0);
+ FillChar(PFDescriptor{%H-}, SizeOf(PFDescriptor), 0);
with PFDescriptor do
begin
if not Assigned(GL_LibHandle) then
raise Exception.Create('GL_LibHandle is NIL. Could not load OpenGL library!');
- FillChar(PFDescriptor, SizeOf(PFDescriptor), 0);
+ FillChar(PFDescriptor{%H-}, SizeOf(PFDescriptor), 0);
with PFDescriptor do
begin
{$IFDEF CPU386}
Set8087CW($133F);
- {$IFDEF DGL_64BIT}
+{$ENDIF}
+{$IFDEF DGL_64BIT}
SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide,exOverflow, exUnderflow, exPrecision]);
- {$ENDIF}
{$ENDIF}
+
finalization
end.