CrystalSpace

Public API Reference

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

txtmgr.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 1998 by Jorrit Tyberghein
00003     Written by Jorrit Tyberghein.
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_TXTMGR_H__
00021 #define __CS_IVIDEO_TXTMGR_H__
00022 
00031 #include "csutil/scf.h"
00032 
00033 class Vector2;
00034 class csMatrix3;
00035 class csVector3;
00036 class csRect;
00037 
00038 struct csRGBpixel;
00039 struct csLightMapMapping;
00040 struct iImage;
00041 struct iTextureHandle;
00042 struct iMaterial;
00043 struct iMaterialHandle;
00044 
00051 
00052 #define CS_TEXTURE_2D                   0x00000001
00053 
00054 #define CS_TEXTURE_3D                   0x00000002
00055 
00063 #define CS_TEXTURE_DITHER               0x00000004
00064 
00073 #define CS_TEXTURE_NOMIPMAPS            0x00000008
00074 
00078 #define CS_TEXTURE_CLAMP                0x00000010
00079 
00082 #define CS_TEXTURE_NOFILTER             0x00000020
00083 
00085 SCF_VERSION (iRendererLightmap, 1, 1, 0);
00086 
00090 struct iRendererLightmap : public iBase
00091 {
00096   virtual void GetSLMCoords (int& left, int& top, 
00097     int& width, int& height) = 0;
00098     
00100   virtual void SetData (csRGBpixel* data) = 0;
00101   
00102   virtual void SetLightCellSize (int size) = 0;
00103 };
00104 
00105 SCF_VERSION (iSuperLightmap, 1, 0, 1);
00106 
00110 struct iSuperLightmap : public iBase
00111 {
00113   virtual csPtr<iRendererLightmap> RegisterLightmap (int left, int top, 
00114     int width, int height) = 0;
00115     
00117   virtual csPtr<iImage> Dump () = 0;
00118 
00119   virtual iTextureHandle* GetTexture () = 0;
00120 };
00121 
00122 SCF_VERSION (iTextureManager, 2, 5, 0);
00123 
00143 struct iTextureManager : public iBase
00144 {
00172   virtual csPtr<iTextureHandle> RegisterTexture (iImage *image, int flags) = 0;
00173 
00183   virtual csPtr<iMaterialHandle> RegisterMaterial (iMaterial* material) = 0;
00184 
00192   virtual csPtr<iMaterialHandle> RegisterMaterial (
00193         iTextureHandle* txthandle) = 0;
00194 
00199   virtual void FreeMaterials () = 0;
00200 
00208   virtual int GetTextureFormat () = 0;
00209   
00213   virtual csPtr<iSuperLightmap> CreateSuperLightmap (int width, 
00214     int height) = 0;
00215 
00219   virtual void GetMaxTextureSize (int& w, int& h, int& aspect) = 0;
00220 
00226   virtual void GetLightmapRendererCoords (int slmWidth, int slmHeight,
00227     int lm_x1, int lm_y1, int lm_x2, int lm_y2,
00228     float& lm_u1, float& lm_v1, float &lm_u2, float& lm_v2) = 0;
00229 };
00230 
00233 #endif // __CS_IVIDEO_TXTMGR_H__

Generated for Crystal Space by doxygen 1.3.9.1