summaryrefslogtreecommitdiff
path: root/src/glut/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/glut/glx')
-rw-r--r--src/glut/glx/Makefile1
-rw-r--r--src/glut/glx/SConscript88
-rw-r--r--src/glut/glx/descrip.mms208
-rw-r--r--src/glut/glx/glut_event.c9
-rw-r--r--src/glut/glx/glut_input.c2
-rw-r--r--src/glut/glx/glutint.h2
-rw-r--r--src/glut/glx/glutstroke.h2
-rw-r--r--src/glut/glx/glutwin32.h1
-rw-r--r--src/glut/glx/mms_depend72
-rw-r--r--src/glut/glx/win32_winproc.c4
-rw-r--r--src/glut/glx/win32_x11.h2
11 files changed, 103 insertions, 288 deletions
diff --git a/src/glut/glx/Makefile b/src/glut/glx/Makefile
index 87301f1b77..9a975bbc60 100644
--- a/src/glut/glx/Makefile
+++ b/src/glut/glx/Makefile
@@ -131,6 +131,7 @@ clean:
depend: $(SOURCES)
@ echo "running $(MKDEP)"
+ @ rm -f depend
@ touch depend
@ $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(SOURCES) \
$(X11_INCLUDES) > /dev/null
diff --git a/src/glut/glx/SConscript b/src/glut/glx/SConscript
new file mode 100644
index 0000000000..cb442ba027
--- /dev/null
+++ b/src/glut/glx/SConscript
@@ -0,0 +1,88 @@
+Import('*')
+
+env = env.Clone()
+
+if env['platform'] != 'windows':
+ Return()
+
+target = 'glut32'
+
+env.Replace(CPPDEFINES = [
+ 'BUILD_GLUT32',
+ 'GLUT_BUILDING_LIB',
+ 'MESA',
+ 'NDEBUG',
+ 'GLUT_NO_WARNING_DISABLE',
+])
+
+env.AppendUnique(CPPPATH = [
+ '#/include',
+])
+
+env.PrependUnique(LIBS = [
+ 'winmm',
+ 'gdi32',
+ 'user32',
+ 'opengl32',
+ 'glu32',
+])
+
+sources = [
+ 'glut_bitmap.c',
+ 'glut_bwidth.c',
+ 'glut_cindex.c',
+ 'glut_cmap.c',
+ 'glut_cursor.c',
+ 'glut_dials.c',
+ 'glut_dstr.c',
+ 'glut_event.c',
+ 'glut_ext.c',
+ 'glut_fullscrn.c',
+ 'glut_gamemode.c',
+ 'glut_get.c',
+ 'glut_init.c',
+ 'glut_input.c',
+ 'glut_joy.c',
+ 'glut_key.c',
+ 'glut_keyctrl.c',
+ 'glut_keyup.c',
+ 'glut_mesa.c',
+ 'glut_modifier.c',
+ 'glut_overlay.c',
+ 'glut_ppm.c',
+ 'glut_shapes.c',
+ 'glut_space.c',
+ 'glut_stroke.c',
+ 'glut_swap.c',
+ 'glut_swidth.c',
+ 'glut_tablet.c',
+ 'glut_teapot.c',
+ 'glut_util.c',
+ 'glut_vidresize.c',
+ 'glut_warp.c',
+ 'glut_win.c',
+ 'glut_winmisc.c',
+
+ 'win32_glx.c',
+ 'win32_menu.c',
+ 'win32_util.c',
+ 'win32_winproc.c',
+ 'win32_x11.c',
+
+ 'glut_8x13.c',
+ 'glut_9x15.c',
+ 'glut_hel10.c',
+ 'glut_hel12.c',
+ 'glut_hel18.c',
+ 'glut_mroman.c',
+ 'glut_roman.c',
+ 'glut_tr10.c',
+ 'glut_tr24.c',
+
+ 'glut.def',
+]
+
+env.SharedLibrary(
+ target = target,
+ source = sources,
+)
diff --git a/src/glut/glx/descrip.mms b/src/glut/glx/descrip.mms
deleted file mode 100644
index 2e858309b6..0000000000
--- a/src/glut/glx/descrip.mms
+++ /dev/null
@@ -1,208 +0,0 @@
-# Makefile for GLUT for VMS
-# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl
-
-.first
- define gl [---.include.gl]
-
-.include [---]mms-config.
-
-##### MACROS #####
-GLUT_MAJOR = 3
-GLUT_MINOR = 7
-
-VPATH = RCS
-
-INCDIR = [---.include]
-LIBDIR = [---.lib]
-CFLAGS = /nowarn/include=$(INCDIR)/prefix=all/name=(as_is,short)/float=ieee/ieee=denorm
-
-SOURCES = \
-glut_8x13.c \
-glut_9x15.c \
-glut_bitmap.c \
-glut_bwidth.c \
-glut_cindex.c \
-glut_cmap.c \
-glut_cursor.c \
-glut_dials.c \
-glut_dstr.c \
-glut_event.c \
-glut_ext.c \
-glut_fullscrn.c \
-glut_gamemode.c \
-glut_get.c \
-glut_glxext.c \
-glut_hel10.c \
-glut_hel12.c \
-glut_hel18.c \
-glut_init.c \
-glut_input.c \
-glut_joy.c \
-glut_key.c \
-glut_keyctrl.c \
-glut_keyup.c \
-glut_menu.c \
-glut_menu2.c \
-glut_mesa.c \
-glut_modifier.c \
-glut_mroman.c \
-glut_overlay.c \
-glut_roman.c \
-glut_shapes.c \
-glut_space.c \
-glut_stroke.c \
-glut_swap.c \
-glut_swidth.c \
-glut_tablet.c \
-glut_teapot.c \
-glut_tr10.c \
-glut_tr24.c \
-glut_util.c \
-glut_vidresize.c \
-glut_warp.c \
-glut_win.c \
-glut_winmisc.c \
-layerutil.c
-
-OBJECTS0=glut_8x13.obj,\
-glut_9x15.obj,\
-glut_bitmap.obj,\
-glut_bwidth.obj,\
-glut_cindex.obj,\
-glut_cmap.obj,\
-glut_cursor.obj,\
-glut_dials.obj,\
-glut_dstr.obj,\
-glut_event.obj,\
-glut_ext.obj,\
-glut_fullscrn.obj,\
-glut_gamemode.obj
-
-OBJECTS1=glut_get.obj,\
-glut_glxext.obj,\
-glut_hel10.obj,\
-glut_hel12.obj,\
-glut_hel18.obj,\
-glut_init.obj,\
-glut_input.obj,\
-glut_joy.obj,\
-glut_key.obj,\
-glut_keyctrl.obj,\
-glut_keyup.obj,\
-glut_menu.obj,\
-glut_menu2.obj,\
-glut_mesa.obj,\
-glut_modifier.obj
-
-OBJECTS2=glut_mroman.obj,\
-glut_overlay.obj,\
-glut_roman.obj,\
-glut_shapes.obj,\
-glut_space.obj,\
-glut_stroke.obj,\
-glut_swap.obj,\
-glut_swidth.obj,\
-glut_tablet.obj,\
-glut_teapot.obj,\
-glut_tr10.obj,\
-glut_tr24.obj,\
-glut_util.obj,\
-glut_vidresize.obj
-
-OBJECTS3=glut_warp.obj,\
-glut_win.obj,\
-glut_winmisc.obj,\
-layerutil.obj
-
-##### RULES #####
-
-VERSION=Glut V3.7
-
-##### TARGETS #####
-
-# Make the library
-$(LIBDIR)$(GLUT_LIB) : $(OBJECTS0) $(OBJECTS1) $(OBJECTS2) $(OBJECTS3)
- @ $(MAKELIB) $(GLUT_LIB) $(OBJECTS0)
- @ library $(GLUT_LIB) $(OBJECTS1)
- @ library $(GLUT_LIB) $(OBJECTS2)
- @ library $(GLUT_LIB) $(OBJECTS3)
- @ rename $(GLUT_LIB)* $(LIBDIR)
-.ifdef SHARE
- @ WRITE_ SYS$OUTPUT " generating mesagl1.opt"
- @ OPEN_/WRITE FILE mesagl1.opt
- @ WRITE_ FILE "!"
- @ WRITE_ FILE "! mesagl1.opt generated by DESCRIP.$(MMS_EXT)"
- @ WRITE_ FILE "!"
- @ WRITE_ FILE "IDENTIFICATION=""$(VERSION)"""
- @ WRITE_ FILE "GSMATCH=LEQUAL,3,7
- @ WRITE_ FILE "$(OBJECTS0)"
- @ WRITE_ FILE "$(OBJECTS1)"
- @ WRITE_ FILE "$(OBJECTS2)"
- @ WRITE_ FILE "$(OBJECTS3)"
- @ WRITE_ FILE "[---.lib]libmesaglu.exe/SHARE"
- @ WRITE_ FILE "[---.lib]libmesagl.exe/SHARE"
- @ write file "sys$library:decw$xmulibshr.exe/share"
- @ WRITE_ FILE "SYS$SHARE:DECW$XEXTLIBSHR/SHARE"
- @ WRITE_ FILE "SYS$SHARE:DECW$XLIBSHR/SHARE"
- @ CLOSE_ FILE
- @ WRITE_ SYS$OUTPUT " generating mesagl.map ..."
- @ CXXLINK_/NODEB/NOSHARE/NOEXE/MAP=mesagl.map/FULL mesagl1.opt/OPT
- @ WRITE_ SYS$OUTPUT " analyzing mesagl.map ..."
- @ @[---.vms]ANALYZE_MAP.COM mesagl.map mesagl.opt
- @ WRITE_ SYS$OUTPUT " linking $(GLUT_SHAR) ..."
- @ CXXLINK_/NODEB/SHARE=$(GLUT_SHAR)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
- @ rename $(GLUT_SHAR)* $(LIBDIR)
-.endif
-
-clean :
- delete *.obj;*
- purge
-
-include mms_depend.
-
-glut_8x13.obj : glut_8x13.c
-glut_9x15.obj : glut_9x15.c
-glut_bitmap.obj : glut_bitmap.c
-glut_bwidth.obj : glut_bwidth.c
-glut_cindex.obj : glut_cindex.c
-glut_cmap.obj : glut_cmap.c
-glut_cursor.obj : glut_cursor.c
-glut_dials.obj : glut_dials.c
-glut_dstr.obj : glut_dstr.c
-glut_event.obj : glut_event.c
-glut_ext.obj : glut_ext.c
-glut_fullscrn.obj : glut_fullscrn.c
-glut_gamemode.obj : glut_gamemode.c
-glut_get.obj : glut_get.c
-glut_glxext.obj : glut_glxext.c
-glut_hel10.obj : glut_hel10.c
-glut_hel12.obj : glut_hel12.c
-glut_hel18.obj : glut_hel18.c
-glut_init.obj : glut_init.c
-glut_input.obj : glut_input.c
-glut_joy.obj : glut_joy.c
-glut_key.obj : glut_key.c
-glut_keyctrl.obj : glut_keyctrl.c
-glut_keyup.obj : glut_keyup.c
-glut_menu.obj : glut_menu.c
-glut_menu2.obj : glut_menu2.c
-glut_mesa.obj : glut_mesa.c
-glut_modifier.obj : glut_modifier.c
-glut_mroman.obj : glut_mroman.c
-glut_overlay.obj : glut_overlay.c
-glut_roman.obj : glut_roman.c
-glut_shapes.obj : glut_shapes.c
-glut_space.obj : glut_space.c
-glut_stroke.obj : glut_stroke.c
-glut_swap.obj : glut_swap.c
-glut_swidth.obj : glut_swidth.c
-glut_tablet.obj : glut_tablet.c
-glut_teapot.obj : glut_teapot.c
-glut_tr10.obj : glut_tr10.c
-glut_tr24.obj : glut_tr24.c
-glut_util.obj : glut_util.c
-glut_vidresize.obj : glut_vidresize.c
-glut_warp.obj : glut_warp.c
-glut_win.obj : glut_win.c
-glut_winmisc.obj : glut_winmisc.c
-layerutil.obj : layerutil.c
diff --git a/src/glut/glx/glut_event.c b/src/glut/glx/glut_event.c
index b5df7b2311..d6d963896a 100644
--- a/src/glut/glx/glut_event.c
+++ b/src/glut/glx/glut_event.c
@@ -1321,7 +1321,12 @@ processWindowWorkList(GLUTwindow * window)
is where the finish works gets queued for indirect
contexts. */
__glutSetWindow(window);
- glFinish();
+#if !defined(_WIN32)
+ if (!window->isDirect)
+#endif
+ {
+ glFinish();
+ }
}
if (workMask & GLUT_DEBUG_WORK) {
__glutSetWindow(window);
@@ -1338,9 +1343,7 @@ processWindowWorkList(GLUTwindow * window)
}
}
-#ifndef _WIN32
static /* X11 implementations do not need this global. */
-#endif
void
__glutProcessWindowWorkLists(void)
{
diff --git a/src/glut/glx/glut_input.c b/src/glut/glx/glut_input.c
index a76ff9a435..7d2eda00f7 100644
--- a/src/glut/glx/glut_input.c
+++ b/src/glut/glx/glut_input.c
@@ -295,6 +295,7 @@ __glutProcessDeviceEvents(XEvent * event)
static GLUTeventParser eventParser =
{__glutProcessDeviceEvents, NULL};
+#if !defined(_WIN32)
static void
addDeviceEventParser(void)
{
@@ -305,6 +306,7 @@ addDeviceEventParser(void)
been_here = True;
__glutRegisterEventParser(&eventParser);
}
+#endif
static int
probeDevices(void)
diff --git a/src/glut/glx/glutint.h b/src/glut/glx/glutint.h
index f32da28239..fe4e038add 100644
--- a/src/glut/glx/glutint.h
+++ b/src/glut/glx/glutint.h
@@ -33,7 +33,7 @@
#include <GL/glut.h>
#if defined(MESA) && defined(_WIN32) && !defined(__CYGWIN32__)
-#include <gl/mesa_wgl.h>
+#include <GL/mesa_wgl.h>
#endif
#ifndef _WIN32
diff --git a/src/glut/glx/glutstroke.h b/src/glut/glx/glutstroke.h
index cbc9e156fe..74b60314aa 100644
--- a/src/glut/glx/glutstroke.h
+++ b/src/glut/glx/glutstroke.h
@@ -7,7 +7,7 @@
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
-#if defined(_WIN32)
+#if defined(_MSC_VER)
#pragma warning (disable:4244) /* disable bogus conversion warnings */
#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
#endif
diff --git a/src/glut/glx/glutwin32.h b/src/glut/glx/glutwin32.h
index 304eeb20a2..01db99fad6 100644
--- a/src/glut/glx/glutwin32.h
+++ b/src/glut/glx/glutwin32.h
@@ -41,6 +41,7 @@
/* Private routines from win32_util.c */
#ifndef __CYGWIN32__
+struct timeval;
extern int gettimeofday(struct timeval* tp, void* tzp);
#endif
extern void *__glutFont(void *font);
diff --git a/src/glut/glx/mms_depend b/src/glut/glx/mms_depend
deleted file mode 100644
index 98f87c29e2..0000000000
--- a/src/glut/glx/mms_depend
+++ /dev/null
@@ -1,72 +0,0 @@
-# DO NOT DELETE
-
-glut_8x13.obj : glutbitmap.h [---.include.gl]gl.h
-glut_9x15.obj : glutbitmap.h [---.include.gl]gl.h
-glut_bitmap.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_bitmap.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_bitmap.obj : glutbitmap.h
-glut_bwidth.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_bwidth.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_bwidth.obj : glutbitmap.h
-glut_cindex.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_cindex.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_cindex.obj : layerutil.h
-glut_cursor.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_cursor.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_dials.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h
-glut_dials.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h [---.include.gl]glu.h
-glut_dstr.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h
-glut_dstr.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h [---.include.gl]glu.h
-glut_event.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_event.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_ext.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_ext.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_fullscrn.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h
-glut_fullscrn.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h
-glut_fullscrn.obj : [---.include.gl]glu.h
-glut_get.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_get.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_hel10.obj : glutbitmap.h [---.include.gl]gl.h
-glut_hel12.obj : glutbitmap.h [---.include.gl]gl.h
-glut_hel18.obj : glutbitmap.h [---.include.gl]gl.h
-glut_init.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_init.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_menu.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_menu.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h layerutil.h
-glut_mesa.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h
-glut_mesa.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h [---.include.gl]glu.h
-glut_modifier.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h
-glut_modifier.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h
-glut_modifier.obj : [---.include.gl]glu.h
-glut_mroman.obj : glutstroke.h
-glut_overlay.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_overlay.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_overlay.obj : layerutil.h
-glut_roman.obj : glutstroke.h
-glut_shapes.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_shapes.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_space.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h
-glut_space.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h [---.include.gl]glu.h
-glut_stroke.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_stroke.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_stroke.obj : glutstroke.h
-glut_swidth.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_swidth.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_swidth.obj : glutstroke.h
-glut_tablet.obj : glutint.h [---.include.gl]glx.h [---.include.gl]gl.h
-glut_tablet.obj : [---.include.gl]xmesa.h [---.include.gl]glut.h [---.include.gl]glu.h
-glut_teapot.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_tr10.obj : glutbitmap.h [---.include.gl]gl.h
-glut_tr24.obj : glutbitmap.h [---.include.gl]gl.h
-glut_util.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_util.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_vidresize.obj : [---.include.gl]glx.h [---.include.gl]gl.h
-glut_vidresize.obj : [---.include.gl]xmesa.h glutint.h [---.include.gl]glut.h
-glut_vidresize.obj : [---.include.gl]glu.h
-glut_warp.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_warp.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_win.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_win.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-glut_winmisc.obj : [---.include.gl]glut.h [---.include.gl]gl.h [---.include.gl]glu.h
-glut_winmisc.obj : glutint.h [---.include.gl]glx.h [---.include.gl]xmesa.h
-layerutil.obj : layerutil.h
diff --git a/src/glut/glx/win32_winproc.c b/src/glut/glx/win32_winproc.c
index e1fc785ebb..4a9dc3781c 100644
--- a/src/glut/glx/win32_winproc.c
+++ b/src/glut/glx/win32_winproc.c
@@ -20,10 +20,10 @@
extern unsigned __glutMenuButton;
extern GLUTidleCB __glutIdleFunc;
extern GLUTtimer *__glutTimerList;
-extern GLUTmenuItem *__glutGetUniqueMenuItem(GLUTmenu * menu, int unique);
+extern GLUTmenuItem *__glutGetUniqueMenuItem(GLUTmenu * menu, UINT unique);
static HMENU __glutHMenu;
-void
+static void
updateWindowState(GLUTwindow *window, int visState)
{
GLUTwindow* child;
diff --git a/src/glut/glx/win32_x11.h b/src/glut/glx/win32_x11.h
index 6f5c3a9aea..daf065e27b 100644
--- a/src/glut/glx/win32_x11.h
+++ b/src/glut/glx/win32_x11.h
@@ -228,7 +228,7 @@ typedef struct {
SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)
#define XSetWMName(display, window, tp) \
- SetWindowText(window, (tp)->value)
+ SetWindowText(window, (const char *)(tp)->value)
/* There really isn't a way to set the icon name separate from the
windows name in Win32, so, just set the windows name. */