CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | 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 "csutil/strset.h"
00032 #include "csutil/ref.h"
00033 #include "ivideo/graph3d.h"
00034 #include "ivideo/rndbuf.h"
00035 #include "ivideo/shader/shader.h"
00036 #include "csgfx/shadervarcontext.h"
00037 
00038 class csVector3;
00039 class csVector2;
00040 class csColor;
00041 class csReversibleTransform;
00042 struct iTextureHandle;
00043 struct iMaterialWrapper;
00044 struct iMeshFactory;
00045 struct iPortalContainer;
00046 struct iRenderBuffer;
00047 
00048 
00055 struct csRenderMeshModes
00056 {
00057   csRenderMeshModes ()
00058   {
00059     z_buf_mode = CS_ZBUF_NONE;
00060     mixmode = CS_FX_COPY;
00061     alphaType = csAlphaMode::alphaNone;
00062   }
00063 
00064   ~csRenderMeshModes () { }
00065 
00067   csZBufMode z_buf_mode;
00068 
00070   uint mixmode;
00071 
00073   csAlphaMode::AlphaType alphaType;
00074 };
00075 
00079 struct csCoreRenderMesh
00080 {
00085   const char* db_mesh_name;
00086 
00087   csCoreRenderMesh () 
00088   {
00089     clip_portal = 0;
00090     clip_plane = 0;
00091     clip_z_plane = 0;
00092     do_mirror = false;
00093     indexstart = indexend = 0;
00094     buffers = 0;
00095     db_mesh_name = "<unknown>";
00096   }
00097 
00098   ~csCoreRenderMesh () {}
00099 
00101   int clip_portal;
00102 
00104   int clip_plane;
00105 
00107   int clip_z_plane;
00108 
00125   bool do_mirror;
00126 
00128   csRenderMeshType meshtype;
00129 
00131   csRef<csRenderBufferHolder> buffers;
00132 
00134   unsigned int indexstart;
00135 
00137   unsigned int indexend;
00138 
00140   csReversibleTransform object2camera;
00141 
00143   csOrthoTransform *camera_transform;
00144 
00146   //iMaterialHandle* mathandle;
00147   // @@@ FIXME: SW needs it
00148   iMaterialWrapper* material;
00149 };
00150 
00155 struct csRenderMesh : public csCoreRenderMesh, public csRenderMeshModes
00156 {
00157   csRenderMesh () 
00158   {
00159     portal = 0;
00160     geometryInstance = 0;
00161     lastFrame = ~0;
00162   }
00163 
00164   ~csRenderMesh () {}
00165 
00171   void *geometryInstance;
00172 
00174   iPortalContainer* portal;
00175 
00177   csRef<iShaderVariableContext> variablecontext;
00178 
00183   uint lastFrame;
00184 
00186   csVector3 camera_origin;
00187 };
00188 
00191 #endif // __CS_IVIDEO_RENDERMESH_H__

Generated for Crystal Space by doxygen 1.3.9.1