/usr/include/gli/sampler.hpp is in libgli-dev 0.8.2.0+ds1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | /// @brief Include to use wrap modes and the sampler base class.
/// @file gli/sampler.hpp
#pragma once
#include "core/filter.hpp"
namespace gli
{
/// Texture coordinate wrapping mode
enum wrap
{
WRAP_CLAMP_TO_EDGE, WRAP_FIRST = WRAP_CLAMP_TO_EDGE,
WRAP_CLAMP_TO_BORDER,
WRAP_REPEAT,
WRAP_MIRROR_REPEAT,
WRAP_MIRROR_CLAMP_TO_EDGE,
WRAP_MIRROR_CLAMP_TO_BORDER, WRAP_LAST = WRAP_MIRROR_CLAMP_TO_BORDER
};
enum
{
WRAP_COUNT = WRAP_LAST - WRAP_FIRST + 1
};
/// Evaluate whether the texture coordinate wrapping mode relies on border color
inline bool is_border(wrap Wrap)
{
return Wrap == WRAP_CLAMP_TO_BORDER || Wrap == WRAP_MIRROR_CLAMP_TO_BORDER;
}
/// Genetic sampler class.
class sampler
{
public:
sampler(wrap Wrap, filter Mip, filter Min);
protected:
typedef float(*wrap_type)(float const & SamplerCoord);
wrap_type get_func(wrap WrapMode) const;
wrap_type Wrap;
filter Mip;
filter Min;
};
}//namespace gli
#include "./core/sampler.inl"
|