globjects  1.0.0.000000000000
Strict OpenGL objects wrapper.
TextureHandle.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <glm/fwd.hpp>
5
6#include <glbinding/gl/types.h>
7
8#include <globjects/globjects_api.h>
9
10
11namespace globjects
12{
13
14
15class Texture;
16class Sampler;
17
18class GLOBJECTS_API TextureHandle
19{
20public:
22 TextureHandle(gl::GLuint64 handle);
23 explicit TextureHandle(const Texture * texture);
24 TextureHandle(const Texture * texture, const Sampler * sampler);
25
28 bool isResident() const;
29
30 gl::GLuint64 handle() const;
31 operator gl::GLuint64() const;
32
33 glm::uvec2 asUVec2() const;
34 operator glm::uvec2() const;
35
36private:
37 gl::GLuint64 m_handle;
38};
39
40
41} // namespace globjects
Wraps OpenGL sampler objects.
Definition: Sampler.h:19
Definition: TextureHandle.h:19
glm::uvec2 asUVec2() const
TextureHandle(gl::GLuint64 handle)
TextureHandle(const Texture *texture, const Sampler *sampler)
TextureHandle(const Texture *texture)
gl::GLuint64 handle() const
Wraps OpenGL texture objects. A Texture provides both interfaces to bind them for the OpenGL pipeline...
Definition: Texture.h:31
Contains all the classes that wrap OpenGL functionality.