mesa/progs/demos
Brian Paul 5692e09be8 disable GL_TEXTURE_1D at end of frame to fix failed assertion 2008-04-29 15:03:06 -06:00
..
Windows Add the glut project to the demos workspace. 2004-10-01 20:55:23 +00:00
.gitignore Ignore generated files. 2007-10-25 23:25:02 +01:00
Makefile fix some dependencies, remove some CFLAGS 2007-04-08 15:42:26 -06:00
Makefile.cygnus Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything. 2003-06-05 00:50:18 +00:00
Makefile.win Windows updates 2007-04-26 07:48:35 -06:00
README initial check-in 2000-06-27 17:11:24 +00:00
arbfplight.c Optimize fragment program. 2007-10-27 19:04:19 +01:00
arbfslight.c Fix fragment shader. 2007-10-27 19:04:19 +01:00
arbocclude.c Add #ifdefs for extension testing (Marcello Magallon) 2005-01-09 17:00:57 +00:00
bounce.c Remove unneeded includes of time.h 2006-03-29 02:09:47 +00:00
clearspd.c Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything. 2003-06-05 00:50:18 +00:00
cubemap.c Add missing call to glutInit. 2006-10-24 20:50:08 +00:00
drawpix.c call glFinish if drawing to front buffer 2005-09-29 18:46:27 +00:00
engine.c code to draw engine block 2006-08-01 20:03:05 +00:00
fire.c s/Togle/Toggle/ 2005-04-04 20:06:40 +00:00
fogcoord.c lots of changes, fixes, clean-ups 2007-04-16 17:56:13 -06:00
fplight.c destroy window upon exit 2007-04-21 10:05:05 -06:00
fslight.c mesa: test code to exercise more GLSL functions 2008-04-04 18:56:22 -06:00
gamma.c Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything. 2003-06-05 00:50:18 +00:00
gearbox.c use fmod() when incrementing CubeRot 2006-01-30 15:35:35 +00:00
gears.c push out far clip plane to 200 2008-01-28 12:42:37 -07:00
geartrain.c call glutInit(), bug 11486 2007-07-06 12:56:21 -06:00
geartrain.dat Convert crlf->lf line endings. 2008-02-28 15:53:13 +09:00
glinfo.c Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything. 2003-06-05 00:50:18 +00:00
gloss.c use trackball code for mouse rotation 2006-06-26 23:00:15 +00:00
glslnoise.c Optimize shaders. 2006-07-29 09:42:03 +00:00
gltestperf.c call glutInit(), bug 11486 2007-07-06 12:56:21 -06:00
glutfx.c Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything. 2003-06-05 00:50:18 +00:00
ipers.c better animate rate (Marcelo Magallon) 2005-01-09 17:37:50 +00:00
isosurf.c call glutInit(), bug 11486 2007-07-06 12:56:21 -06:00
isosurf.dat Initial revision 1999-08-19 00:55:39 +00:00
lodbias.c press 0,1,2,etc keys for specific bias values 2008-02-12 15:01:44 -07:00
morph3d.c call glutInit(), bug 11486 2007-07-06 12:56:21 -06:00
multiarb.c include readtex.h 2005-01-09 17:39:06 +00:00
occlude.c use 'a' to toggle animation 2004-08-10 15:36:31 +00:00
paltex.c silence warning 2004-08-10 15:36:46 +00:00
particles.cxx initial check-in 2000-06-27 16:52:38 +00:00
particles.h initial check-in 2000-06-27 16:52:38 +00:00
pointblast.c check for GL_ARB_point_parameters 2006-08-28 14:20:19 +00:00
rain.cxx s/Togle/Toggle/ 2005-04-04 20:06:40 +00:00
ray.c compile fix from Dan Schikore 2006-04-13 01:49:45 +00:00
readpix.c allocate larger TempImage, use COMBO var to choose test format/type 2006-09-23 16:09:26 +00:00
reflect.c press '0' for glDrawBuffer(GL_NONE) 2006-03-30 14:24:58 +00:00
renormal.c better animate rate (Marcelo Magallon) 2005-01-09 17:37:50 +00:00
shadowtex.c disable GL_TEXTURE_1D at end of frame to fix failed assertion 2008-04-29 15:03:06 -06:00
singlebuffer.c Demo of how to do (nearly) flicker-free rendering with a single color buffer. 2005-08-25 23:25:25 +00:00
spectex.c Add a mode to test flat shading + separate specular. 2005-06-01 07:02:23 +00:00
spriteblast.c use larger point/sprite size 2007-06-28 07:16:13 -06:00
stex3d.c Fix command line parsing. 2006-06-13 08:37:03 +00:00
streaming_rect.c merge the (rest of) texmem branch 2006-11-01 14:26:10 +00:00
teapot.c s/Togle/Toggle/ 2005-04-04 20:06:40 +00:00
terrain.c s/Togle/Toggle/ 2005-04-04 20:06:40 +00:00
terrain.dat terrain demo data 2000-09-12 17:58:27 +00:00
tessdemo.c move #include <GL/glut.h> after other #includes for Windows 2007-04-26 07:46:59 -06:00
texcyl.c mesa: destroy window upon exit 2008-04-01 14:56:10 -06:00
texdown.c Fix bug#9673 2007-01-17 10:17:10 +08:00
texenv.c mesa: call glutDestroyWindow (help find mem leaks) 2008-03-24 17:21:18 -06:00
texobj.c better animate rate (Marcelo Magallon) 2005-01-09 17:37:50 +00:00
trispd.c Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything. 2003-06-05 00:50:18 +00:00
tunnel.c s/Togle/Toggle/ 2005-04-04 20:06:40 +00:00
tunnel2.c s/Togle/Toggle/ 2005-04-04 20:06:40 +00:00
tunneldat.h clean-up of tunnel demos 2001-03-27 17:30:51 +00:00
vao_demo.c casts and assertions 2006-08-01 20:03:29 +00:00
winpos.c call glutInit(), bug 11486 2007-07-06 12:56:21 -06:00

README

INTRODUCTION
------------

This directory is usually included in the Mesa demos distribution or
in the GLUT distribution.

I have written the demos included in this directory mainly for showing
the capabilities of the Mesa library when using the Voodoo driver.
However all the demos are written using the GLUT and OpenGL so they
work with any GLUT/OpenGL platform (tested: Linux+Mesa+Voodoo driver,
Linux+Mesa+X11 driver, Win95+Mesa+Voodoo driver and SGI Onyx IR thanks
to Mark Kilgard).

All the demos make an heavy use of texture mapping, blending, etc. so
you _need_ some kind of hardware support for the OpenGL otherwise they
will run at ~1fps. You need also a OpenGL 1.1 compliant library.

You can find some screenshot of these demos at
http://www-hmw.caribel.pisa.it/fxmesa/fxdemos.hmtl

Write me if you find some bug in the demos.

David Bucciarelli (tech.hmw@plus.it)

Humanware s.r.l.
Via XXIV Maggio 62
Pisa, Italy
Tel./Fax +39-50-554108
email: info.hmw@plus.it
www: www-hmw.caribel.pisa.it


A BRIEF DESCRIPTION OF THE DEMOS
--------------------------------


IPERS
-----

Sources: ipers.c image.c

A nice spinning fractal object.


RAY
---

Sources: ray.c

I'm using ray tracing to dynamically generate texture maps with
specular, diffuse, shadows, and mirror colors. Each frame the texture
maps of the plane and of the sphere are partially updated.  With this
technique you can obtain true mirrors, shadows, specular highlights,
bump mapping, etc. in realtime.  This demo is really CPU intensive
(~25fps on a PentiumII@300MHz with a Pure3D).  Support on-the-fly
switching between fullscreen and in-window rendering under Linux/Mesa
(start your X server in 16 bpp mode and press the spacebar).


TUNNEL
------

Sources: tunnel.c image.c sources.c
Data: bw.rgb tile.rgb

The model was designed and prelighted with Alias|Wavefront
PowerAnimator V8. Triangle strips were built with a tool written by me
and then statically included in the sources.  This demo doesn't
require the ZBuffer and use antialiased polygons.  Support on-the-fly
switching between fullscreen and in-window rendering under Linux/Mesa
(start your X server in 16 bpp mode and press the spacebar).


TUNNEL2
------

Sources: tunnel2.c image.c sources.c
Data: bw.rgb tile.rgb

The some tunnel demo but with two output channels. A nice
example of the Mesa/Voodoo support for multiple boards in
the some PC.


TEAPOT
------

Sources: teapot.c image.c dteapot.c shadow.c
Data: bw.rgb tile.rgb

The shadow is drawn projecting the teapot geometry over the plane. All
other light effects are drawn using the standard OpenGL capabilities.
Support on-the-fly switching between fullscreen and in-window
rendering under Linux/Mesa (start your X server in 16 bpp mode and
press the spacebar).


FIRE
----

Sources: fire.c image.c
Data: s128.rgb tree2.rgb

The demo use a small particle system to draw some nice visual effect.
You can interactively change many parameters of the particle system
and you can choose the number of particles at the startup ('fire
4000').  This demo should be called fountain.  Support on-the-fly
switching between fullscreen and in-window rendering under Linux/Mesa
(start your X server in 16 bpp mode and press the spacebar).


TERRAIN
-------

Sources: mesaland.c

This demo is base on another demo written by Mikael SkiZoWalker.  I
have added the capabilities to freely fly around, view culling and
some nice color.  Support on-the-fly switching between fullscreen and
in-window rendering under Linux/Mesa (start your X server in 16 bpp
mode and press the spacebar).


GLTEST
------

Sources: gltest.c

This is a simple benchmark suite that I'm using in the development of
the Mesa/Voodoo driver. Type 'gltest >my.res' and you will get some
data about the performances of your OpenGL. Follow the results with my
PC (Linux+Mesa-2.6+PentiumII@300MHz+Pure3D):

Simple Points
587900.080674 Pnts/sec

Smooth Lines
SIZE=480 => 39007.426183 Lins/sec
SIZE=250 => 74575.016485 Lins/sec
SIZE=100 => 179734.882409 Lins/sec
SIZE=050 => 183987.795297 Lins/sec
SIZE=025 => 183820.086309 Lins/sec


ZSmooth Triangles
SIZE=480 => 784.954997 Tris/sec
SIZE=250 => 2862.325889 Tris/sec
SIZE=100 => 17779.492938 Tris/sec
SIZE=050 => 159339.829844 Tris/sec
SIZE=025 => 428602.984008 Tris/sec


ZSmooth Tex Blend Triangles
SIZE=480 => 784.473931 Tris/sec
SIZE=250 => 2853.781513 Tris/sec
SIZE=100 => 17598.252146 Tris/sec
SIZE=050 => 152632.578337 Tris/sec
SIZE=025 => 377584.760048 Tris/sec


ZSmooth Tex Blend TMesh Triangles
SIZE=400 => 563.900695 Tris/sec, MPixel Fill/sec: 45.112056
SIZE=250 => 1449.777225 Tris/sec, MPixel Fill/sec: 45.305538
SIZE=100 => 8702.869121 Tris/sec, MPixel Fill/sec: 43.514346
SIZE=050 => 31896.867466 Tris/sec, MPixel Fill/sec: 39.871084
SIZE=025 => 114037.262894 Tris/sec, MPixel Fill/sec: 35.636645
SIZE=010 => 220494.235839 Tris/sec, MPixel Fill/sec: 11.024712
SIZE=005 => 225615.506651 Tris/sec, MPixel Fill/sec: 2.820194
SIZE=002 => 225607.681439 Tris/sec, MPixel Fill/sec: 0.451215


Color/Depth Buffer Clears
295.042474 Clrs/sec, MPixel Fill/sec: 90.553256


Follow the results with my
PC (Linux+Mesa-3.0beta5+PentiumII@300MHz+Voodoo2):


Simple Points
1620113.525130 Pnts/sec

Smooth Lines
SIZE=480 => 73841.166065 Lins/sec
SIZE=250 => 140794.035316 Lins/sec
SIZE=100 => 344185.242157 Lins/sec
SIZE=050 => 420399.008289 Lins/sec
SIZE=025 => 420261.389773 Lins/sec


ZSmooth Triangles
SIZE=480 => 1434.668506 Tris/sec
SIZE=250 => 5228.449614 Tris/sec
SIZE=100 => 46603.815842 Tris/sec
SIZE=050 => 325757.045961 Tris/sec
SIZE=025 => 589022.403336 Tris/sec


ZSmooth Tex Blend Triangles
SIZE=480 => 1414.900041 Tris/sec
SIZE=250 => 5006.055235 Tris/sec
SIZE=100 => 43602.252031 Tris/sec
SIZE=050 => 303497.092692 Tris/sec
SIZE=025 => 517087.428669 Tris/sec


ZSmooth Tex Blend TMesh Triangles
SIZE=400 => 1023.273112 Tris/sec, MPixel Fill/sec: 81.861849
SIZE=250 => 2595.692121 Tris/sec, MPixel Fill/sec: 81.115379
SIZE=100 => 15788.198912 Tris/sec, MPixel Fill/sec: 78.940995
SIZE=050 => 58784.121300 Tris/sec, MPixel Fill/sec: 73.480152
SIZE=025 => 244233.873481 Tris/sec, MPixel Fill/sec: 76.323085
SIZE=010 => 474995.004191 Tris/sec, MPixel Fill/sec: 23.749750
SIZE=005 => 475124.354163 Tris/sec, MPixel Fill/sec: 5.939054
SIZE=002 => 474959.089503 Tris/sec, MPixel Fill/sec: 0.949918


Color/Depth Buffer Clears
478.654830 Clrs/sec, MPixel Fill/sec: 146.906826


PALTEX and GLBPALTX
-------------------

Sources: paltex.c and glbpaltx.c

The PALTEX example was written by Brian Paul and it shows the
capabilities of the GL_EXT_paletted_texture extension.  I have written
the other example in order to show the capabilities of the
gl3DfxSetPaletteEXT() (it used only by GLQuake and Quake2).