00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024 #ifndef SHTEXTURE_HPP
00025 #define SHTEXTURE_HPP
00026
00027 #include "ShBaseTexture.hpp"
00028
00029 namespace SH {
00030
00033 struct
00034 ShFilteredTextureTraits : public ShTextureTraits {
00035 ShFilteredTextureTraits()
00036 : ShTextureTraits(1, SH_FILTER_MIPMAP, SH_WRAP_CLAMP_TO_EDGE, SH_CLAMPED)
00037 {
00038 }
00039 };
00040
00041 template<typename T> class ShTextureRect;
00042
00045 template<typename T>
00046 class ShTexture1D
00047 : public ShBaseTexture1D<T> {
00048 public:
00049 ShTexture1D()
00050 : ShBaseTexture1D<T>(ShFilteredTextureTraits())
00051 {}
00052 ShTexture1D(int width)
00053 : ShBaseTexture1D<T>(width, ShFilteredTextureTraits())
00054 {}
00055 typedef ShTextureRect<T> rectangular_type;
00056 typedef ShBaseTexture1D<T> base_type;
00057 typedef T return_type;
00058 };
00059
00062 template<typename T>
00063 class ShTexture2D
00064 : public ShBaseTexture2D<T> {
00065 public:
00066 ShTexture2D()
00067 : ShBaseTexture2D<T>(ShFilteredTextureTraits())
00068 {}
00069 ShTexture2D(int width, int height)
00070 : ShBaseTexture2D<T>(width, height, ShFilteredTextureTraits())
00071 {}
00072
00073
00074
00075 typedef ShTextureRect<T> rectangular_type;
00076 typedef ShBaseTexture2D<T> base_type;
00077 typedef T return_type;
00078 };
00079
00082 template<typename T>
00083 class ShTextureRect
00084 : public ShBaseTextureRect<T> {
00085 public:
00086 ShTextureRect()
00087 : ShBaseTextureRect<T>(ShFilteredTextureTraits())
00088 {}
00089 ShTextureRect(int width, int height)
00090 : ShBaseTextureRect<T>(width, height, ShFilteredTextureTraits())
00091 {}
00092
00093
00094
00095 typedef ShTextureRect<T> rectangular_type;
00096 typedef ShBaseTextureRect<T> base_type;
00097 typedef T return_type;
00098 };
00099
00102 template<typename T>
00103 class ShTexture3D
00104 : public ShBaseTexture3D<T> {
00105 public:
00106 ShTexture3D()
00107 : ShBaseTexture3D<T>(ShFilteredTextureTraits())
00108 {}
00109 ShTexture3D(int width, int height, int depth)
00110 : ShBaseTexture3D<T>(width, height, depth, ShFilteredTextureTraits())
00111 {}
00112 typedef ShTextureRect<T> rectangular_type;
00113 typedef ShBaseTexture3D<T> base_type;
00114 typedef T return_type;
00115 };
00116
00122 template<typename T>
00123 class ShTextureCube
00124 : public ShBaseTextureCube<T> {
00125 public:
00126 ShTextureCube()
00127 : ShBaseTextureCube<T>(ShFilteredTextureTraits())
00128 {}
00129 ShTextureCube(int width, int height)
00130 : ShBaseTextureCube<T>(width, height, ShFilteredTextureTraits())
00131 {}
00132 typedef ShTextureRect<T> rectangular_type;
00133 typedef ShBaseTextureCube<T> base_type;
00134 typedef T return_type;
00135 };
00136
00137 }
00138
00139 #endif