CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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 struct iImageVector;
00045 struct iLightMap;
00046 
00053 
00054 #define CS_TEXTURE_2D                   0x00000001
00055 
00056 #define CS_TEXTURE_3D                   0x00000002
00057 
00065 #define CS_TEXTURE_DITHER               0x00000004
00066 
00075 #define CS_TEXTURE_NOMIPMAPS            0x00000008
00076 
00080 #define CS_TEXTURE_CLAMP                0x00000010
00081 
00084 #define CS_TEXTURE_NOFILTER             0x00000020
00085 
00087 SCF_VERSION (iRendererLightmap, 1, 0, 0);
00088 
00092 struct iRendererLightmap : public iBase
00093 {
00099   virtual void GetRendererCoords (float& lm_u1, float& lm_v1, 
00100     float &lm_u2, float& lm_v2) = 0;
00101     
00106   virtual void GetSLMCoords (int& left, int& top, 
00107     int& width, int& height) = 0;
00108     
00110   virtual void SetData (csRGBpixel* data) = 0;
00111   
00112   virtual void SetLightCellSize (int size) = 0;
00113 };
00114 
00115 SCF_VERSION (iSuperLightmap, 1, 0, 0);
00116 
00120 struct iSuperLightmap : public iBase
00121 {
00123   virtual csPtr<iRendererLightmap> RegisterLightmap (int left, int top, 
00124     int width, int height) = 0;
00125     
00127   virtual csPtr<iImage> Dump () = 0;
00128 };
00129 
00130 SCF_VERSION (iTextureManager, 2, 3, 0);
00131 
00142 struct iTextureManager : public iBase
00143 {
00173   virtual csPtr<iTextureHandle> RegisterTexture (iImage *image, int flags) = 0;
00174 #ifdef CS_USE_NEW_RENDERER
00175   virtual csPtr<iTextureHandle> RegisterTexture (iImageVector *image, int flags, int target) = 0;
00176 #endif
00177 
00183   virtual void PrepareTextures () = 0;
00184 
00193   virtual void FreeImages () = 0;
00194 
00204   virtual csPtr<iMaterialHandle> RegisterMaterial (iMaterial* material) = 0;
00205 
00213   virtual csPtr<iMaterialHandle> RegisterMaterial (
00214         iTextureHandle* txthandle) = 0;
00215 
00219   virtual void PrepareMaterials () = 0;
00220 
00225   virtual void FreeMaterials () = 0;
00226 
00232   virtual void SetVerbose (bool vb) = 0;
00233 
00241   virtual int GetTextureFormat () = 0;
00242   
00246   virtual csPtr<iSuperLightmap> CreateSuperLightmap (int width, 
00247     int height) = 0;
00248 
00252   virtual void GetMaxTextureSize (int& w, int& h, int& aspect) = 0;
00253 };
00254 
00257 #endif // __CS_IVIDEO_TXTMGR_H__

Generated for Crystal Space by doxygen 1.2.14