00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020 #ifndef SHTEXTURE_HPP
00021 #define SHTEXTURE_HPP
00022
00023 #include "ShBaseTexture.hpp"
00024
00025 namespace SH {
00026
00029 struct
00030 ShFilteredTextureTraits : public ShTextureTraits {
00031 ShFilteredTextureTraits()
00032 : ShTextureTraits(1, SH_FILTER_MIPMAP_LINEAR, SH_WRAP_CLAMP_TO_EDGE)
00033 {}
00034 };
00035
00036 template<typename T> class ShTextureRect;
00037
00040 template<typename T>
00041 class ShTexture1D
00042 : public ShBaseTexture1D<T> {
00043 public:
00044 ShTexture1D()
00045 : ShBaseTexture1D<T>(ShFilteredTextureTraits())
00046 {}
00047 ShTexture1D(int width)
00048 : ShBaseTexture1D<T>(width, ShFilteredTextureTraits())
00049 {}
00050 typedef ShTextureRect<T> rectangular_type;
00051 typedef ShBaseTexture1D<T> base_type;
00052 typedef T return_type;
00053 };
00054
00057 template<typename T>
00058 class ShTexture2D
00059 : public ShBaseTexture2D<T> {
00060 public:
00061 ShTexture2D()
00062 : ShBaseTexture2D<T>(ShFilteredTextureTraits())
00063 {}
00064 ShTexture2D(int width, int height)
00065 : ShBaseTexture2D<T>(width, height, ShFilteredTextureTraits())
00066 {}
00067
00068
00069
00070 typedef ShTextureRect<T> rectangular_type;
00071 typedef ShBaseTexture2D<T> base_type;
00072 typedef T return_type;
00073 };
00074
00077 template<typename T>
00078 class ShTextureRect
00079 : public ShBaseTextureRect<T> {
00080 public:
00081 ShTextureRect()
00082 : ShBaseTextureRect<T>(ShFilteredTextureTraits())
00083 {}
00084 ShTextureRect(int width, int height)
00085 : ShBaseTextureRect<T>(width, height, ShFilteredTextureTraits())
00086 {}
00087
00088
00089
00090 typedef ShTextureRect<T> rectangular_type;
00091 typedef ShBaseTextureRect<T> base_type;
00092 typedef T return_type;
00093 };
00094
00097 template<typename T>
00098 class ShTexture3D
00099 : public ShBaseTexture3D<T> {
00100 public:
00101 ShTexture3D()
00102 : ShBaseTexture3D<T>(ShFilteredTextureTraits())
00103 {}
00104 ShTexture3D(int width, int height, int depth)
00105 : ShBaseTexture3D<T>(width, height, depth, ShFilteredTextureTraits())
00106 {}
00107 typedef ShTextureRect<T> rectangular_type;
00108 typedef ShBaseTexture3D<T> base_type;
00109 typedef T return_type;
00110 };
00111
00117 template<typename T>
00118 class ShTextureCube
00119 : public ShBaseTextureCube<T> {
00120 public:
00121 ShTextureCube()
00122 : ShBaseTextureCube<T>(ShFilteredTextureTraits())
00123 {}
00124 ShTextureCube(int width, int height)
00125 : ShBaseTextureCube<T>(width, height, ShFilteredTextureTraits())
00126 {}
00127 typedef ShTextureRect<T> rectangular_type;
00128 typedef ShBaseTextureCube<T> base_type;
00129 typedef T return_type;
00130 };
00131
00132 }
00133
00134 #endif