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, 2);
00124 
00144 struct iTextureManager : public iBase
00145 {
00174   virtual csPtr<iTextureHandle> RegisterTexture (iImage *image, int flags) = 0;
00175 
00207   virtual csPtr<iTextureHandle> RegisterTexture (iImageVector *image,
00208         int flags, int target) = 0;
00209 
00221   virtual void PrepareTextures () = 0;
00222 
00231   virtual void FreeImages () = 0;
00232 
00242   virtual csPtr<iMaterialHandle> RegisterMaterial (iMaterial* material) = 0;
00243 
00251   virtual csPtr<iMaterialHandle> RegisterMaterial (
00252         iTextureHandle* txthandle) = 0;
00253 
00257   virtual void PrepareMaterials () = 0;
00258 
00263   virtual void FreeMaterials () = 0;
00264 
00272   virtual int GetTextureFormat () = 0;
00273   
00277   virtual csPtr<iSuperLightmap> CreateSuperLightmap (int width, 
00278     int height) = 0;
00279 
00283   virtual void GetMaxTextureSize (int& w, int& h, int& aspect) = 0;
00284 
00290   virtual void GetLightmapRendererCoords (int slmWidth, int slmHeight,
00291     int lm_x1, int lm_y1, int lm_x2, int lm_y2,
00292     float& lm_u1, float& lm_v1, float &lm_u2, float& lm_v2) = 0;
00293 };
00294 
00297 #endif // __CS_IVIDEO_TXTMGR_H__

Generated for Crystal Space by doxygen 1.2.18