CrystalSpace

Public API Reference

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

ivideo/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 struct iImageVector;
00045 
00052 
00053 #define CS_TEXTURE_2D                   0x00000001
00054 
00055 #define CS_TEXTURE_3D                   0x00000002
00056 
00064 #define CS_TEXTURE_DITHER               0x00000004
00065 
00074 #define CS_TEXTURE_NOMIPMAPS            0x00000008
00075 
00079 #define CS_TEXTURE_CLAMP                0x00000010
00080 
00083 #define CS_TEXTURE_NOFILTER             0x00000020
00084 
00086 SCF_VERSION (iRendererLightmap, 1, 1, 0);
00087 
00091 struct iRendererLightmap : public iBase
00092 {
00097   virtual void GetSLMCoords (int& left, int& top, 
00098     int& width, int& height) = 0;
00099     
00101   virtual void SetData (csRGBpixel* data) = 0;
00102   
00103   virtual void SetLightCellSize (int size) = 0;
00104 };
00105 
00106 SCF_VERSION (iSuperLightmap, 1, 0, 1);
00107 
00111 struct iSuperLightmap : public iBase
00112 {
00114   virtual csPtr<iRendererLightmap> RegisterLightmap (int left, int top, 
00115     int width, int height) = 0;
00116     
00118   virtual csPtr<iImage> Dump () = 0;
00119 
00120   virtual iTextureHandle* GetTexture () = 0;
00121 };
00122 
00123 SCF_VERSION (iTextureManager, 2, 3, 1);
00124 
00135 struct iTextureManager : public iBase
00136 {
00169   virtual csPtr<iTextureHandle> RegisterTexture (iImage *image, int flags) = 0;
00170 #ifdef CS_USE_NEW_RENDERER
00171   virtual csPtr<iTextureHandle> RegisterTexture (iImageVector *image, int flags, int target) = 0;
00172 #endif
00173 
00184   virtual void PrepareTextures () = 0;
00185 
00194   virtual void FreeImages () = 0;
00195 
00205   virtual csPtr<iMaterialHandle> RegisterMaterial (iMaterial* material) = 0;
00206 
00214   virtual csPtr<iMaterialHandle> RegisterMaterial (
00215         iTextureHandle* txthandle) = 0;
00216 
00220   virtual void PrepareMaterials () = 0;
00221 
00226   virtual void FreeMaterials () = 0;
00227 
00233   virtual void SetVerbose (bool vb) = 0;
00234 
00242   virtual int GetTextureFormat () = 0;
00243   
00247   virtual csPtr<iSuperLightmap> CreateSuperLightmap (int width, 
00248     int height) = 0;
00249 
00253   virtual void GetMaxTextureSize (int& w, int& h, int& aspect) = 0;
00254 
00260   virtual void GetLightmapRendererCoords (int slmWidth, int slmHeight,
00261     int lm_x1, int lm_y1, int lm_x2, int lm_y2,
00262     float& lm_u1, float& lm_v1, float &lm_u2, float& lm_v2) = 0;
00263 };
00264 
00267 #endif // __CS_IVIDEO_TXTMGR_H__

Generated for Crystal Space by doxygen 1.2.18