Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] Annotation of /trunk/sml3d/README
ViewVC logotype

Annotation of /trunk/sml3d/README

Parent Directory Parent Directory | Revision Log Revision Log


Revision 383 - (view) (download)

1 : jhr 139 SUMMARY
2 : jhr 225
3 : jhr 139 A suite of libraries to support real-time 3D programming in SML using OpenGL.
4 : jhr 1
5 : jhr 139 INSTALLATION
6 : jhr 225
7 : jhr 139 This library requires the MLton SML compiler (mlton.org). Because of
8 :     a bug in handling of 8-bit signed integers, it does not build using
9 : jhr 288 the 20070826 release, but will build under the latest version of MLton
10 :     from svn.
11 : jhr 139
12 :     After unpacking, run the configure script and then make. You can then
13 :     try out some of the example programs.
14 :    
15 : jhr 288 The process is a bit more complicated if you are installing sml3d from
16 :     the SVN repository. See the instructions below for details.
17 :    
18 : jhr 139 USAGE
19 :    
20 :     Depending on which components of the SML3D library you are using, you
21 : jhr 225 will need to pass additional flags and (possibly) additional object files
22 :     to the mlton commmand line. We have packaged up this behavior in a shell
23 :     script (bin/config-cmd.sh). Thus, you can invoke mlton as follows
24 : jhr 139
25 : jhr 225 MLTONFLAGS=`config-sml3d.sh components`
26 : jhr 139
27 : jhr 225 EXTRAOBJS=`config-sml3d.sh objs components`
28 :    
29 :     mlton $MLTONFLAGS project.mlb $EXTRAOBJS
30 :    
31 :     where "project.mlb" is your project's MLB file. Note that we use the
32 :     config-sml3d.sh command twice: once to generate the command-line options
33 :     and once to get the list of extra object files. The "components" argument
34 :     to the script specifies which components your project is using. The values
35 : jhr 139 are:
36 : jhr 151
37 : jhr 139 no-opengl Do not use OpenGL support (incompatable with glut
38 : jhr 151 option)
39 :     glut Use the GLUT library
40 : jhr 152 sdl Use SDL (incompatable with GLUT).
41 : jhr 139 sdl-ttf Use the SDL True-type font library (implies sdl
42 : jhr 152 option).
43 : jhr 139 sdl-image Use the SDL True-type font library (implies sdl
44 : jhr 151 option)
45 : jhr 139 sdl-mixer Use the SDL audio mixer library (implies sdl
46 : jhr 151 option)
47 :     openal Use the OpenAL library (incompatable with sdl-mixer)
48 : jhr 139 devil Use the DevIL image library
49 :    
50 :     If you use GNU make to build your project, you may want to include the
51 :     mk/config.gmk file in your makefile. Define the SML3D_CONFIG_OPTIONS make
52 :     variable to the components that you are using and use the MLTON_FLAGS
53 :     variable as an argument to the mlton command.
54 : jhr 151
55 :    
56 : jhr 288 WINDOWS
57 :    
58 :     The sml3d library has been ported to work on Windows XP and Windows
59 :     Vista using the MinGW/MSys installation that comes with the MLton
60 :     MSI files (http://mlton.org/Experimental). When using the GLUT library
61 :     on Windows, you need to make sure that Windows can find the GLUT DLL.
62 :     If your sml3d tree is in
63 :    
64 :     c:\Users\yourlogin\sml3d
65 :    
66 :     then add
67 :    
68 :     c:\Users\yourlogin\sml3d\windows\bin
69 :    
70 :     to your PATH variable.
71 :    
72 :    
73 : jhr 151 DEPENDENCIES
74 :    
75 : jhr 288 The SML3d library assumes that your system has OpenGL 2.1 available.
76 :     It can be configured to use other libraries:
77 : jhr 151
78 :     GLUT Available with most OpenGL systems. An alternative
79 :     is available from http://freeglut.sourceforge.net.
80 : jhr 225 For Windows systems (using MinGW), we have included
81 :     GLUT support in the SML3d distribution.
82 : jhr 151 SDL http://www.libsdl.org
83 :     SDL_image http://www.libsdl.org/projects/SDL_image
84 :     SDL_ttf http://www.libsdl.org/projects/SDL_ttf
85 :     SDL_mixer http://www.libsdl.org/projects/SDL_mixer
86 :     OpenAL http://openal.org
87 :     DevIL http://openil.sourceforge.net
88 :    
89 : jhr 139 ROADMAP
90 :    
91 : jhr 1 doc/
92 :     src/
93 : jhr 383 base/
94 :     common - SML code for vectors, matrices, etc.
95 :     opengl - SML interfaces to the GL and GLU libraries
96 :     util - various utility modules
97 : jhr 139 devil - support for image I/O based on DevIL
98 : jhr 1 glut - SML interface to the GLUT library
99 :     gui - A simple, GLUT-based, GUI library
100 : jhr 139 image - basic image support
101 :     loaders - loaders for some 3D file formats
102 :     openal - SML interfaces to OpenAL
103 : jhr 1 particles - A library for particle effects.
104 : jhr 139 sdl - SML interfaces to SDL and related libraries
105 :     tests - test programs
106 : jhr 1 examples/ - some example programs
107 : jhr 288 gen/ - code to generate the FFI glue code for OpenGL.
108 : jhr 225 windows/ - extra support files for Windows systems (requires
109 :     MinGW)
110 : jhr 1
111 : jhr 288 BUILDING FROM SVN
112 :    
113 :     If you have downloaded the sml3d sources from svn, then you need a few
114 :     extra steps to build the system.
115 :    
116 :     1) generating glue code. The FFI glue code is generated from
117 :     a XML description. To build the glue code, you will need a
118 :     recent version of SML/NJ (110.68+). Then execute the following
119 :     steps.
120 :    
121 :     % cd gen
122 :     % sml
123 :     - CM.make "sources.cm";
124 :     - Gen.default ();
125 :    
126 :     2) The next step is to generate the configure file. From the
127 :     sml3d directory,
128 :    
129 :     % autoconf -Iconfig
130 :    
131 :     3) follow the INSTALLATION instructions from above.
132 :    
133 :    
134 :     TODO
135 : jhr 1 image loaders (ppm, pgm, png, jpeg)
136 :     model loaders (obj and mtl files)
137 :     SDL
138 :    
139 : jhr 139 This software is Copyright (c) 2008 John Reppy (All rights reserved). It is
140 : jhr 1 distributed under the GNU GENERAL PUBLIC LICENSE (Version 2). See the COPYING
141 :     file for details.

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0