iengine/material.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 2000 by Jorrit Tyberghein 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public 00015 License along with this library; if not, write to the Free 00016 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef __CS_IENGINE_MATERIAL_H__ 00020 #define __CS_IENGINE_MATERIAL_H__ 00021 00022 #include "csutil/scf.h" 00023 #include "iutil/strset.h" 00024 #include "ivideo/shader/shader.h" 00025 00034 struct iMaterial; 00035 struct iTextureManager; 00036 struct iTextureWrapper; 00037 struct iObject; 00038 00062 struct iMaterialWrapper : public virtual iBase 00063 { 00064 SCF_INTERFACE (iMaterialWrapper, 0, 0, 5); 00065 00067 virtual iObject *QueryObject() = 0; 00068 00073 virtual void SetMaterial (iMaterial* material) = 0; 00075 virtual iMaterial* GetMaterial () = 0; 00076 00082 virtual void Visit () = 0; 00083 00087 virtual bool IsVisitRequired () const = 0; 00088 }; 00089 00101 struct iMaterialEngine : public virtual iBase 00102 { 00103 SCF_INTERFACE (iMaterialEngine, 2, 0, 0); 00104 00108 virtual iTextureWrapper *GetTextureWrapper () = 0; 00109 00113 virtual iTextureWrapper* GetTextureWrapper (CS::ShaderVarStringID name) = 0; 00114 00118 virtual void Visit () = 0; 00119 00123 virtual bool IsVisitRequired () const = 0; 00124 }; 00125 00135 struct iMaterialList : public virtual iBase 00136 { 00137 SCF_INTERFACE (iMaterialList, 2, 0, 0); 00138 00140 virtual iMaterialWrapper* NewMaterial (iMaterial* material, 00141 const char* name) = 0; 00142 00144 virtual csPtr<iMaterialWrapper> CreateMaterial (iMaterial* material, 00145 const char* name) = 0; 00146 00148 virtual int GetCount () const = 0; 00149 00151 virtual iMaterialWrapper *Get (int n) const = 0; 00152 00154 virtual int Add (iMaterialWrapper *obj) = 0; 00155 00157 virtual bool Remove (iMaterialWrapper *obj) = 0; 00158 00160 virtual bool Remove (int n) = 0; 00161 00163 virtual void RemoveAll () = 0; 00164 00166 virtual int Find (iMaterialWrapper *obj) const = 0; 00167 00169 virtual iMaterialWrapper *FindByName (const char *Name) const = 0; 00170 }; 00171 00174 #endif // __CS_IENGINE_MATERIAL_H__
Generated for Crystal Space 2.0 by doxygen 1.6.1