## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# 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     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;
    00137   iMaterialWrapper* material;
    00138
    00143   csReversibleTransform object2world;
    00144 };
    00145
    00150 struct csRenderMesh : public csCoreRenderMesh, public csRenderMeshModes
    00151 {
    00152   csRenderMesh ()
    00153   {
    00154     portal = 0;
    00155     geometryInstance = 0;
    00156   }
    00157
    00158   ~csRenderMesh () {}
    00159
    00165   void *geometryInstance;
    00166
    00168   iPortalContainer* portal;
    00169
    00171   csRef<iShaderVariableContext> variablecontext;
    00172
    00174   csVector3 worldspace_origin;
    00175 };
    00176
    00179 #endif // __CS_IVIDEO_RENDERMESH_H__