GLI 0.5.1

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

addressing.hpp
Go to the documentation of this file.
1
29 #ifndef GLI_CORE_ADDRESSING_INCLUDED
30 #define GLI_CORE_ADDRESSING_INCLUDED
31
32 #include "storage.hpp"
33
34 namespace gli{
35 namespace detail
36 {
37 size_type imageAddressing(
38 storage const & Storage,
39 size_type const & LayerOffset,
40 size_type const & FaceOffset,
41 size_type const & LevelOffset);
42
43 size_type texelLinearAdressing(
44 dimensions1_type const & Dimensions,
45 dimensions1_type const & TexelCoord);
46
47 size_type texelLinearAdressing(
48 dimensions2_type const & Dimensions,
49 dimensions2_type const & TexelCoord);
50
51 size_type texelLinearAdressing(
52 dimensions3_type const & Dimensions,
53 dimensions3_type const & TexelCoord);
54
55 size_type texelMortonAdressing(
56 dimensions1_type const & Dimensions,
57 dimensions1_type const & TexelCoord);
58
59 size_type texelMortonAdressing(
60 dimensions2_type const & Dimensions,
61 dimensions2_type const & TexelCoord);
62
63 size_type texelMortonAdressing(
64 dimensions3_type const & Dimensions,
65 dimensions3_type const & TexelCoord);
66
67 }//namespace detail
68 /*
69 template <typename texture>
70 class sampler
71 {
72 enum wrap
73 {
74 MIRROR,
75 CLAMP_TO_EDGE
76 };
77
78 enum filter
79 {
80 NEAREST,
81 LINEAR,
82 CUBIC
83 };
84
85 public:
86 sampler(texture const & Texture)
87 {
88 switch(Texture.format())
89 {
90 default:
91 break;
92 case RGB_DXT1:
93 Impl.reset(new impl_fetch_dxt1());
94 break;
95 }
96 }
97
98 template <typename genType>
99 genType operator() (texture::dimension_type const & Dimensions) const
100
101 private:
102 struct impl
103 {
104 virtual ~impl(){}
105
106 template <typename genType>
107 virtual genType operator() (texture::dimension_type const & Dimensions) const = 0;
108 };
109
110 class impl_fetch_color : public impl
111 {
112 public:
113 impl_fetch_color(){}
114
115 template <typename genType>
116 virtual genType operator() (
117 texture const & Texture,
118 texture::texcoord_type const & Texcoord) const;
119
120 private:
121
122 };
123
124 class impl_fetch_dxt1 : public impl
125 {
126 public:
127 impl_fetch_dxt1(){}
128
129 template <typename genType>
130 virtual genType operator() (texture::dimension_type const & Dimensions) const;
131
132 private:
133
134 };
135
136 shared_ptr<impl> Impl;
137 };
138 */
139 }//namespace gli
140
141 #include "addressing.inl"
142
143 #endif//GLI_CORE_ADDRESSING_INCLUDED
gli::detail::dimensions3_type
glm::uvec3 dimensions3_type
Definition: storage.hpp:62
gli::detail::texelLinearAdressing
size_type texelLinearAdressing(dimensions1_type const &Dimensions, dimensions1_type const &TexelCoord)
gli::storage
Definition: storage.hpp:66
gli::detail::imageAddressing
size_type imageAddressing(storage const &Storage, size_type const &LayerOffset, size_type const &FaceOffset, size_type const &LevelOffset)
gli::detail::dimensions1_type
glm::uint dimensions1_type
Definition: storage.hpp:60
gli::detail::size_type
std::size_t size_type
Definition: storage.hpp:59
storage.hpp
OpenGL Image (gli.g-truc.net)
gli::detail::dimensions2_type
glm::uvec2 dimensions2_type
Definition: storage.hpp:61
gli::detail::texelMortonAdressing
size_type texelMortonAdressing(dimensions1_type const &Dimensions, dimensions1_type const &TexelCoord)