From: beck@irzr17.inf.tu-dresden.de (Andre Beck)
Subject: RE: need shading program example in X
Reply-To: Andre_Beck@IRS.Inf.TU-Dresden.DE
Organization: Dept. of Computer Science, TU Dresden, Germany.
Lines: 43
NNTP-Posting-Host: irzr17.inf.tu-dresden.de


In article <930421105641.100043a@TGV.COM>, mahan@TGV.COM (Patrick L. Mahan) writes:
|> 
|> #
|> #Do anyone know about any shading program based on Xlib in the public domain?
|> #I need an example about how to allocate correct colormaps for the program.
|> #
|> #Appreciate the help.
|> #
|> 
|> I don't know if this might help, but I've just started playing with a program
|> called POVRay (Persistance of Vision Raytracer) that also displays its output
|> via X Windows.  It does a fairly good job of allocating the colormap on my
|> Psuedo-Color 8-plane display.  I got the source from from a site in Canda.
|> The person I retrieved them from was David Buck (dbuck@ccs.carleton.ca).
|> 

I think the original post was searching for existing implementations of
f.i. Gouroud-shading of triangles. This is fairly complex to do with plain
X. Simpler shading models are implemented already, f.i. in x3d (ask archie
where to get the latest version).
For Gouroud, a fast implementation will be possible utilizing some extension
only, either MIT-SHM to do the shade in an image and fast update the window
with it, or PEX/OpenGL which should be able to shade themselves. The portable
'vanilla X' way would be to shade in a normal XImage and use XPutImage(),
what would be good enough to do static things as f.i. fractal landscapes
or such stuff.

To speak about POVRay, the X previewer that comes with the original source
package is not that good, especially in speed, protocol-friendlyness and
ICCCM compliance. Have a look on x256q, my own preview code. It is on

141.76.1.11:pub/gfx/ray/misc/x256q/

The README states the points where it is better than xwindow.c from
POVRay 1.0

--
+-o-+--------------------------------------------------------------+-o-+
| o |                \\\-  Brain Inside -///                       | o |
| o |                    ^^^^^^^^^^^^^^^                           | o |
| o | Andre' Beck (ABPSoft) mehl: Andre_Beck@IRS.Inf.TU-Dresden.de | o |
+-o-+--------------------------------------------------------------+-o-+
