2006-04-12 01:59:08 +02:00
|
|
|
/**
|
|
|
|
* =========================================================================
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2004-06-03 20:37:07 +02:00
|
|
|
// RAGE! Win32 OpenGL headers are full of crap we have to emulate
|
|
|
|
// (must not include windows.h)
|
|
|
|
|
2006-06-22 20:26:08 +02:00
|
|
|
#ifndef WGL_HEADER_NEEDED
|
|
|
|
#error "wgl.h: why is this included from anywhere but ogl.h?"
|
2004-06-03 20:37:07 +02:00
|
|
|
#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
|
|
|
|
|
2004-06-09 17:48:47 +02:00
|
|
|
#ifndef DECLARE_HANDLE
|
2004-06-03 20:37:07 +02:00
|
|
|
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;
|
2005-12-11 23:23:55 +01:00
|
|
|
typedef int (*PROC)(void);
|
2004-06-03 20:37:07 +02:00
|
|
|
#define DECLARE_HANDLE(name) typedef HANDLE name
|
|
|
|
DECLARE_HANDLE(HDC);
|
|
|
|
DECLARE_HANDLE(HGLRC);
|
2004-06-09 17:48:47 +02:00
|
|
|
#endif
|
2004-06-03 20:37:07 +02:00
|
|
|
|
2006-02-03 21:45:36 +01:00
|
|
|
// VC6 doesn't define wchar_t as built-in type
|
|
|
|
#ifndef _WCHAR_T_DEFINED
|
2004-06-03 20:37:07 +02:00
|
|
|
typedef unsigned short wchar_t; // for glu.h
|
2006-02-03 21:45:36 +01:00
|
|
|
#define _WCHAR_T_DEFINED
|
|
|
|
#endif
|
2004-06-03 20:37:07 +02:00
|
|
|
|
|
|
|
WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC, HGLRC, UINT);
|
|
|
|
WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
|
|
|
|
WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int);
|
|
|
|
WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC);
|
2005-01-23 18:45:25 +01:00
|
|
|
WINGDIAPI HGLRC WINAPI wglGetCurrentContext(void);
|
|
|
|
WINGDIAPI HDC WINAPI wglGetCurrentDC(void);
|
2004-06-03 20:37:07 +02:00
|
|
|
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);
|
2004-06-11 04:14:18 +02:00
|
|
|
WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD);
|