-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSampler.hpp
More file actions
39 lines (30 loc) · 1.09 KB
/
Copy pathSampler.hpp
File metadata and controls
39 lines (30 loc) · 1.09 KB
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
#pragma once
#include <cstdint>
#include "easygl/Export.hpp"
#include "easygl/Types.hpp"
#include "easygl/detail/GenerationTracked.hpp"
#include "easygl/detail/NonCopyable.hpp"
namespace easygl
{
class EASYGL_API Sampler : public detail::NonCopyable, public detail::GenerationTracked
{
public:
Sampler();
~Sampler();
Sampler(Sampler&& other) noexcept;
Sampler& operator=(Sampler&& other) noexcept;
void create();
void destroy() noexcept;
void bind(unsigned int unit) const;
static void unbind(unsigned int unit);
[[nodiscard]] bool is_valid_gl_object() const;
void set_parameter(SamplerParameter pname, int value);
void set_parameter(SamplerParameter pname, float value);
void get_parameter_fv(SamplerParameter pname, float* out) const;
void get_parameter_iv(SamplerParameter pname, int* out) const;
static Sampler create_linear_clamp();
static Sampler create_nearest_clamp();
static Sampler create_linear_repeat();
static Sampler create_mipmap_linear();
};
}