src/fg_gl2.c
src/fg_gl2.h
src/fg_init.c
+ src/fg_init.h
src/fg_internal.h
src/fg_input_devices.c
src/fg_joystick.c
src/x11/fg_window_x11.c
src/x11/fg_xinput_x11.c
)
- IF(!(FREEGLUT_GLES2 OR FREEGLUT_GLES1))
+ IF(NOT(FREEGLUT_GLES2 OR FREEGLUT_GLES1))
LIST(APPEND FREEGLUT_SRCS
src/x11/fg_internal_x11_glx.h
src/x11/fg_display_x11_glx.c
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
IF(!ANDROID)
# not setting -ansi as EGL/KHR headers doesn't support it
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi")
# endif
+extern void fgInitGL2();
+
#endif
#define FREEGLUT_BUILDING_LIB
#include <GL/freeglut.h>
#include "fg_internal.h"
+#include "fg_gl2.h"
/*
* TODO BEFORE THE STABLE RELEASE:
extern void fgPlatformDeinitialiseInputDevices ( void );
extern void fgPlatformCloseDisplay ( void );
extern void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext );
-extern void fgInitGL2();
-
void fghParseCommandLineArguments ( int* pargc, char** argv, char **pDisplayName, char **pGeometry )
{
static int dial_state = DIAL_NEW;
static int dial_which;
static int dial_value;
- static int dials[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
if ( !dialbox_port ) return;
case DIAL_VALUE_LOW:
dial_value |= data;
if ( dial_value & 0x8000 ) dial_value -= 0x10000;
- dials[dial_which] = dial_value;
send_dial_event ( dial_which + 1, dial_value * 360 / 256 );
dial_state = DIAL_WHICH_DEVICE;
break;
typedef unsigned long fg_time_t;
#endif
-
+#ifndef __fg_unused
+# ifdef __GNUC__
+# define __fg_unused __attribute__((unused))
+# else
+# define __fg_unused
+# endif
+#endif
/* Platform-specific includes */
#if TARGET_HOST_POSIX_X11
/* magic happenings behind my back, its lib for devels at last ;) */
/* append display mode to error to make things more informative */
- sprintf(displayMode,"%s Problem with requested mode: %ix%i:%i@%i", fggmstr, devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmDisplayFrequency);
+ sprintf(displayMode,"%s Problem with requested mode: %lux%lu:%lu@%lu", fggmstr, devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmDisplayFrequency);
fgWarning(displayMode);
}
/* If window has title bar, correct rect for it */
if (windowStyle & WS_MAXIMIZEBOX) /* Need to query for WS_MAXIMIZEBOX to see if we have a title bar, the WS_CAPTION query is also true for a WS_DLGFRAME only... */
+ {
if (posIsOutside)
clientRect->bottom += GetSystemMetrics( SM_CYCAPTION );
else
clientRect->top -= GetSystemMetrics( SM_CYCAPTION );
+ }
/* get width of window's borders (frame), correct rect for it.
* Note, borders can be of zero width if style does not specify borders
/* If window has title bar, correct rect for it */
if (windowStyle & WS_MAXIMIZEBOX) /* Need to query for WS_MAXIMIZEBOX to see if we have a title bar, the WS_CAPTION query is also true for a WS_DLGFRAME only... */
+ {
if (wantPosOutside)
windowRect->bottom -= GetSystemMetrics( SM_CYCAPTION );
else
windowRect->top += GetSystemMetrics( SM_CYCAPTION );
+ }
/* get width of window's borders (frame), correct rect for it.
* Note, borders can be of zero width if style does not specify borders
#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)
void serial_flush ( SERIALPORT *port );
-/* local variables */
-static SERIALPORT *dialbox_port=NULL;
-
/*****************************************************************/
/*
{
int status;
- int i;
-
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
int len;
# define VFPRINTF(s,f,a)
#endif
+#include "fg_main.h"
+
/*
* Try to get the maximum value allowed for ints, falling back to the minimum
* guaranteed by ISO C99 if there is no suitable header.
}
}
-static void fghPrintEvent( XEvent *event )
+__fg_unused static void fghPrintEvent( XEvent *event )
{
switch( event->type ) {
*/
#include <GL/freeglut.h>
-#include "../fg_internal.h"
+#include "fg_internal.h"
+#ifdef EGL_VERSION_1_0
+#include "egl/fg_state_egl.h"
+#endif
int fgPlatformGlutDeviceGet ( GLenum eWhat )
{
*/
#include <GL/freeglut.h>
-#include "../fg_internal.h"
+#include "fg_internal.h"
+#ifdef EGL_VERSION_1_0
+#include "egl/fg_structure_egl.h"
+#endif
extern SFG_Structure fgStructure;
XWMHints wmHints;
XEvent eventReturnBuffer; /* return buffer required for a call */
unsigned long mask;
- int num_FBConfigs, i;
unsigned int current_DisplayMode = fgState.DisplayMode ;
/* Save the display mode if we are creating a menu window */