CrystalSpace

Public API Reference

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 "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     flipCulling = false;
00053     alphaType = csAlphaMode::alphaNone;
00054   }
00055 
00056   ~csRenderMeshModes () { }
00057 
00059   csZBufMode z_buf_mode;
00060 
00062   uint mixmode;
00063 
00065   bool flipCulling;
00066 
00068   csAlphaMode::AlphaType alphaType;
00069 
00071   csRef<csRenderBufferHolder> buffers;
00072 };
00073 
00077 struct csCoreRenderMesh
00078 {
00083   const char* db_mesh_name;
00084 
00085   csCoreRenderMesh () 
00086   {
00087     clip_portal = 0;
00088     clip_plane = 0;
00089     clip_z_plane = 0;
00090     do_mirror = false;
00091     indexstart = indexend = 0;
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 
00133   unsigned int indexstart;
00134   unsigned int indexend;
00141   iMaterialWrapper* material;
00142 
00147   csReversibleTransform object2world;
00148 };
00149 
00154 struct csRenderMesh : public csCoreRenderMesh, public csRenderMeshModes
00155 {
00156   csRenderMesh () 
00157   {
00158     portal = 0;
00159     geometryInstance = 0;
00160   }
00161 
00162   ~csRenderMesh () {}
00163 
00169   void *geometryInstance;
00170 
00172   iPortalContainer* portal;
00173 
00175   csRef<iShaderVariableContext> variablecontext;
00176 
00178   csVector3 worldspace_origin;
00179 };
00180 
00183 #endif // __CS_IVIDEO_RENDERMESH_H__

Generated for Crystal Space by doxygen 1.4.7