00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __SP_RENDERSYSTEM_TEXTUREFLAGS_H__
00009 #define __SP_RENDERSYSTEM_TEXTUREFLAGS_H__
00010
00011
00012 #include "Base/spStandard.hpp"
00013 #include "Base/spDimension.hpp"
00014 #include "Base/spInputOutputString.hpp"
00015 #include "FileFormats/Image/spImageFormatInterfaces.hpp"
00016
00017
00018 namespace sp
00019 {
00020 namespace video
00021 {
00022
00023
00024
00025
00026
00027
00029 enum ETextureFilters
00030 {
00031 FILTER_LINEAR,
00032 FILTER_SMOOTH,
00033 };
00034
00036 enum ETextureMipMapFilters
00037 {
00038 FILTER_BILINEAR,
00039 FILTER_TRILINEAR,
00040 FILTER_ANISOTROPIC,
00041 };
00042
00044 enum ETextureWrapModes
00045 {
00046 TEXWRAP_REPEAT,
00047 TEXWRAP_MIRROR,
00048 TEXWRAP_CLAMP,
00049 };
00050
00052 enum ETextureDimensions
00053 {
00054
00055 TEXTURE_1D = 1,
00056 TEXTURE_2D,
00057 TEXTURE_3D,
00058 TEXTURE_CUBEMAP,
00059
00060
00061 TEXTURE_1D_ARRAY,
00062 TEXTURE_2D_ARRAY,
00063 TEXTURE_CUBEMAP_ARRAY,
00064 };
00065
00067 enum EHWTextureFormats
00068 {
00069 HWTEXFORMAT_UBYTE8,
00070 HWTEXFORMAT_FLOAT16,
00071 HWTEXFORMAT_FLOAT32,
00072 };
00073
00075 enum ECubeMapDirections
00076 {
00077 CUBEMAP_POSITIVE_X = 0,
00078 CUBEMAP_NEGATIVE_X,
00079 CUBEMAP_POSITIVE_Y,
00080 CUBEMAP_NEGATIVE_Y,
00081 CUBEMAP_POSITIVE_Z,
00082 CUBEMAP_NEGATIVE_Z
00083 };
00084
00086 enum EAlphaBlendingTypes
00087 {
00088 BLENDING_BRIGHT,
00089 BLENDING_DARK
00090 };
00091
00093 enum EImageBufferTypes
00094 {
00095 IMAGEBUFFER_UBYTE,
00096 IMAGEBUFFER_FLOAT,
00097 };
00098
00100 enum ERendererDataTypes
00101 {
00102 DATATYPE_FLOAT,
00103 DATATYPE_DOUBLE,
00104 DATATYPE_BYTE,
00105 DATATYPE_SHORT,
00106 DATATYPE_INT,
00107 DATATYPE_UNSIGNED_BYTE,
00108 DATATYPE_UNSIGNED_SHORT,
00109 DATATYPE_UNSIGNED_INT,
00110 };
00111
00112
00113
00114
00115
00116
00118 struct STextureCreationFlags
00119 {
00120 STextureCreationFlags() :
00121 Depth (1 ),
00122 ImageBuffer (0 ),
00123 BufferType (IMAGEBUFFER_UBYTE ),
00124 Dimension (TEXTURE_2D ),
00125 Format (PIXELFORMAT_RGB ),
00126 HWFormat (HWTEXFORMAT_UBYTE8 ),
00127 MagFilter (FILTER_SMOOTH ),
00128 MinFilter (FILTER_SMOOTH ),
00129 MipMapFilter(FILTER_TRILINEAR ),
00130 MipMaps (true ),
00131 Anisotropy (1 ),
00132 WrapMode (TEXWRAP_REPEAT )
00133 {
00134 }
00135 STextureCreationFlags(const STextureCreationFlags &other) :
00136 Filename (other.Filename ),
00137 Size (other.Size ),
00138 Depth (other.Depth ),
00139 ImageBuffer (other.ImageBuffer ),
00140 BufferType (other.BufferType ),
00141 Dimension (other.Dimension ),
00142 Format (other.Format ),
00143 HWFormat (other.HWFormat ),
00144 MagFilter (other.MagFilter ),
00145 MinFilter (other.MinFilter ),
00146 MipMapFilter(other.MipMapFilter ),
00147 MipMaps (other.MipMaps ),
00148 Anisotropy (other.Anisotropy ),
00149 WrapMode (other.WrapMode )
00150 {
00151 }
00152 ~STextureCreationFlags()
00153 {
00154 }
00155
00156
00157 io::stringc Filename;
00158 dim::size2di Size;
00159 s32 Depth;
00160
00161 const void* ImageBuffer;
00162
00163 EImageBufferTypes BufferType;
00164 ETextureDimensions Dimension;
00165 EPixelFormats Format;
00166 EHWTextureFormats HWFormat;
00167 ETextureFilters MagFilter, MinFilter;
00168 ETextureMipMapFilters MipMapFilter;
00169
00170 bool MipMaps;
00171 s32 Anisotropy;
00172 dim::vector3d<ETextureWrapModes> WrapMode;
00173 };
00174
00175
00176 }
00177
00178 }
00179
00180
00181 #endif
00182
00183
00184
00185