CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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 "csgeom/transfrm.h"
00032 #include "csgeom/vector3.h"
00033 
00034 #include "ivideo/graph3d.h"
00035 #include "ivideo/shader/shader.h"
00036 
00037 struct iMaterialWrapper;
00038 struct iPortalContainer;
00039 
00046 struct csRenderMeshModes
00047 {
00048   csRenderMeshModes ()
00049   {
00050     z_buf_mode = CS_ZBUF_NONE;
00051     mixmode = CS_FX_COPY;
00052     alphaType = csAlphaMode::alphaNone;
00053   }
00054 
00055   ~csRenderMeshModes () { }
00056 
00058   csZBufMode z_buf_mode;
00059 
00061   uint mixmode;
00062 
00064   csAlphaMode::AlphaType alphaType;
00065 
00067   csRef<csRenderBufferHolder> buffers;
00068 };
00069 
00073 struct csCoreRenderMesh
00074 {
00079   const char* db_mesh_name;
00080 
00081   csCoreRenderMesh () 
00082   {
00083     clip_portal = 0;
00084     clip_plane = 0;
00085     clip_z_plane = 0;
00086     do_mirror = false;
00087     indexstart = indexend = 0;
00088     db_mesh_name = "<unknown>";
00089   }
00090 
00091   ~csCoreRenderMesh () {}
00092 
00094   int clip_portal;
00095 
00097   int clip_plane;
00098 
00100   int clip_z_plane;
00101 
00118   bool do_mirror;
00119 
00121   csRenderMeshType meshtype;
00122 
00129   unsigned int indexstart;
00130   unsigned int indexend;
00133   //iMaterialHandle* mathandle;
00134   // @@@ FIXME: SW needs it
00136   iMaterialWrapper* material;
00137 
00142   csReversibleTransform object2world;
00143 };
00144 
00149 struct csRenderMesh : public csCoreRenderMesh, public csRenderMeshModes
00150 {
00151   csRenderMesh () 
00152   {
00153     portal = 0;
00154     geometryInstance = 0;
00155   }
00156 
00157   ~csRenderMesh () {}
00158 
00164   void *geometryInstance;
00165 
00167   iPortalContainer* portal;
00168 
00170   csRef<iShaderVariableContext> variablecontext;
00171 
00173   csVector3 worldspace_origin;
00174 };
00175 
00178 #endif // __CS_IVIDEO_RENDERMESH_H__

Generated for Crystal Space by doxygen 1.4.4