State.h

Go to the documentation of this file.
00001 // Copyright (C) 2005 Dave Griffiths
00002 //
00003 // This program is free software; you can redistribute it and/or modify
00004 // it under the terms of the GNU General Public License as published by
00005 // the Free Software Foundation; either version 2 of the License, or
00006 // (at your option) any later version.
00007 //
00008 // This program is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 // GNU General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU General Public License
00014 // along with this program; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00016             
00017 #ifdef GLSL
00018 #include "GL/glew.h"
00019 #endif
00020 #ifndef __APPLE__
00021 #include "GL/gl.h"
00022 #include "GL/glu.h"
00023 #include "GL/glut.h"
00024 #else
00025 #include "OpenGL/gl.h"
00026 #include "OpenGL/glu.h"
00027 #include "GLUT/glut.h"
00028 #endif
00029 
00030 #include "dada.h"
00031 #include "iostream"  
00032 #include "GLSLShader.h" 
00033 #include "TexturePainter.h" 
00034  
00035 #ifndef N_STATE
00036 #define N_STATE
00037 
00038 namespace Fluxus
00039 {
00040 
00041 #define HINT_NONE         0x0000
00042 #define HINT_SOLID        0x0001
00043 #define HINT_WIRE         0x0002
00044 #define HINT_NORMAL       0x0004
00045 #define HINT_POINTS       0x0008
00046 #define HINT_AALIAS       0x0010
00047 #define HINT_BOUND        0x0020
00048 #define HINT_UNLIT        0x0040
00049 #define HINT_VERTCOLS     0x0080
00050 #define HINT_MULTITEX     0x0100
00051 #define HINT_ORIGIN       0x0200
00052 #define HINT_CAST_SHADOW  0x0400
00053 #define HINT_IGNORE_DEPTH 0x0800
00054 #define HINT_DEPTH_SORT   0x1000
00055 #define HINT_LAZY_PARENT  0x2000
00056 
00058 #ifdef ENABLE_MULTITEXTURE
00059 #define MAX_TEXTURES  8
00060 #else
00061 #define MAX_TEXTURES  1
00062 #endif
00063 
00069 class State
00070 {
00071 public:
00072     State();
00073 
00074     void Apply();
00075     void Spew();
00076 
00077     dColour Colour;
00078     dColour Specular;
00079     dColour Emissive;
00080     dColour Ambient;
00081     float Shinyness;
00082     float Opacity;
00083     unsigned int Textures[MAX_TEXTURES];
00084     TextureState TextureStates[MAX_TEXTURES];
00085     
00086     int Parent;
00087     int Hints;
00088     float LineWidth;
00089     float PointWidth;
00090 
00091     int SourceBlend;
00092     int DestinationBlend;
00093 
00094     dColour WireColour;
00095     float WireOpacity;
00096 
00097     dMatrix Transform;
00098 
00099     GLSLShader *Shader;
00100 };
00101 
00102 };
00103 
00104 #endif

Generated on Mon Feb 11 06:54:25 2008 for The Fluxus Renderer (libfluxus) by  doxygen 1.5.1