#define FREEGLUT_BUILDING_LIB
#include <limits.h> /* LONG_MAX */
#include <GL/freeglut.h>
-#include "../fg_internal.h"
+#include "fg_internal.h"
+#include "fg_init.h"
+#include "egl/fg_init_egl.h"
/* Return the atom associated with "name". */
static Atom fghGetAtom(const char * name)
if( fgDisplay.pDisplay.Display == NULL )
fgError( "failed to open display '%s'", XDisplayName( displayName ) );
+#ifdef EGL_VERSION_1_0
+ fghPlatformInitializeEGL();
+#else
if( !glXQueryExtension( fgDisplay.pDisplay.Display, NULL, NULL ) )
fgError( "OpenGL GLX extension not supported by display '%s'",
XDisplayName( displayName ) );
+#endif
fgDisplay.pDisplay.Screen = DefaultScreen( fgDisplay.pDisplay.Display );
fgDisplay.pDisplay.RootWindow = RootWindow(
}
+#ifndef EGL_VERSION_1_0
void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext )
{
/* Note that the MVisualInfo is not owned by the MenuContext! */
glXDestroyContext( pDisplay.Display, MContext );
}
+#endif