leto@calodox.org
Demoniac has been designed to help people code effects, so it's really easy to do. Either openGL or software effects are simple to code for Demoniac.
To compile Demoniac itself, a few libraries are needed:
Gtk 1.2, at http://www.gtk.org/
Gtk GL area at http://www.student.oulu.fi/~jlof/gtkglarea/
For windows, i've made a package. Get it on
http://www.calodox.org/demoniac/.
You need then a C++ compiler. With Visual Studio, make sure to add the 'include' directory to the include search path.
Once you're able to compile Demoniac, you can start coding your effect.
Read fx.h, it's heavily commented, just for you :-)
The general idea is to create a new class, let's say FXFoo for this tutorial, that derivates from FXGeneric. Being an FXGeneric, the FXFoo class will be recognized by Demoniac1.
FXFoo has an integer parameter, called bar. ''bar'' is a private member of FXFoo. Here's the general structure of FXFoo:
class FXFoo : public FXGeneric {
private:
// options variables
int bar;
// private methods
public:
// FXGeneric methos..
};
In FXFoo's constructor, we'll initialize bar to it's default value. This step is important: Demoniac expects options to be initialized when registering them. Then, in the registerOptions method of FXFoo, we'll call registerIntOpt("Bar", 0, &bar); to register the option to Demoniac. That's it. The effect code will be in the render() method of FXFoo.
Don't start from scratch. Copy an existing effect, and hack from it. The FXClear effect is quite a good start for any OpenGL effect. The FXFire effect shows how to make 2D effects. Easy.
And mail me if you have questions. mailto: leto@calodox.org.
This document was generated using the LaTeX2HTML translator Version 99.2beta6 (1.42)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -t 'Calodox Demoniac Programming Guide' -dir /home/leto/public_html/demoniac/programming -split 0 -local_icons -address leto@calodox.org programming.tex
The translation was initiated by Julien Pilet on 2001-10-13