X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffg_internal_x11.h;h=2a3020f54021f13f9314df449ea68f730201b4b7;hb=99d53f15a4216240088132f6af9cb194b519b1cc;hp=8a8e197431c096fab5b63b2eb389d55b97cae1f2;hpb=5b3d339481bac6dbaeb599bffc1325f716585bfe;p=freeglut diff --git a/src/x11/fg_internal_x11.h b/src/x11/fg_internal_x11.h index 8a8e197..2a3020f 100644 --- a/src/x11/fg_internal_x11.h +++ b/src/x11/fg_internal_x11.h @@ -30,7 +30,12 @@ /* -- PLATFORM-SPECIFIC INCLUDES ------------------------------------------- */ +#ifdef EGL_VERSION_1_0 +#include "egl/fg_internal_egl.h" +#else #include +#include "x11/fg_internal_x11_glx.h" +#endif #include #include #include @@ -41,15 +46,6 @@ #ifdef HAVE_X11_EXTENSIONS_XRANDR_H # include #endif -/* If GLX is too old, we will fail during runtime when multisampling - is requested, but at least freeglut compiles. */ -#ifndef GLX_SAMPLE_BUFFERS -# define GLX_SAMPLE_BUFFERS 0x80A8 -#endif -#ifndef GLX_SAMPLES -# define GLX_SAMPLES 0x80A9 -#endif - /* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */ @@ -83,6 +79,10 @@ struct tagSFG_PlatformDisplay int DisplayViewPortY; /* saved Y location of the viewport */ #endif /* HAVE_X11_EXTENSIONS_XF86VMODE_H */ +#ifdef EGL_VERSION_1_0 + struct tagSFG_PlatformDisplayEGL egl; +#endif + int DisplayPointerX; /* saved X location of the pointer */ int DisplayPointerY; /* saved Y location of the pointer */ }; @@ -92,12 +92,18 @@ struct tagSFG_PlatformDisplay * Make "freeglut" window handle and context types so that we don't need so * much conditionally-compiled code later in the library. */ +#ifndef EGL_VERSION_1_0 typedef Window SFG_WindowHandleType ; typedef GLXContext SFG_WindowContextType ; +#endif typedef struct tagSFG_PlatformContext SFG_PlatformContext; struct tagSFG_PlatformContext { - GLXFBConfig* FBConfig; /* The window's FBConfig */ +#ifdef EGL_VERSION_1_0 + struct tagSFG_PlatformContextEGL egl; +#else + GLXFBConfig FBConfig; /* The window's FBConfig */ +#endif }; @@ -107,6 +113,7 @@ struct tagSFG_PlatformWindowState { int OldWidth; /* Window width from before a resize */ int OldHeight; /* " height " " " " */ + GLboolean KeyRepeating; /* Currently in repeat mode? */ };