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