Alan Hourihane | 485438e | 2004-04-20 11:13:11 +0000 | [diff] [blame] | 1 | /**************************************************************************** |
| 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 | |
| 58 | typedef struct { |
| 59 | PROC proc; |
| 60 | char *name; |
| 61 | } DGL_extension; |
| 62 | |
Brian Paul | b3aefd1 | 2005-09-19 20:12:32 +0000 | [diff] [blame] | 63 | #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 */ |
| 79 | typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR; |
| 80 | typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT; |
| 81 | typedef 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 Hourihane | 485438e | 2004-04-20 11:13:11 +0000 | [diff] [blame] | 88 | /*------------------------- Function Prototypes ---------------------------*/ |
| 89 | |
| 90 | #ifdef __cplusplus |
| 91 | extern "C" { |
| 92 | #endif |
| 93 | |
| 94 | #ifndef _USE_GLD3_WGL |
| 95 | int APIENTRY DGL_ChoosePixelFormat(HDC a, CONST PIXELFORMATDESCRIPTOR *ppfd); |
| 96 | BOOL APIENTRY DGL_CopyContext(HGLRC a, HGLRC b, UINT c); |
| 97 | HGLRC APIENTRY DGL_CreateContext(HDC a); |
| 98 | HGLRC APIENTRY DGL_CreateLayerContext(HDC a, int b); |
| 99 | BOOL APIENTRY DGL_DeleteContext(HGLRC a); |
| 100 | BOOL APIENTRY DGL_DescribeLayerPlane(HDC a, int b, int c, UINT d, LPLAYERPLANEDESCRIPTOR e); |
| 101 | int APIENTRY DGL_DescribePixelFormat(HDC a, int b, UINT c, LPPIXELFORMATDESCRIPTOR d); |
| 102 | HGLRC APIENTRY DGL_GetCurrentContext(void); |
| 103 | HDC APIENTRY DGL_GetCurrentDC(void); |
| 104 | PROC APIENTRY DGL_GetDefaultProcAddress(LPCSTR a); |
| 105 | int APIENTRY DGL_GetLayerPaletteEntries(HDC a, int b, int c, int d, COLORREF *e); |
| 106 | int APIENTRY DGL_GetPixelFormat(HDC a); |
| 107 | PROC APIENTRY DGL_GetProcAddress(LPCSTR a); |
| 108 | BOOL APIENTRY DGL_MakeCurrent(HDC a, HGLRC b); |
| 109 | BOOL APIENTRY DGL_RealizeLayerPalette(HDC a, int b, BOOL c); |
| 110 | int APIENTRY DGL_SetLayerPaletteEntries(HDC a, int b, int c, int d, CONST COLORREF *e); |
| 111 | BOOL APIENTRY DGL_SetPixelFormat(HDC a, int b, CONST PIXELFORMATDESCRIPTOR *c); |
| 112 | BOOL APIENTRY DGL_ShareLists(HGLRC a, HGLRC b); |
| 113 | BOOL APIENTRY DGL_SwapBuffers(HDC a); |
| 114 | BOOL APIENTRY DGL_SwapLayerBuffers(HDC a, UINT b); |
| 115 | BOOL APIENTRY DGL_UseFontBitmapsA(HDC a, DWORD b, DWORD c, DWORD d); |
| 116 | BOOL APIENTRY DGL_UseFontBitmapsW(HDC a, DWORD b, DWORD c, DWORD d); |
| 117 | BOOL APIENTRY DGL_UseFontOutlinesA(HDC a, DWORD b, DWORD c, DWORD d, FLOAT e, FLOAT f, int g, LPGLYPHMETRICSFLOAT h); |
| 118 | BOOL 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øgsberg | f9995b3 | 2010-10-12 12:26:10 -0400 | [diff] [blame] | 121 | BOOL dglWglResizeBuffers(struct gl_context *ctx, BOOL bDefaultDriver); |
Alan Hourihane | 485438e | 2004-04-20 11:13:11 +0000 | [diff] [blame] | 122 | |
| 123 | #ifdef __cplusplus |
| 124 | } |
| 125 | #endif |
| 126 | |
| 127 | #endif |