## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# 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
    00050
    00051 #define CS_TEXTURE_2D                   0x00000001
    00052
    00053 #define CS_TEXTURE_3D                   0x00000002
    00054
    00063 #define CS_TEXTURE_NOMIPMAPS            0x00000008
    00064
    00068 #define CS_TEXTURE_CLAMP                0x00000010
    00069
    00072 #define CS_TEXTURE_NOFILTER             0x00000020
    00073
    00086 #define CS_TEXTURE_NPOTS                0x00000040
    00087
    00097 #define CS_TEXTURE_SCALE_UP             0x00000080
    00098
    00108 #define CS_TEXTURE_SCALE_DOWN           0x00000100
    00109
    00114 struct iRendererLightmap : public virtual iBase
    00115 {
    00116   SCF_INTERFACE (iRendererLightmap, 2, 0, 0);
    00117
    00122   virtual void GetSLMCoords (int& left, int& top,
    00123     int& width, int& height) = 0;
    00124
    00126   virtual void SetData (csRGBpixel* data) = 0;
    00127
    00128   virtual void SetLightCellSize (int size) = 0;
    00129 };
    00130
    00134 struct iSuperLightmap : public virtual iBase
    00135 {
    00136   SCF_INTERFACE (iSuperLightmap, 2, 0, 0);
    00137
    00139   virtual csPtr<iRendererLightmap> RegisterLightmap (int left, int top,
    00140     int width, int height) = 0;
    00141
    00143   virtual csPtr<iImage> Dump () = 0;
    00144
    00145   virtual iTextureHandle* GetTexture () = 0;
    00146 };
    00147
    00164 struct iTextureManager : public virtual iBase
    00165 {
    00166   SCF_INTERFACE(iTextureManager, 3,0,0);
    00194   virtual csPtr<iTextureHandle> RegisterTexture (iImage *image, int flags) = 0;
    00195
    00203   virtual int GetTextureFormat () = 0;
    00204
    00208   virtual csPtr<iSuperLightmap> CreateSuperLightmap (int width,
    00209     int height) = 0;
    00210
    00214   virtual void GetMaxTextureSize (int& w, int& h, int& aspect) = 0;
    00215
    00221   virtual void GetLightmapRendererCoords (int slmWidth, int slmHeight,
    00222     int lm_x1, int lm_y1, int lm_x2, int lm_y2,
    00223     float& lm_u1, float& lm_v1, float &lm_u2, float& lm_v2) = 0;
    00224 };
    00225
    00228 #endif // __CS_IVIDEO_TXTMGR_H__