45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef HAVE_DIX_CONFIG_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <dix-config.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/Xwindows.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <GL/gl.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <GL/glext.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <glxserver.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <glxext.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <windowstr.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <resource.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <GL/glxint.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <GL/glxtokens.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <scrnintstr.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <glxserver.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <glxscreens.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <glxdrawable.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <glxcontext.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <glxext.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <glxutil.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <glxscreens.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <GL/internal/glcore.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <stdlib.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned enableDebug : 1;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned enableTrace : 1;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned dumpPFD : 1;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned dumpHWND : 1;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned dumpDC : 1;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} glWinDebugSettingsRec, *glWinDebugSettingsPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern glWinDebugSettingsRec glWinDebugSettings;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync int num_vis;
45e9809aff7304721fddb95654901b32195c9c7avboxsync __GLcontextModes *modes;
45e9809aff7304721fddb95654901b32195c9c7avboxsync void **priv;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* wrapped screen functions */
45e9809aff7304721fddb95654901b32195c9c7avboxsync RealizeWindowProcPtr RealizeWindow;
45e9809aff7304721fddb95654901b32195c9c7avboxsync UnrealizeWindowProcPtr UnrealizeWindow;
45e9809aff7304721fddb95654901b32195c9c7avboxsync CopyWindowProcPtr CopyWindow;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} glWinScreenRec;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern glWinScreenRec glWinScreens[MAXSCREENS];
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define glWinGetScreenPriv(pScreen) &glWinScreens[pScreen->myNum]
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define glWinScreenPriv(pScreen) glWinScreenRec *pScreenPriv = glWinGetScreenPriv(pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#if 1
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define GLWIN_TRACE() if (glWinDebugSettings.enableTrace) ErrorF("%s:%d: Trace\n", __FUNCTION__, __LINE__ )
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define GLWIN_TRACE_MSG(msg, args...) if (glWinDebugSettings.enableTrace) ErrorF("%s:%d: " msg, __FUNCTION__, __LINE__, ##args )
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define GLWIN_DEBUG_MSG(msg, args...) if (glWinDebugSettings.enableDebug) ErrorF("%s:%d: " msg, __FUNCTION__, __LINE__, ##args )
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define GLWIN_DEBUG_MSG2(msg, args...) if (glWinDebugSettings.enableDebug) ErrorF(msg, ##args )
45e9809aff7304721fddb95654901b32195c9c7avboxsync#else
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define GLWIN_TRACE()
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define GLWIN_TRACE_MSG(a, ...)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define GLWIN_DEBUG_MSG(a, ...)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define GLWIN_DEBUG_MSG2(a, ...)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync