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