[MLton] OpenGL

Mike Thomas mike.thomas@brisbane.paradigmgeo.com
Thu, 22 Jan 2004 14:59:35 +1000


Hi Stephen.

| Thanks for the link.  I went ahead and installed the rpms for RedHat 8
| as suggested by one poster at opengl.org.  With that in place, some
| case sensitivity fixes, and the right linker args, I built and ran:
| atom, hello, shortest, solar, spin_cube, and triangle.  Quite neat!

I'm very pleased - hopefully someone will use all this stuff to produce
something really nice.

| BTW, when I run, I get the following warning.
|
|   Xlib:  extension "XFree86-DRI" missing on display ":0.0".

Unfortunately you've got me there.  Google says:

http://www.opengl.org/discussion_boards/ubb/Forum4/HTML/001147.html

| As to the changes, you might want to add GLUT_h.h, GLU_h.h, and GL_h.h
| to the .cvsignore.  Also, I created GL.cm with the contents
|
|   Group is
|   GL.sig
|   GL.sml
|   GLUT.sig
|   GLUT.sml
|   GLU.sig
|   GLU.sml
|
| (note the case).  I tweaked all the other .cm files to refer to this.
| E.g. atom.cm is
|
|   Group is
|   GL.cm
|   atom.sml
|
| Finally, I changed the Makefile as below.
|
| BTW, in my cygwin.bat file I have
|
| 	set CYGWIN=binmode check_case:strict ntsec tty
|
| I believe the check_case:strict makes Cygwin case sensitive, which
| might be good to do while you're developing code that has to work on
| Linux too.
|
| Overall, it looks great.  I'm looking forward to running blender.

Thanks for all of this - it's much appreciated.

I'll incorporate it over the next 24 hours I hope.  I'm still adding
functionality to support blender - fingers crossed it goes well.

My biggest question re your Linux test incidentally, is whether or not the
test programs exit when you close the window, or whether you have to hit ^C
at the console.  On Cygwin I'm forced to use ^C which should not happen -
the programs should exit automatically on closing the windows.

Cheers

Mike Thomas.

|
| ------------------------------------------------------------------
| --------------
|
| Index: Makefile
| ===================================================================
| RCS file: /cvsroot/mlton/mlton/lib/opengl/mlton/Makefile,v
| retrieving revision 1.10
| diff -u -r1.10 Makefile
| --- Makefile	21 Jan 2004 07:55:09 -0000	1.10
| +++ Makefile	22 Jan 2004 04:17:05 -0000
| @@ -1,6 +1,6 @@
|  mlton = mlton
|  MLTONFLAGS = -verbose 0
| -GL_LINK_OPTS = -link-opt -L/lib/w32api -link-opt -lglut32
| -link-opt -lglu32 -link-opt -lopengl32
| +GL_LINK_OPTS = -link-opt '-lglut -lGLU -lGL'
|
|  CPPFLAGS =  -P -C -x c -E
|
| @@ -79,25 +79,25 @@
|  test: shortest hello solar atom triangle spin_cube blender
|
|  shortest: $(GLUT_SML) $(GL_SML) shortest.sml
| -	mlton $(GL_LINK_OPTS) shortest.cm Gl_c.c Glut_c.c
| +	mlton $(GL_LINK_OPTS) shortest.cm GL_c.o GLUT_c.o
|
|  hello: $(GLUT_SML) $(GLU_SML) $(GL_SML) hello.sml
| -	mlton $(GL_LINK_OPTS) hello.cm Gl_c.c Glut_c.c
| +	mlton $(GL_LINK_OPTS) hello.cm GL_c.o GLUT_c.o
|
|  solar: $(GLUT_SML) $(GLU_SML) $(GL_SML) solar.sml
| -	mlton $(GL_LINK_OPTS) solar.cm Gl_c.c Glut_c.c
| +	mlton $(GL_LINK_OPTS) solar.cm GL_c.o GLUT_c.o
|
|  atom: $(GLUT_SML) $(GLU_SML) $(GL_SML) atom.sml
| -	mlton $(GL_LINK_OPTS) atom.cm Gl_c.c Glut_c.c
| +	mlton $(GL_LINK_OPTS) atom.cm GL_c.o GLUT_c.o
|
|  triangle: $(GLUT_SML) $(GLU_SML) $(GL_SML) triangle.sml
| -	mlton $(GL_LINK_OPTS) triangle.cm Gl_c.c Glut_c.c
| +	mlton $(GL_LINK_OPTS) triangle.cm GL_c.o GLUT_c.o
|
|  spin_cube: $(GLUT_SML) $(GLU_SML) $(GL_SML) spin_cube.sml
| -	mlton $(GL_LINK_OPTS) spin_cube.cm Gl_c.c Glut_c.c
| +	mlton $(GL_LINK_OPTS) spin_cube.cm GL_c.o GLUT_c.o
|
|  blender: $(GLUT_SML) $(GLU_SML) $(GL_SML) blender.sml
| -	mlton $(GL_LINK_OPTS) blender.cm Gl_c.c Glut_c.c
| +	mlton $(GL_LINK_OPTS) blender.cm GL_c.o GLUT_c.o
|
|  clean:
|  	rm -f *_h.h *.stackdump *~ *.o *.exe Glut *.a hello
| shortest atom solar triangle spin_cube blender
|
| _______________________________________________
| MLton mailing list
| MLton@mlton.org
| http://www.mlton.org/mailman/listinfo/mlton
|