libmove3d
3.13.0
|
00001 #ifndef _G3D_STATES_H 00002 #define _G3D_STATES_H 00003 00004 #ifdef USE_SHADERS 00005 #include <GL/glew.h> 00006 #endif 00007 00008 #ifndef PROTO 00009 #include <stdlib.h> 00010 #include <math.h> 00011 #if defined(MACOSX) 00012 #if defined(QT_LIBRARY) && defined (CXX_PLANNER) 00013 #include "gl.h" 00014 #include "glu.h" 00015 #else 00016 #include <GL/glu.h> 00017 #endif 00018 #else 00019 #include "GL/gl.h" 00020 #include "GL/glu.h" 00021 #endif 00022 #ifdef UNIX 00023 // #include "GL/glx.h" 00024 // #include "forms.h" 00025 #endif 00026 #endif 00027 00028 #define INIT_AZ 0.3 /* 20 degrees */ 00029 #define INIT_EL 0.5 /* 30 degrees */ 00030 #define GAIN_AZ 1.5 00031 #define GAIN_EL 1.5 00032 00037 typedef enum { 00038 NORMAL, 00039 OBJECTIF, 00040 DIFFERENCE 00041 } g3d_window_draw_mode; 00042 00044 typedef enum { 00045 G3D_PERSPECTIVE, 00046 G3D_ORTHOGRAPHIC, 00047 } g3d_projection_mode; 00048 00050 typedef enum { 00051 G3D_TRANSPARENT, 00052 G3D_OPAQUE, 00053 G3D_TRANSPARENT_AND_OPAQUE, 00054 G3D_NO_TRANSPARENCY, 00055 } g3d_transparency_mode; 00056 00057 00058 typedef struct g3d_states 00059 { 00060 float bg[3]; 00061 float size; 00062 GLdouble x,y,z,el,az,zo; 00063 p3d_vector4 up; 00064 GLdouble sx,sy,sz,sel,saz,szo; 00065 p3d_vector4 sup; 00066 int FILAIRE, CONTOUR, GHOST, GOURAUD, BB, ACTIVE, list; 00067 GLfloat frustum[6][4]; /* 6 x 4 flottants correspondant au coeffs de frustum de vue*/ 00068 GLdouble fov; 00069 p3d_vector3 cameraPosition; 00071 g3d_projection_mode projection_mode; 00073 00074 GLfloat lightPosition[4]; 00075 00077 GLdouble floorColor[3]; 00078 00080 GLdouble wallColor[3]; 00081 00083 GLdouble floorPlane[4]; 00084 00086 GLdouble wallPlanes[4][4]; 00087 00089 GLdouble floorShadowMatrix[16]; 00090 00092 GLdouble wallShadowMatrix[4][16]; 00093 00095 g3d_transparency_mode transparency_mode; 00096 00097 00100 unsigned int eventsEnabled; 00101 00104 unsigned int cullingEnabled; 00105 00107 unsigned int displayFrame; 00108 00110 unsigned int displayJoints; 00111 00113 unsigned int enableLight; 00114 00116 unsigned int cameraBoundedLight; 00117 00119 unsigned int displayShadows; 00120 00122 unsigned int displayWalls; 00123 00125 unsigned int displayFloor; 00126 00128 unsigned int displayTiles; 00129 00131 unsigned int enableAntialiasing; 00132 00134 unsigned int enableShaders; 00135 00138 unsigned int allIsBlack; 00139 00141 GLuint logoTexture; 00142 00144 unsigned int enableLogo; 00145 00147 unsigned int displaySky; 00148 00149 } g3d_states; 00150 00151 #endif