00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024 #ifndef SHTABLE_HPP
00025 #define SHTABLE_HPP
00026
00027 #include "ShBaseTexture.hpp"
00028
00029 namespace SH {
00030
00031 struct
00032 ShTableTraits : public ShTextureTraits {
00033 ShTableTraits()
00034 : ShTextureTraits(1, SH_FILTER_NONE, SH_WRAP_CLAMP_TO_EDGE)
00035 {
00036 }
00037 };
00038
00039 template<typename T> class ShTableRect;
00040
00041 template<typename T>
00042 class ShTable1D
00043 : public ShBaseTexture1D<T> {
00044 public:
00045 ShTable1D()
00046 : ShBaseTexture1D<T>(ShTableTraits())
00047 {}
00048 ShTable1D(int width)
00049 : ShBaseTexture1D<T>(width, ShTableTraits())
00050 {}
00051 typedef ShTableRect<T> rectangular_type;
00052 typedef ShBaseTexture1D<T> base_type;
00053 typedef T return_type;
00054 };
00055
00056 template<typename T>
00057 class ShTable2D
00058 : public ShBaseTexture2D<T> {
00059 public:
00060 ShTable2D()
00061 : ShBaseTexture2D<T>(ShTableTraits())
00062 {}
00063 ShTable2D(int width, int height)
00064 : ShBaseTexture2D<T>(width, height, ShTableTraits())
00065 {}
00066 typedef ShTableRect<T> rectangular_type;
00067 typedef ShBaseTexture2D<T> base_type;
00068 typedef T return_type;
00069 };
00070
00071 template<typename T>
00072 class ShTableRect
00073 : public ShBaseTextureRect<T> {
00074 public:
00075 ShTableRect()
00076 : ShBaseTextureRect<T>(ShTableTraits())
00077 {}
00078 ShTableRect(int width, int height)
00079 : ShBaseTextureRect<T>(width, height, ShTableTraits())
00080 {}
00081 typedef ShTableRect<T> rectangular_type;
00082 typedef ShBaseTextureRect<T> base_type;
00083 typedef T return_type;
00084 };
00085
00086 template<typename T>
00087 class ShTable3D
00088 : public ShBaseTexture3D<T> {
00089 public:
00090 ShTable3D()
00091 : ShBaseTexture3D<T>(ShTableTraits())
00092 {}
00093 ShTable3D(int width, int height, int depth)
00094 : ShBaseTexture3D<T>(width, height, depth, ShTableTraits())
00095 {}
00096 typedef ShTableRect<T> rectangular_type;
00097 typedef ShBaseTexture3D<T> base_type;
00098 typedef T return_type;
00099 };
00100
00101 template<typename T>
00102 class ShTableCube
00103 : public ShBaseTextureCube<T> {
00104 public:
00105 ShTableCube()
00106 : ShBaseTextureCube<T>(ShTableTraits())
00107 {}
00108 ShTableCube(int width, int height)
00109 : ShBaseTextureCube<T>(width, height, ShTableTraits())
00110 {}
00111 typedef ShTableRect<T> rectangular_type;
00112 typedef ShBaseTextureCube<T> base_type;
00113 typedef T return_type;
00114 };
00115
00116 }
00117
00118 #endif