ivideo/txtmgr.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 1998-2006 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 #include "igraphic/image.h" 00033 00034 class Vector2; 00035 class csMatrix3; 00036 class csVector3; 00037 class csRect; 00038 00039 struct csRGBcolor; 00040 struct csRGBpixel; 00041 struct csLightMapMapping; 00042 struct iImage; 00043 struct iTextureHandle; 00044 struct iMaterial; 00045 struct iString; 00046 00053 00054 #define CS_TEXTURE_2D 0x00000001 00056 #define CS_TEXTURE_3D 0x00000002 00057 00066 #define CS_TEXTURE_NOMIPMAPS 0x00000008 00067 00071 #define CS_TEXTURE_CLAMP 0x00000010 00072 00075 #define CS_TEXTURE_NOFILTER 0x00000020 00076 00089 #define CS_TEXTURE_NPOTS 0x00000040 00090 00100 #define CS_TEXTURE_SCALE_UP 0x00000080 00101 00111 #define CS_TEXTURE_SCALE_DOWN 0x00000100 00112 00117 struct iRendererLightmap : public virtual iBase 00118 { 00119 SCF_INTERFACE (iRendererLightmap, 2, 1, 0); 00120 00125 virtual void GetSLMCoords (int& left, int& top, 00126 int& width, int& height) = 0; 00127 00129 virtual void SetData (csRGBcolor* data) = 0; 00130 00131 virtual void SetLightCellSize (int size) = 0; 00132 }; 00133 00137 struct iSuperLightmap : public virtual iBase 00138 { 00139 SCF_INTERFACE (iSuperLightmap, 2, 0, 0); 00140 00142 virtual csPtr<iRendererLightmap> RegisterLightmap (int left, int top, 00143 int width, int height) = 0; 00144 00146 virtual csPtr<iImage> Dump () = 0; 00147 00148 virtual iTextureHandle* GetTexture () = 0; 00149 }; 00150 00167 struct iTextureManager : public virtual iBase 00168 { 00169 SCF_INTERFACE(iTextureManager, 3,2,0); 00200 virtual csPtr<iTextureHandle> RegisterTexture (iImage *image, int flags, 00201 iString* fail_reason = 0) = 0; 00202 00219 virtual csPtr<iTextureHandle> CreateTexture (int w, int h, 00220 csImageType imagetype, const char* format, int flags, 00221 iString* fail_reason = 0) = 0; 00222 00230 virtual int GetTextureFormat () = 0; 00231 00235 virtual csPtr<iSuperLightmap> CreateSuperLightmap (int width, 00236 int height) = 0; 00237 00241 virtual void GetMaxTextureSize (int& w, int& h, int& aspect) = 0; 00242 }; 00243 00246 #endif // __CS_IVIDEO_TXTMGR_H__
Generated for Crystal Space 1.2 by doxygen 1.4.7