22#ifndef OPENGL_GETINFO_DRVNAME
23#define OPENGL_GETINFO_DRVNAME 0
70 HKEY DrvKey, CustomKey;
99 ERR(
"Forcing ReactOS Software Implementation\n");
117 dwInput =
sizeof(DriverVersion);
155 ERR(
"Driver claims to support OPENGL_GETINFO escape code, but doesn't. ret: %X\n",
ret);
172 TRACE(
"Found already loaded %p.\n",
data);
183 ERR(
"Failed to open the OpenGLDrivers key.\n");
190 TRACE(
"No driver subkey for %S, trying to get DLL name directly.\n", pDrvInfo->
DriverName);
191 dwInput =
sizeof(DllName);
195 ERR(
"Unable to get ICD DLL name!\n");
200 TRACE(
"DLL name is %S.\n", DllName);
205 TRACE(
"Querying details from registry for %S.\n", pDrvInfo->
DriverName);
206 dwInput =
sizeof(DllName);
210 ERR(
"Unable to get ICD DLL name!.\n");
220 WARN(
"No version in driver subkey\n");
224 ERR(
"Version mismatch between registry (%lu) and display driver (%lu).\n",
Version, pDrvInfo->
Version);
230 dwInput =
sizeof(DriverVersion);
234 WARN(
"No driver version in driver subkey\n");
238 ERR(
"Driver version mismatch between registry (%lu) and display driver (%lu).\n", DriverVersion, pDrvInfo->
DriverVersion);
244 dwInput =
sizeof(
Flags);
248 WARN(
"No driver version in driver subkey\n");
254 TRACE(
"DLL name is %S, Version %lx, DriverVersion %lx, Flags %lx.\n", DllName,
Version, DriverVersion,
Flags);
263 ERR(
"Unable to allocate ICD data!\n");
271 ERR(
"Could not load the ICD DLL: %S.\n", DllName);
282 if(DrvValidateVersion)
286 ERR(
"DrvValidateVersion failed!.\n");
293 if(DrvSetCallbackProcs)
303#define DRV_LOAD(x) do \
305 data->x = (void*)GetProcAddress(data->hModule, #x); \
307 ERR("%S lacks " #x "!\n", DllName); \
317 DRV_LOAD(DrvGetLayerPaletteEntries);
322 DRV_LOAD(DrvSetLayerPaletteEntries);
334 TRACE(
"Forwarding WGL calls to win32k!\n");
348 TRACE(
"ICD driver %S (%S) successfully loaded.\n", pDrvInfo->
DriverName, DllName);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
void IntDeleteAllICDs(void)
BOOL APIENTRY GdiSetPixelFormat(HDC hdc, INT ipfd)
#define OPENGL_GETINFO_DRVNAME
struct ICD_Data * IntGetIcdData(HDC hdc)
static void APIENTRY wglSetCurrentValue(PVOID value)
static CRITICAL_SECTION icdload_cs
BOOL APIENTRY GdiSwapBuffers(HDC hdc)
static struct ICD_Data * ICD_Data_List
static CUSTOM_DRIVER_STATE CustomDriverState
static const WCHAR OpenGLDrivers_Key[]
static DHGLRC APIENTRY wglGetDHGLRC(struct wgl_context *context)
struct Drv_Opengl_Info * pDrv_Opengl_Info
INT APIENTRY GdiDescribePixelFormat(HDC hdc, INT ipfd, UINT cjpfd, PPIXELFORMATDESCRIPTOR ppfd)
static const WCHAR CustomDrivers_Key[]
static PVOID APIENTRY wglGetCurrentValue()
static Drv_Opengl_Info CustomDrvInfo
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
FORCEINLINE void IntSetCurrentICDPrivate(void *value)
FORCEINLINE void * IntGetCurrentICDPrivate(void)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
WCHAR DriverName[MAX_PATH+1]
const GLCLTPROCTABLE *WINAPI * DrvSetContext(HDC hdc, DHGLRC hglrc, PFN_SETPROCTABLE callback)
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
FN_DrvDescribePixelFormat DrvDescribePixelFormat
FN_DrvSetPixelFormat DrvSetPixelFormat
_In_ LONG _In_ ULONG cjpfd
_In_ LONG _In_ ULONG _Out_opt_ PIXELFORMATDESCRIPTOR * ppfd
FN_DrvSwapBuffers DrvSwapBuffers
int WINAPI ExtEscape(_In_ HDC hdc, _In_ int iEscape, _In_ int cjInput, _In_reads_bytes_opt_(cjInput) LPCSTR lpInData, _In_ int cjOutput, _Out_writes_bytes_opt_(cjOutput) LPSTR lpOutData)
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
_Must_inspect_result_ _In_ ULONG Flags