[MLton] more patches
John Reppy
jhr@cs.uchicago.edu
Sat, 15 Oct 2005 16:13:25 -0500
It turned out that the problem was bugs in the example code
(failure to initialize glut properly). Here are more patches
to fix the problems. Some of the examples are still buggy,
but they all put something up on the screen w/o crashing.
- John
diff -c -r opengl/atom.sml mlton-20050731/lib/opengl/atom.sml
*** opengl/atom.sml Sat Oct 15 15:38:52 2005
--- mlton-20050731/lib/opengl/atom.sml Sun Jan 25 07:45:18 2004
***************
*** 43,49 ****
fun initialise () =
(
! glutInit();
glutInitDisplayMode (GLUT_DOUBLE + GLUT_RGBA);
glutInitWindowPosition 100 100;
glutInitWindowSize 250 250;
--- 43,49 ----
fun initialise () =
(
! glutInit;
glutInitDisplayMode (GLUT_DOUBLE + GLUT_RGBA);
glutInitWindowPosition 100 100;
glutInitWindowSize 250 250;
diff -c -r opengl/hello.sml mlton-20050731/lib/opengl/hello.sml
*** opengl/hello.sml Sat Oct 15 15:34:58 2005
--- mlton-20050731/lib/opengl/hello.sml Sun Jan 25 07:45:18 2004
***************
*** 64,70 ****
fun main () =
(
! glutInit();
glutInitDisplayMode (GLUT_SINGLE + GLUT_RGB);
glutInitWindowSize 200 200;
glutCreateWindow "Font Test";
--- 64,70 ----
fun main () =
(
! glutInit;
glutInitDisplayMode (GLUT_SINGLE + GLUT_RGB);
glutInitWindowSize 200 200;
glutCreateWindow "Font Test";
diff -c -r opengl/points.sml mlton-20050731/lib/opengl/points.sml
*** opengl/points.sml Sat Oct 15 15:49:33 2005
--- mlton-20050731/lib/opengl/points.sml Sun Feb 1 00:40:39 2004
***************
*** 86,92 ****
fun main () =
(
- glutInit();
glutInitDisplayMode (GLUT_DOUBLE + GLUT_RGBA);
glutInitWindowSize 400 400;
glutCreateWindow "Animating rectangle";
--- 86,91 ----
***************
*** 102,105 ****
val _ = main();
!
--- 101,104 ----
val _ = main();
!
\ No newline at end of file
diff -c -r opengl/shortest.sml mlton-20050731/lib/opengl/shortest.sml
*** opengl/shortest.sml Sat Oct 15 15:38:58 2005
--- mlton-20050731/lib/opengl/shortest.sml Sun Jan 25 07:45:18 2004
***************
*** 9,15 ****
fun main () =
(
! glutInit();
glutCreateWindow "Short Test";
glutDisplayFunc display;
print("Click the close icon to close the window.");
--- 9,15 ----
fun main () =
(
! glutInit;
glutCreateWindow "Short Test";
glutDisplayFunc display;
print("Click the close icon to close the window.");
diff -c -r opengl/solar.sml mlton-20050731/lib/opengl/solar.sml
*** opengl/solar.sml Sat Oct 15 15:39:03 2005
--- mlton-20050731/lib/opengl/solar.sml Sun Jan 25 07:45:18 2004
***************
*** 29,35 ****
fun initialise () =
(
! glutInit();
glutInitDisplayMode (GLUT_DOUBLE + GLUT_RGB);
glutInitWindowSize 200 200;
glutCreateWindow "Solar";
--- 29,35 ----
fun initialise () =
(
! glutInit;
glutInitDisplayMode (GLUT_DOUBLE + GLUT_RGB);
glutInitWindowSize 200 200;
glutCreateWindow "Solar";
diff -c -r opengl/spin_cube.sml mlton-20050731/lib/opengl/spin_cube.sml
*** opengl/spin_cube.sml Sat Oct 15 15:39:08 2005
--- mlton-20050731/lib/opengl/spin_cube.sml Sun Jan 25 07:45:18 2004
***************
*** 42,48 ****
fun initialise () =
(
! glutInit();
glutInitDisplayMode (GLUT_DOUBLE+GLUT_RGB);
glutInitWindowSize 400 400;
glutCreateWindow "Spinning Cube";
--- 42,48 ----
fun initialise () =
(
! glutInit;
glutInitDisplayMode (GLUT_DOUBLE+GLUT_RGB);
glutInitWindowSize 400 400;
glutCreateWindow "Spinning Cube";
diff -c -r opengl/triangle.sml mlton-20050731/lib/opengl/triangle.sml
*** opengl/triangle.sml Sat Oct 15 16:10:36 2005
--- mlton-20050731/lib/opengl/triangle.sml Sun Jan 25 07:45:18 2004
***************
*** 43,49 ****
fun initialise () =
(
- glutInit ();
glutInitDisplayMode(GLUT_DOUBLE + GLUT_RGBA);
glutInitWindowPosition 100 100;
glutInitWindowSize 250 250;
--- 43,48 ----
***************
*** 202,205 ****
val _ = main();
!
--- 201,204 ----
val _ = main();
!
\ No newline at end of file