include: Add DECLSPEC_IMPORT on OpenGL functions when not building opengl32.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-05-01 20:59:11 +02:00
parent 74799527b0
commit 8a576c9906
2 changed files with 27 additions and 20 deletions

View File

@ -1,4 +1,5 @@
MODULE = opengl32.dll MODULE = opengl32.dll
EXTRADEFS = -D_OPENGL32_
IMPORTLIB = opengl32 IMPORTLIB = opengl32
IMPORTS = user32 gdi32 advapi32 IMPORTS = user32 gdi32 advapi32
DELAYIMPORTS = glu32 DELAYIMPORTS = glu32

View File

@ -30,6 +30,12 @@ extern "C" {
#define WINGDIAPI DECLSPEC_IMPORT #define WINGDIAPI DECLSPEC_IMPORT
#endif #endif
#ifdef _OPENGL32_
#define WGLAPI
#else
#define WGLAPI DECLSPEC_IMPORT
#endif
typedef struct _ABCFLOAT { typedef struct _ABCFLOAT {
FLOAT abcfA; FLOAT abcfA;
FLOAT abcfB; FLOAT abcfB;
@ -3994,26 +4000,26 @@ WINGDIAPI BOOL WINAPI PolyTextOutW(HDC,const POLYTEXTW*,INT);
#define WGL_FONT_POLYGONS 1 #define WGL_FONT_POLYGONS 1
/* WGL prototypes */ /* WGL prototypes */
WINGDIAPI HGLRC WINAPI wglCreateContext(HDC); WGLAPI HGLRC WINAPI wglCreateContext(HDC);
WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC,INT); WGLAPI HGLRC WINAPI wglCreateLayerContext(HDC,INT);
WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC,HGLRC,UINT); WGLAPI BOOL WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC); WGLAPI BOOL WINAPI wglDeleteContext(HGLRC);
WINGDIAPI BOOL WINAPI wglDescribeLayerPlane(HDC,INT,INT,UINT,LPLAYERPLANEDESCRIPTOR); WGLAPI BOOL WINAPI wglDescribeLayerPlane(HDC,INT,INT,UINT,LPLAYERPLANEDESCRIPTOR);
WINGDIAPI HGLRC WINAPI wglGetCurrentContext(void); WGLAPI HGLRC WINAPI wglGetCurrentContext(void);
WINGDIAPI HDC WINAPI wglGetCurrentDC(void); WGLAPI HDC WINAPI wglGetCurrentDC(void);
WINGDIAPI INT WINAPI wglGetLayerPaletteEntries(HDC,INT,INT,INT,const COLORREF *); WGLAPI INT WINAPI wglGetLayerPaletteEntries(HDC,INT,INT,INT,const COLORREF *);
WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR); WGLAPI PROC WINAPI wglGetProcAddress(LPCSTR);
WINGDIAPI BOOL WINAPI wglMakeCurrent(HDC,HGLRC); WGLAPI BOOL WINAPI wglMakeCurrent(HDC,HGLRC);
WINGDIAPI BOOL WINAPI wglRealizeLayerPalette(HDC,INT,BOOL); WGLAPI BOOL WINAPI wglRealizeLayerPalette(HDC,INT,BOOL);
WINGDIAPI INT WINAPI wglSetLayerPaletteEntries(HDC,INT,INT,INT,const COLORREF *); WGLAPI INT WINAPI wglSetLayerPaletteEntries(HDC,INT,INT,INT,const COLORREF *);
WINGDIAPI BOOL WINAPI wglShareLists(HGLRC,HGLRC); WGLAPI BOOL WINAPI wglShareLists(HGLRC,HGLRC);
WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT); WGLAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC,DWORD,DWORD,DWORD); WGLAPI BOOL WINAPI wglUseFontBitmapsA(HDC,DWORD,DWORD,DWORD);
WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC,DWORD,DWORD,DWORD); WGLAPI BOOL WINAPI wglUseFontBitmapsW(HDC,DWORD,DWORD,DWORD);
#define wglUseFontBitmaps WINELIB_NAME_AW(wglUseFontBitmaps) #define wglUseFontBitmaps WINELIB_NAME_AW(wglUseFontBitmaps)
WINGDIAPI BOOL WINAPI wglUseFontOutlinesA(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,INT,LPGLYPHMETRICSFLOAT); WGLAPI BOOL WINAPI wglUseFontOutlinesA(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,INT,LPGLYPHMETRICSFLOAT);
WINGDIAPI BOOL WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,INT,LPGLYPHMETRICSFLOAT); WGLAPI BOOL WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,INT,LPGLYPHMETRICSFLOAT);
#define wglUseFontOutlines WINELIB_NAME_AW(wglUseFontOutlines) #define wglUseFontOutlines WINELIB_NAME_AW(wglUseFontOutlines)
#ifdef __cplusplus #ifdef __cplusplus
} }