00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020 #ifndef SHARRAY_HPP
00021 #define SHARRAY_HPP
00022
00023 #include "ShBaseTexture.hpp"
00024
00025 namespace SH {
00026
00030 struct
00031 ShArrayTraits : public ShTextureTraits {
00032 ShArrayTraits()
00033 : ShTextureTraits(0, SH_FILTER_NONE, SH_WRAP_CLAMP_TO_EDGE)
00034 {}
00035 };
00036
00037 template<typename T> class ShArrayRect;
00038
00041 template<typename T>
00042 class ShArray1D
00043 : public ShBaseTexture1D<T> {
00044 public:
00045 ShArray1D()
00046 : ShBaseTexture1D<T>(ShArrayTraits())
00047 {}
00048 ShArray1D(int width)
00049 : ShBaseTexture1D<T>(width, ShArrayTraits())
00050 {}
00051 typedef ShArrayRect<T> rectangular_type;
00052 typedef ShBaseTexture1D<T> base_type;
00053 typedef T return_type;
00054 };
00055
00058 template<typename T>
00059 class ShArray2D
00060 : public ShBaseTexture2D<T> {
00061 public:
00062 ShArray2D()
00063 : ShBaseTexture2D<T>(ShArrayTraits())
00064 {}
00065 ShArray2D(int width, int height)
00066 : ShBaseTexture2D<T>(width, height, ShArrayTraits())
00067 {}
00068 typedef ShArrayRect<T> rectangular_type;
00069 typedef ShBaseTexture2D<T> base_type;
00070 typedef T return_type;
00071 };
00072
00075 template<typename T>
00076 class ShArrayRect
00077 : public ShBaseTextureRect<T> {
00078 public:
00079 ShArrayRect()
00080 : ShBaseTextureRect<T>(ShArrayTraits())
00081 {}
00082 ShArrayRect(int width, int height)
00083 : ShBaseTextureRect<T>(width, height, ShArrayTraits())
00084 {}
00085 typedef ShArrayRect<T> rectangular_type;
00086 typedef ShBaseTextureRect<T> base_type;
00087 typedef T return_type;
00088 };
00089
00092 template<typename T>
00093 class ShArray3D
00094 : public ShBaseTexture3D<T> {
00095 public:
00096 ShArray3D()
00097 : ShBaseTexture3D<T>(ShArrayTraits())
00098 {}
00099 ShArray3D(int width, int height, int depth)
00100 : ShBaseTexture3D<T>(width, height, depth, ShArrayTraits())
00101 {}
00102 typedef ShArrayRect<T> rectangular_type;
00103 typedef ShBaseTexture3D<T> base_type;
00104 typedef T return_type;
00105 };
00106
00111 template<typename T>
00112 class ShArrayCube
00113 : public ShBaseTextureCube<T> {
00114 public:
00115 ShArrayCube()
00116 : ShBaseTextureCube<T>(ShArrayTraits())
00117 {}
00118 ShArrayCube(int width, int height)
00119 : ShBaseTextureCube<T>(width, height, ShArrayTraits())
00120 {}
00121 typedef ShArrayRect<T> rectangular_type;
00122 typedef ShBaseTextureCube<T> base_type;
00123 typedef T return_type;
00124 };
00125
00126 }
00127
00128 #endif