diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 05d7ce1b1e6..477eecd10cd 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -258,7 +258,7 @@ HGLRC WINAPI wglGetCurrentContext(void) { TRACE(" returning %p (GL context %p)\n", ret, gl_ctx); - return ret; + return (HGLRC)ret; } /*********************************************************************** diff --git a/dlls/opengl32/wgl.h b/dlls/opengl32/wgl.h index b7e43e1aa22..ea6d81014c6 100644 --- a/dlls/opengl32/wgl.h +++ b/dlls/opengl32/wgl.h @@ -22,50 +22,6 @@ #include "wingdi.h" -typedef void *HGLRC; - -typedef struct { - WORD nSize; - WORD nVersion; - DWORD dwFlags; - BYTE iPixelType; - BYTE cColorBits; - BYTE cRedBits; - BYTE cRedShift; - BYTE cGreenBits; - BYTE cGreenShift; - BYTE cBlueBits; - BYTE cBlueShift; - BYTE cAlphaBits; - BYTE cAlphaShift; - BYTE cAccumBits; - BYTE cAccumRedBits; - BYTE cAccumGreenBits; - BYTE cAccumBlueBits; - BYTE cAccumAlphaBits; - BYTE cDepthBits; - BYTE cStencilBits; - BYTE cAuxBuffers; - BYTE iLayerPlane; - BYTE bReserved; - COLORREF crTransparent; -} LAYERPLANEDESCRIPTOR; -typedef LAYERPLANEDESCRIPTOR* LPLAYERPLANEDESCRIPTOR; - -typedef struct { - FLOAT x; - FLOAT y; -} POINTFLOAT; - -typedef struct { - FLOAT gmfBlackBoxX; - FLOAT gmfBlackBoxY; - POINTFLOAT gmfptGlyphOrigin; - FLOAT gmfCellIncX; - FLOAT gmfCellIncY; -} GLYPHMETRICSFLOAT; -typedef GLYPHMETRICSFLOAT *LPGLYPHMETRICSFLOAT; - HGLRC WINAPI wglCreateContext(HDC hdc) ; HGLRC WINAPI wglCreateLayerContext(HDC hdc, int iLayerPlane) ; diff --git a/include/windef.h b/include/windef.h index ab2ab1cd4a8..4578721a8f4 100644 --- a/include/windef.h +++ b/include/windef.h @@ -225,6 +225,7 @@ DECLARE_HANDLE(HDC); DECLARE_HANDLE(HDESK); DECLARE_HANDLE(HENHMETAFILE); DECLARE_HANDLE(HFONT); +DECLARE_HANDLE(HGLRC); DECLARE_HANDLE(HHOOK); DECLARE_HANDLE(HICON); DECLARE_HANDLE(HINSTANCE); diff --git a/include/wingdi.h b/include/wingdi.h index c80e860e614..d9d63eeafe5 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -1407,6 +1407,47 @@ typedef struct #define TT_PRIM_CSPLINE 3 #define TT_POLYGON_TYPE 24 + /* OpenGL defines */ +typedef struct { + FLOAT x; + FLOAT y; +} POINTFLOAT, *PPOINTFLOAT; + +typedef struct { + FLOAT gmfBlackBoxX; + FLOAT gmfBlackBoxY; + POINTFLOAT gmfptGlyphOrigin; + FLOAT gmfCellIncX; + FLOAT gmfCellIncY; +} GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT; + +typedef struct { + WORD nSize; + WORD nVersion; + DWORD dwFlags; + BYTE iPixelType; + BYTE cColorBits; + BYTE cRedBits; + BYTE cRedShift; + BYTE cGreenBits; + BYTE cGreenShift; + BYTE cBlueBits; + BYTE cBlueShift; + BYTE cAlphaBits; + BYTE cAlphaShift; + BYTE cAccumBits; + BYTE cAccumRedBits; + BYTE cAccumGreenBits; + BYTE cAccumBlueBits; + BYTE cAccumAlphaBits; + BYTE cDepthBits; + BYTE cStencilBits; + BYTE cAuxBuffers; + BYTE iLayerPlane; + BYTE bReserved; + COLORREF crTransparent; +} LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR; + /* Get/SetSystemPaletteUse() values */ #define SYSPAL_ERROR 0 #define SYSPAL_STATIC 1