janwas
ee4c7965dd
* app_hooks: add display_error; can be used by atlas to override our dialog box * lots of small fixes (mostly pertaining to headers) * debug: clean up display_error, protect from reentrancy, fix a few edge cases (e.g. error message from dtor -> exit pressed -> suppress all subsequent errors) * delay_load: add warning: NLSO ctors are unreliable since we're compiling into static lib This was SVN commit r4009.
79 lines
2.3 KiB
C
79 lines
2.3 KiB
C
/**
|
|
* =========================================================================
|
|
* File : wgl.cpp
|
|
* Project : 0 A.D.
|
|
* Description : Windows definitions required for GL/gl.h
|
|
*
|
|
* @author Jan.Wassenberg@stud.uni-karlsruhe.de
|
|
* =========================================================================
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2002-2003 Jan Wassenberg
|
|
*
|
|
* Redistribution and/or modification are also permitted under the
|
|
* terms of the GNU General Public License as published by the
|
|
* Free Software Foundation (version 2 or later, at your option).
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
*/
|
|
|
|
// RAGE! Win32 OpenGL headers are full of crap we have to emulate
|
|
// (must not include windows.h)
|
|
|
|
#ifndef WGL_HEADER_NEEDED
|
|
#error "wgl.h: why is this included from anywhere but ogl.h?"
|
|
#endif
|
|
|
|
|
|
#ifndef WINGDIAPI
|
|
#define WINGDIAPI __declspec(dllimport)
|
|
#endif
|
|
#ifndef CALLBACK
|
|
#define CALLBACK __stdcall
|
|
#endif
|
|
#ifndef APIENTRY
|
|
#define APIENTRY __stdcall
|
|
#endif
|
|
#ifndef WINAPI
|
|
#define WINAPI __stdcall
|
|
#endif
|
|
|
|
#ifndef DECLARE_HANDLE
|
|
typedef void VOID;
|
|
typedef void* LPVOID;
|
|
typedef int BOOL;
|
|
typedef unsigned short USHORT;
|
|
typedef unsigned int UINT;
|
|
typedef unsigned long DWORD;
|
|
typedef int INT32;
|
|
typedef __int64 INT64;
|
|
typedef float FLOAT;
|
|
typedef const char* LPCSTR;
|
|
typedef void* HANDLE;
|
|
typedef int (*PROC)(void);
|
|
#define DECLARE_HANDLE(name) typedef HANDLE name
|
|
DECLARE_HANDLE(HDC);
|
|
DECLARE_HANDLE(HGLRC);
|
|
#endif
|
|
|
|
// VC6 doesn't define wchar_t as built-in type
|
|
#ifndef _WCHAR_T_DEFINED
|
|
typedef unsigned short wchar_t; // for glu.h
|
|
#define _WCHAR_T_DEFINED
|
|
#endif
|
|
|
|
WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC, HGLRC, UINT);
|
|
WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
|
|
WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int);
|
|
WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC);
|
|
WINGDIAPI HGLRC WINAPI wglGetCurrentContext(void);
|
|
WINGDIAPI HDC WINAPI wglGetCurrentDC(void);
|
|
WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR);
|
|
WINGDIAPI BOOL WINAPI wglMakeCurrent(HDC, HGLRC);
|
|
WINGDIAPI BOOL WINAPI wglShareLists(HGLRC, HGLRC);
|
|
WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC, DWORD, DWORD, DWORD);
|
|
WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD);
|