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 #define HINT_CULL_CCW       0x4000
00057 
00059 #ifdef ENABLE_MULTITEXTURE
00060 #define MAX_TEXTURES  8
00061 #else
00062 #define MAX_TEXTURES  1
00063 #endif
00064 
00070 class State
00071 {
00072 public:
00073     State();
00074     State(const State &other);
00075     ~State();
00076 
00077     const State &operator=(const State &other);
00078 
00079     void Apply();
00080     void Spew();
00081 
00082     dColour Colour;
00083     dColour Specular;
00084     dColour Emissive;
00085     dColour Ambient;
00086     float Shinyness;
00087     float Opacity;
00088     unsigned int Textures[MAX_TEXTURES];
00089     TextureState TextureStates[MAX_TEXTURES];
00090     int Parent;
00091     int Hints;
00092     float LineWidth;
00093     float PointWidth;
00094     int SourceBlend;
00095     int DestinationBlend;
00096     dColour WireColour;
00097     float WireOpacity;
00098     COLOUR_MODE ColourMode;
00099     dMatrix Transform;
00100     GLSLShader *Shader; 
00101     bool Cull;
00102 };
00103 
00104 };
00105 
00106 #endif

Generated on Wed Sep 17 21:16:30 2008 for The Fluxus Renderer (libfluxus) by  doxygen 1.5.1