Imported Upstream version 1.15.1
[deb_xorg-server.git] / hw / xwin / glx / glwindows.h
CommitLineData
a09e091a
JB
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#include <GL/gl.h>
32
33typedef struct {
34 unsigned int enableDebug:1;
35 unsigned int enableTrace:1;
36 unsigned int dumpPFD:1;
37 unsigned int dumpHWND:1;
38 unsigned int dumpDC:1;
39 unsigned int enableGLcallTrace:1;
40 unsigned int enableWGLcallTrace:1;
41} glxWinDebugSettingsRec;
42
43extern glxWinDebugSettingsRec glxWinDebugSettings;
44
45void glxWinPushNativeProvider(void);
46void glAddSwapHintRectWINWrapper(GLint x, GLint y, GLsizei width, GLsizei height);
47int glWinSelectImplementation(int native);
48
49#if 1
50#define GLWIN_TRACE_MSG(msg, args...) if (glxWinDebugSettings.enableTrace) ErrorF(msg " [%s:%d]\n" , ##args , __FUNCTION__, __LINE__ )
51#define GLWIN_DEBUG_MSG(msg, args...) if (glxWinDebugSettings.enableDebug) ErrorF(msg " [%s:%d]\n" , ##args , __FUNCTION__, __LINE__ )
52#else
53#define GLWIN_TRACE_MSG(a, ...)
54#define GLWIN_DEBUG_MSG(a, ...)
55#endif