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