00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024 #ifndef SHARRAY_HPP
00025 #define SHARRAY_HPP
00026
00027 #include "ShBaseTexture.hpp"
00028
00029 namespace SH {
00030
00034 struct
00035 ShArrayTraits : public ShTextureTraits {
00036 ShArrayTraits()
00037 : ShTextureTraits(0, SH_FILTER_NONE, SH_WRAP_CLAMP_TO_EDGE, SH_CLAMPED)
00038 {
00039 }
00040 };
00041
00042 template<typename T> class ShArrayRect;
00043
00046 template<typename T>
00047 class ShArray1D
00048 : public ShBaseTexture1D<T> {
00049 public:
00050 ShArray1D()
00051 : ShBaseTexture1D<T>(ShArrayTraits())
00052 {}
00053 ShArray1D(int width)
00054 : ShBaseTexture1D<T>(width, ShArrayTraits())
00055 {}
00056 typedef ShArrayRect<T> rectangular_type;
00057 typedef ShBaseTexture1D<T> base_type;
00058 typedef T return_type;
00059 };
00060
00063 template<typename T>
00064 class ShArray2D
00065 : public ShBaseTexture2D<T> {
00066 public:
00067 ShArray2D()
00068 : ShBaseTexture2D<T>(ShArrayTraits())
00069 {}
00070 ShArray2D(int width, int height)
00071 : ShBaseTexture2D<T>(width, height, ShArrayTraits())
00072 {}
00073 typedef ShArrayRect<T> rectangular_type;
00074 typedef ShBaseTexture2D<T> base_type;
00075 typedef T return_type;
00076 };
00077
00080 template<typename T>
00081 class ShArrayRect
00082 : public ShBaseTextureRect<T> {
00083 public:
00084 ShArrayRect()
00085 : ShBaseTextureRect<T>(ShArrayTraits())
00086 {}
00087 ShArrayRect(int width, int height)
00088 : ShBaseTextureRect<T>(width, height, ShArrayTraits())
00089 {}
00090 typedef ShArrayRect<T> rectangular_type;
00091 typedef ShBaseTextureRect<T> base_type;
00092 typedef T return_type;
00093 };
00094
00097 template<typename T>
00098 class ShArray3D
00099 : public ShBaseTexture3D<T> {
00100 public:
00101 ShArray3D()
00102 : ShBaseTexture3D<T>(ShArrayTraits())
00103 {}
00104 ShArray3D(int width, int height, int depth)
00105 : ShBaseTexture3D<T>(width, height, depth, ShArrayTraits())
00106 {}
00107 typedef ShArrayRect<T> rectangular_type;
00108 typedef ShBaseTexture3D<T> base_type;
00109 typedef T return_type;
00110 };
00111
00116 template<typename T>
00117 class ShArrayCube
00118 : public ShBaseTextureCube<T> {
00119 public:
00120 ShArrayCube()
00121 : ShBaseTextureCube<T>(ShArrayTraits())
00122 {}
00123 ShArrayCube(int width, int height)
00124 : ShBaseTextureCube<T>(width, height, ShArrayTraits())
00125 {}
00126 typedef ShArrayRect<T> rectangular_type;
00127 typedef ShBaseTextureCube<T> base_type;
00128 typedef T return_type;
00129 };
00130
00131 }
00132
00133 #endif