summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-04-27 00:04:48 +0000
committerIan C <ianc@noddybox.co.uk>2005-04-27 00:04:48 +0000
commit3ecd4938767e9fab5a80861fc755dd303da7cfb3 (patch)
tree1f75c4ac2e55d37121dfcf02903da64cb605df87 /docs
parent6982662a9ce191b52cb908909c003a3d093faa5b (diff)
Document updates and fixed use of <cfloat> in OpenGL
Diffstat (limited to 'docs')
-rw-r--r--docs/msGLExport.txt214
-rw-r--r--docs/msGrpExplode.txt35
2 files changed, 248 insertions, 1 deletions
diff --git a/docs/msGLExport.txt b/docs/msGLExport.txt
index f3cb54b..8eff565 100644
--- a/docs/msGLExport.txt
+++ b/docs/msGLExport.txt
@@ -1 +1,213 @@
-!! TODO !!
+ Milkshape Simple OpenGL Exporter
+ --------------------------------
+
+This exporter outputs simple OpenGL as either C-source or BlitzMax compatible
+source.
+
+To use select 'Simple OpenGL' from the 'Export' menu. When activated a dialog
+is displayed with the following items:
+
+
+Info
+
+ A text box with some basic info on the model and what will be created.
+
+
+Directory
+
+ The directory that the sources will be generated in. Use the button
+ with the 3 periods to the left to select the directory.
+
+
+Class/Function name
+
+ The name of the generated function or class.
+
+
+Use Textures
+
+ Outputs the required 2D texture commands.
+
+
+Generate Info
+
+ Defines some macros or constants that define info on the model,
+ such as its size, largest co-ordinates and centre of gravity.
+
+
+Force COG to 0,0,0
+
+ The centre of gravity of the model is defined as the mid-point between
+ the most distance vertices. If you select this then the co-ordinates
+ are adjusted so that the model is centered on 0,0,0.
+
+
+Generate for BlitzMax
+
+ If selected generates source for use with BlitzMax, otherwise C sources
+ are generated. See the following sections describing what's generated
+ for each language type.
+
+
+Generate for lit scenes
+
+ If selected then the appropriate Open GL commands are output setting
+ the ambient, diffuse, specular and emissive colours.
+
+ If not selected, then the vertexes are given a simple colour taken
+ from the materials diffuse colour (or white if no material is
+ defined).
+
+
+
+---------------------------------------------------------------------------
+C Usage
+---------------------------------------------------------------------------
+
+To use the C source in your project, assuming you gave the function name as
+Test, simply include Test.c and #include "Test.h" to use the model. The
+function either has the prototype:
+
+void Test(GLfloat x, GLfloat y, GLfloat z,
+ GLfloat rot_x, GLfloat rot_y, GLfloat rot_z)
+
+or if 'Use Textures' was selected:
+
+void Test(GLfloat x, GLfloat y, GLfloat z,
+ GLfloat rot_x, GLfloat rot_y, GLfloat rot_z,
+ GLint texture_id);
+
+
+Simply call it with a position and rotation (and texture ID if needed) to draw
+the model. Obviously the function can be called as many times as required
+during scene generation.
+
+Also generated is this function:
+
+int Test2_CreateList(void);
+
+If this is called then a OpenGL display list for the model is created (the
+function returns FALSE if the list couldn't be created). The Test() function
+will automatically use this list once it's created.
+
+
+If 'Generate Info' was selected, then the following macros are defined:
+
+
+TEST_COG_X
+TEST_COG_Y
+TEST_COG_Z
+
+ Defines the COG of the model (always zeros if 'Force COG ...' was
+ selected).
+
+
+TEST_MIN_X
+TEST_MAX_X
+TEST_MIN_Y
+TEST_MAX_Y
+TEST_MIN_Z
+TEST_MAX_Z
+
+ The maximum and minimum vertex values for each axis.
+
+
+TEST_SIZE_X
+TEST_SIZE_Y
+TEST_SIZE_Z
+
+ The size of the model along each axis.
+
+
+TEST_TEXTURED
+
+ Set to one if 'Use Textures' was selected. Otherwise zero.
+
+
+TEST_MATERIALS
+
+
+ Set to one if 'Generate for lit scenes' was selected. Otherwise zero.
+
+
+
+---------------------------------------------------------------------------
+BlitzMAX Usage
+---------------------------------------------------------------------------
+
+To use the source in your project, assuming you gave the function name as
+Test, simply include "Test.bmx" to use the model. This defines a class called
+Test, which has the following fields:
+
+
+Field x:Float
+Field y:Float
+Field z:Float
+Field rot_x:Float
+Field rot_y:Float
+Field rot_z:Float
+
+ These defines the position and orientation of each instance.
+
+
+Function Create:Test()
+
+ Used to create an instance.
+
+
+Method Render() *OR*
+Method Render(texture_id:Int)
+
+ Renders the model (with the supplied texture if 'Use Textures' was
+ selected).
+
+
+Function CreateDisplayList:Int()
+
+ Creates a common OpenGL display list used by all instances of the
+ class. Returns True if the list was created, otherwise False.
+
+ Note that Render() will use the display list automatically if it's
+ been created.
+
+
+If 'Generate Info' was selected, then the following constants are defined:
+
+Const COG_X:Float
+Const COG_Y:Float
+Const COG_Z:Float
+
+ Defines the COG of the model (always zeros if 'Force COG ...' was
+ selected).
+
+
+Const MIN_X:Float
+Const MAX_X:Float
+Const MIN_Y:Float
+Const MAX_Y:Float
+Const MIN_Z:Float
+Const MAX_Z:Float
+
+ The maximum and minimum vertex values for each axis.
+
+
+Const SIZE_X:Float
+Const SIZE_Y:Float
+Const SIZE_Z:Float
+
+ The size of the model along each axis.
+
+
+Const TEXTURED:Int
+
+ Set to True if 'Use Textures' was selected. Otherwise False.
+
+
+Const MATERIALS:Int
+
+
+ Set to True if 'Generate for lit scenes' was selected. Otherwise False.
+
+
+-------------------------------------------------------------------------------
+$Id$
diff --git a/docs/msGrpExplode.txt b/docs/msGrpExplode.txt
new file mode 100644
index 0000000..85668f6
--- /dev/null
+++ b/docs/msGrpExplode.txt
@@ -0,0 +1,35 @@
+ Milkshape Group Exploder
+ ------------------------
+
+This tool simply allows you to explode a group so that all the triangles in
+it are now in a group of their own.
+
+To use select 'Group Exploder' from the 'Tools' menu. When activated a dialog
+is displayed with the following items:
+
+
+Select Group to explode
+
+ Simply select the group name to explode.
+
+
+Remove original mesh
+
+ If this is selected then the original group is removed.
+
+
+Collate triangles with identical normals
+
+ If this is selected then traingles where the vertex normals all match
+ (ie. they are on the same plane) are grouped together into a group.
+
+ For instance, if exploding a cube then you end up with 6 new groups,
+ each containing two triangles that make up one face of the cube.
+
+
+When OK is selected the group is exploded and new groups created. These new
+groups will be assigned the same material as the original group.
+
+
+----------------------------------------------------------------------------
+$Id$