1/*
2 * File: glwindows.h
3 * Purpose: Header for GLX implementation using native Windows OpenGL library
4 *
5 * Authors: Alexander Gottwald
6 *          Jon TURNEY
7 *
8 * Copyright (c) Jon TURNEY 2009
9 * Copyright (c) Alexander Gottwald 2004
10 *
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included in
20 * all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
26 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 * DEALINGS IN THE SOFTWARE.
29 */
30
31
32#include <GL/gl.h>
33
34typedef struct {
35    unsigned int enableDebug : 1;
36    unsigned int enableTrace : 1;
37    unsigned int dumpPFD : 1;
38    unsigned int dumpHWND : 1;
39    unsigned int dumpDC : 1;
40    unsigned int enableGLcallTrace : 1;
41    unsigned int enableWGLcallTrace :1;
42} glxWinDebugSettingsRec;
43
44extern glxWinDebugSettingsRec glxWinDebugSettings;
45
46void glWinCallDelta(void);
47void glxWinPushNativeProvider(void);
48const GLubyte* glGetStringWrapperNonstatic(GLenum name);
49void glAddSwapHintRectWINWrapperNonstatic(GLint x, GLint y, GLsizei width, GLsizei height);
50void glWinSetupDispatchTable(void);
51
52#if 1
53#define GLWIN_TRACE_MSG(msg, args...) if (glxWinDebugSettings.enableTrace) ErrorF(msg " [%s:%d]\n" , ##args , __FUNCTION__, __LINE__ )
54#define GLWIN_DEBUG_MSG(msg, args...) if (glxWinDebugSettings.enableDebug) ErrorF(msg " [%s:%d]\n" , ##args , __FUNCTION__, __LINE__ )
55#else
56#define GLWIN_TRACE_MSG(a, ...)
57#define GLWIN_DEBUG_MSG(a, ...)
58#endif
59