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  
00034 #ifndef N_STATE
00035 #define N_STATE
00036 
00037 namespace Fluxus
00038 {
00039 
00040 #define HINT_NONE         0x0000
00041 #define HINT_SOLID        0x0001
00042 #define HINT_WIRE         0x0002
00043 #define HINT_NORMAL       0x0004
00044 #define HINT_POINTS       0x0008
00045 #define HINT_AALIAS       0x0010
00046 #define HINT_BOUND        0x0020
00047 #define HINT_UNLIT        0x0040
00048 #define HINT_VERTCOLS     0x0080
00049 #define HINT_MULTITEX     0x0100
00050 #define HINT_ORIGIN       0x0200
00051 #define HINT_CAST_SHADOW  0x0400
00052 #define HINT_IGNORE_DEPTH 0x0800
00053 #define HINT_DEPTH_SORT   0x1000
00054 #define HINT_LAZY_PARENT  0x2000
00055 
00057 #ifdef ENABLE_MULTITEXTURE
00058 #define MAX_TEXTURES  8
00059 #else
00060 #define MAX_TEXTURES  1
00061 #endif
00062 
00068 class State
00069 {
00070 public:
00071     State();
00072     
00073     void Apply();
00074     void Spew();
00075     
00076     dColour Colour;
00077     dColour Specular;
00078     dColour Emissive;
00079     dColour Ambient;
00080     float Shinyness;
00081     float Opacity;
00082     unsigned int Textures[MAX_TEXTURES];
00083     
00084     int Parent;
00085     int Hints;
00086     float LineWidth;
00087     float PointWidth;
00088     
00089     int SourceBlend;
00090     int DestinationBlend;
00091     dColour WireColour; 
00092     
00093     dMatrix Transform;
00094     
00095     GLSLShader *Shader;
00096 };
00097 
00098 };
00099 
00100 #endif

Generated on Tue Sep 4 23:22:18 2007 for The Fluxus Renderer (libfluxus) by  doxygen 1.5.1