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

SCM Repository

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

View of /trunk/sml3d/README

Parent Directory Parent Directory | Revision Log Revision Log

Revision 288 - (download) (annotate)
Mon Sep 29 14:50:00 2008 UTC (10 years, 10 months ago) by jhr
Original Path: README
File size: 4587 byte(s)
Add instructions for Windows and for building from svn.

  A suite of libraries to support real-time 3D programming in SML using OpenGL.


  This library requires the MLton SML compiler (mlton.org).  Because of
  a bug in handling of 8-bit signed integers, it does not build using
  the 20070826 release, but will build under the latest version of MLton
  from svn.

  After unpacking, run the configure script and then make.  You can then
  try out some of the example programs.

  The process is a bit more complicated if you are installing sml3d from
  the SVN repository.  See the instructions below for details.


  Depending on which components of the SML3D library you are using, you
  will need to pass additional flags and (possibly) additional object files
  to the mlton commmand line.  We have packaged up this behavior in a shell
  script (bin/config-cmd.sh).  Thus, you can invoke mlton as follows

	MLTONFLAGS=`config-sml3d.sh components`

	EXTRAOBJS=`config-sml3d.sh objs components`

	mlton $MLTONFLAGS project.mlb $EXTRAOBJS

  where "project.mlb" is your project's MLB file.  Note that we use the
  config-sml3d.sh command twice: once to generate the command-line options
  and once to get the list of extra object files.  The "components" argument
  to the script specifies which components your project is using.  The values

	no-opengl	Do not use OpenGL support (incompatable with glut
	glut		Use the GLUT library
	sdl		Use SDL (incompatable with GLUT).
	sdl-ttf		Use the SDL True-type font library (implies sdl
	sdl-image	Use the SDL True-type font library (implies sdl
	sdl-mixer	Use the SDL audio mixer library (implies sdl
	openal		Use the OpenAL library (incompatable with sdl-mixer)
	devil		Use the DevIL image library

  If you use GNU make to build your project, you may want to include the
  mk/config.gmk file in your makefile.  Define the SML3D_CONFIG_OPTIONS make
  variable to the components that you are using and use the MLTON_FLAGS
  variable as an argument to the mlton command.


  The sml3d library has been ported to work on Windows XP and Windows
  Vista using the MinGW/MSys installation that comes with the MLton
  MSI files (http://mlton.org/Experimental).  When using the GLUT library
  on Windows, you need to make sure that Windows can find the GLUT DLL.
  If your sml3d tree is in


  then add


  to your PATH variable.


  The SML3d library assumes that your system has OpenGL 2.1 available.
  It can be configured to use other libraries:

	GLUT		Available with most OpenGL systems.  An alternative
			is available from http://freeglut.sourceforge.net.
			For Windows systems (using MinGW), we have included
			GLUT support in the SML3d distribution.
	SDL		http://www.libsdl.org
	SDL_image	http://www.libsdl.org/projects/SDL_image
	SDL_ttf		http://www.libsdl.org/projects/SDL_ttf
	SDL_mixer	http://www.libsdl.org/projects/SDL_mixer
	OpenAL		http://openal.org
	DevIL		http://openil.sourceforge.net


	  common	- SML code for vectors, matrices, etc.
	  devil		- support for image I/O based on DevIL
	  glut		- SML interface to the GLUT library
	  gui		- A simple, GLUT-based, GUI library
	  image		- basic image support
	  loaders	- loaders for some 3D file formats
	  openal	- SML interfaces to OpenAL
	  opengl	- SML interfaces to the GL and GLU libraries
	  particles	- A library for particle effects.
	  sdl		- SML interfaces to SDL and related libraries
	  tests		- test programs
	  util		- various utility modules
	examples/	- some example programs
	gen/		- code to generate the FFI glue code for OpenGL.
	windows/	- extra support files for Windows systems (requires


  If you have downloaded the sml3d sources from svn, then you need a few
  extra steps to build the system.

	1) generating glue code.  The FFI glue code is generated from
	   a XML description.  To build the glue code, you will need a
	   recent version of SML/NJ (110.68+).  Then execute the following

		% cd gen
		% sml
		- CM.make "sources.cm";
		- Gen.default ();

	2) The next step is to generate the configure file.  From the
	   sml3d directory,

		% autoconf -Iconfig

	3) follow the INSTALLATION instructions from above.

	image loaders (ppm, pgm, png, jpeg)
	model loaders (obj and mtl files)

This software is Copyright (c) 2008 John Reppy (All rights reserved).  It is
distributed under the GNU GENERAL PUBLIC LICENSE (Version 2).  See the COPYING
file for details.

ViewVC Help
Powered by ViewVC 1.0.0