- function dglGetProcAddress(ProcName: String): Pointer;
- begin
- Result := GetProcAddress(LibHandle, pchar(ProcName) );
- if result <> nil then
- exit;
- {$IFDEF Win32}
- if Addr(wglGetProcAddress) <> nil then
- Result := wglGetProcAddress( PChar(PAnsiChar(AnsiString(ProcName))) );
- {$ELSE}
- if Addr(glXGetProcAddress) <> nil then
- Result := glXGetProcAddress( pchar(ProcName) );
- if result <> nil then
- exit;
- if Addr(glXGetProcAddressARB) <> nil then
- Result := glXGetProcAddressARB( pchar(ProcName) );
- {$ENDIF}
- end;