BIG UPDATE
-new command
-syntax command have change
-full support for 3,4 greyscale lvl and blck and white
-some very basic lightning stuff
-sorry no texture
List of command
-special command :
must be the first thing after the axe header, and they all must be here
-0/1->°LightOn toggle on/off the lightning engine (save weight if you don't need it)
-0/1->°GBW
-0/1->°G3GreyLVL
-0/1->°G4GreyLVL one of these three command must be on, and only one : choose the mode of display
-commands :
-GInit(FLAG)
init the declaration of vertex
FLAG is °GTRIANGLE or °GQUADRI
-GVertex(X,Z,Y)
define a vertex
draw when there is 3,or 4 vertices defines, depend on the FLAG option
-THE GEND() FUNCTION HAS BEEN REMOVE
-GRestoreID(NB_OF_FACE)
restore the list use for GDrawArray
-GSortID(ADD,NB_OF_FACE)
sort the faces depending of the distance from the point in ADD and the pos of camera
ADD have the following format :
Data(X,Z,Y,X2,Z2,Y2 ...
-GDrawArray(ADD,NB_OF_FACE)
draw an array of vertex who have the following format :
Data(Norm,COLOR
Data(X,Z,Y
....
The number of vertex depend of the FLAG use to init
you can skip the second parameter if you have used GSortID() just before
color is all the following FLAG+ the flag °GLAMBERT, if you want to use light
FLAG->GColor
set the current face color
FLAG is :
in B&W mode
°GWHITE
°GBLACK
in 3GreyScale LVL
°GWHITE
°GGREY
°GBLACK
in 4 greyscales LVL
°GWHITE
°GGREY30
°GGREY60
°GBLACK
in all mode :
°GTWHITE (wired aspect)
to use a light:
before the main loop put :
-1->{°GLIGHT}^r
in or before :
X->{°GLIGHT+3}
where x is the norm of the light
after, before the vertices def., you place GCalcLight(NORM_OF_FACE)->GColor at the place of FLAG->GColor
or use °GLAMBERT Flag if you use GDrawArray()
-GGetkey()
handle all the getkey
next step :
-Light at the same time than a Color definition (add the two)
-Texture
and two screenshot, B&W mode; 3 GreyLVL Mode, the lib (ver 0.1) and the example prog (note that I temporaly remove the Splash screen)