ivideo/rendermesh.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 2002 by Marten Svanfeldt 00003 Anders Stenberg 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 #ifndef __CS_IVIDEO_RENDERMESH_H__ 00021 #define __CS_IVIDEO_RENDERMESH_H__ 00022 00031 #include "csutil/strset.h" 00032 #include "csutil/ref.h" 00033 #include "ivideo/graph3d.h" 00034 #include "ivideo/shader/shader.h" 00035 #include "csgfx/shadervarcontext.h" 00036 00037 class csVector3; 00038 class csVector2; 00039 class csColor; 00040 class csReversibleTransform; 00041 struct iTextureHandle; 00042 struct iMaterialWrapper; 00043 struct iMeshFactory; 00044 struct iPortalContainer; 00045 00052 struct csRenderMeshModes 00053 { 00054 csRenderMeshModes () 00055 { 00056 z_buf_mode = CS_ZBUF_NONE; 00057 mixmode = CS_FX_COPY; 00058 alphaType = csAlphaMode::alphaNone; 00059 } 00060 00061 ~csRenderMeshModes () { } 00062 00064 csZBufMode z_buf_mode; 00065 00067 uint mixmode; 00068 00070 csAlphaMode::AlphaType alphaType; 00071 }; 00072 00076 struct csCoreRenderMesh 00077 { 00082 const char* db_mesh_name; 00083 00084 csCoreRenderMesh () 00085 { 00086 clip_portal = 0; 00087 clip_plane = 0; 00088 clip_z_plane = 0; 00089 do_mirror = false; 00090 indexstart = indexend = 0; 00091 00092 db_mesh_name = "<unknown>"; 00093 } 00094 00095 ~csCoreRenderMesh () {} 00096 00098 int clip_portal; 00099 00101 int clip_plane; 00102 00104 int clip_z_plane; 00105 00122 bool do_mirror; 00123 00125 csRenderMeshType meshtype; 00126 00128 unsigned int indexstart; 00129 00131 unsigned int indexend; 00132 00134 csReversibleTransform object2camera; 00135 00137 csOrthoTransform *camera_transform; 00138 00140 //iMaterialHandle* mathandle; 00141 // @@@ FIXME: SW needs it 00142 iMaterialWrapper* material; 00143 }; 00144 00149 struct csRenderMesh : public csCoreRenderMesh, public csRenderMeshModes 00150 { 00151 csRenderMesh () 00152 { 00153 portal = 0; 00154 geometryInstance = 0; 00155 lastFrame = ~0; 00156 } 00157 00158 ~csRenderMesh () {} 00159 00165 void *geometryInstance; 00166 00168 iPortalContainer* portal; 00169 00171 csRef<iShaderVariableContext> variablecontext; 00172 00177 uint lastFrame; 00178 00180 csVector3 camera_origin; 00181 }; 00182 00185 #endif // __CS_IVIDEO_RENDERMESH_H__
Generated for Crystal Space by doxygen 1.2.18
