blob: 3e7e5892ca57c80548c00ab8e69bb1d546e521b3 [file] [log] [blame]
Alan Hourihane485438e2004-04-20 11:13:11 +00001/****************************************************************************
2*
3* Mesa 3-D graphics library
4* Direct3D Driver Interface
5*
6* ========================================================================
7*
8* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
9*
10* Permission is hereby granted, free of charge, to any person obtaining a
11* copy of this software and associated documentation files (the "Software"),
12* to deal in the Software without restriction, including without limitation
13* the rights to use, copy, modify, merge, publish, distribute, sublicense,
14* and/or sell copies of the Software, and to permit persons to whom the
15* Software is furnished to do so, subject to the following conditions:
16*
17* The above copyright notice and this permission notice shall be included
18* in all copies or substantial portions of the Software.
19*
20* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23* SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
25* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26* SOFTWARE.
27*
28* ======================================================================
29*
30* Language: ANSI C
31* Environment: Windows 9x (Win32)
32*
33* Description: OpenGL window functions (wgl*).
34*
35****************************************************************************/
36
37#ifndef __DGLWGL_H
38#define __DGLWGL_H
39
40// Disable compiler complaints about DLL linkage
41#pragma warning (disable:4273)
42
43// Macros to control compilation
44#define STRICT
45#define WIN32_LEAN_AND_MEAN
46
47#include <windows.h>
48#include <GL\gl.h>
49
50#include "dglcontext.h"
51#include "dglglobals.h"
52#include "dglmacros.h"
53#include "ddlog.h"
54#include "dglpf.h"
55
56/*---------------------- Macros and type definitions ----------------------*/
57
58typedef struct {
59 PROC proc;
60 char *name;
61} DGL_extension;
62
Brian Paulb3aefd12005-09-19 20:12:32 +000063#ifndef __MINGW32__
64/* XXX why is this here?
65 * It should probaby be somewhere in src/mesa/drivers/windows/
66 */
67#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_WINGDI_H) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(BUILD_FOR_SNAP)
68# define WGL_FONT_LINES 0
69# define WGL_FONT_POLYGONS 1
70#ifndef _GNU_H_WINDOWS32_FUNCTIONS
71# ifdef UNICODE
72# define wglUseFontBitmaps wglUseFontBitmapsW
73# define wglUseFontOutlines wglUseFontOutlinesW
74# else
75# define wglUseFontBitmaps wglUseFontBitmapsA
76# define wglUseFontOutlines wglUseFontOutlinesA
77# endif /* !UNICODE */
78#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
79typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
80typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
81typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
82#if !defined(GLX_USE_MESA)
83#include <GL/mesa_wgl.h>
84#endif
85#endif
86#endif /* !__MINGW32__ */
87
Alan Hourihane485438e2004-04-20 11:13:11 +000088/*------------------------- Function Prototypes ---------------------------*/
89
90#ifdef __cplusplus
91extern "C" {
92#endif
93
94#ifndef _USE_GLD3_WGL
95int APIENTRY DGL_ChoosePixelFormat(HDC a, CONST PIXELFORMATDESCRIPTOR *ppfd);
96BOOL APIENTRY DGL_CopyContext(HGLRC a, HGLRC b, UINT c);
97HGLRC APIENTRY DGL_CreateContext(HDC a);
98HGLRC APIENTRY DGL_CreateLayerContext(HDC a, int b);
99BOOL APIENTRY DGL_DeleteContext(HGLRC a);
100BOOL APIENTRY DGL_DescribeLayerPlane(HDC a, int b, int c, UINT d, LPLAYERPLANEDESCRIPTOR e);
101int APIENTRY DGL_DescribePixelFormat(HDC a, int b, UINT c, LPPIXELFORMATDESCRIPTOR d);
102HGLRC APIENTRY DGL_GetCurrentContext(void);
103HDC APIENTRY DGL_GetCurrentDC(void);
104PROC APIENTRY DGL_GetDefaultProcAddress(LPCSTR a);
105int APIENTRY DGL_GetLayerPaletteEntries(HDC a, int b, int c, int d, COLORREF *e);
106int APIENTRY DGL_GetPixelFormat(HDC a);
107PROC APIENTRY DGL_GetProcAddress(LPCSTR a);
108BOOL APIENTRY DGL_MakeCurrent(HDC a, HGLRC b);
109BOOL APIENTRY DGL_RealizeLayerPalette(HDC a, int b, BOOL c);
110int APIENTRY DGL_SetLayerPaletteEntries(HDC a, int b, int c, int d, CONST COLORREF *e);
111BOOL APIENTRY DGL_SetPixelFormat(HDC a, int b, CONST PIXELFORMATDESCRIPTOR *c);
112BOOL APIENTRY DGL_ShareLists(HGLRC a, HGLRC b);
113BOOL APIENTRY DGL_SwapBuffers(HDC a);
114BOOL APIENTRY DGL_SwapLayerBuffers(HDC a, UINT b);
115BOOL APIENTRY DGL_UseFontBitmapsA(HDC a, DWORD b, DWORD c, DWORD d);
116BOOL APIENTRY DGL_UseFontBitmapsW(HDC a, DWORD b, DWORD c, DWORD d);
117BOOL APIENTRY DGL_UseFontOutlinesA(HDC a, DWORD b, DWORD c, DWORD d, FLOAT e, FLOAT f, int g, LPGLYPHMETRICSFLOAT h);
118BOOL APIENTRY DGL_UseFontOutlinesW(HDC a, DWORD b, DWORD c, DWORD d, FLOAT e, FLOAT f, int g, LPGLYPHMETRICSFLOAT h);
119#endif //_USE_GLD3_WGL
120
Kristian Høgsbergf9995b32010-10-12 12:26:10 -0400121BOOL dglWglResizeBuffers(struct gl_context *ctx, BOOL bDefaultDriver);
Alan Hourihane485438e2004-04-20 11:13:11 +0000122
123#ifdef __cplusplus
124}
125#endif
126
127#endif