globjects  2.0.0.4363356ae2ef
Strict OpenGL objects wrapper.
Loading...
Searching...
No Matches
TextureHandle.h
Go to the documentation of this file.
1
2#pragma once
3
4
5#include <glm/fwd.hpp>
6
7#include <glbinding/gl/types.h>
8
9#include <globjects/globjects_api.h>
10
11
12namespace globjects
13{
14
15
16class Texture;
17class Sampler;
18
19
20class GLOBJECTS_API TextureHandle
21{
22public:
24 TextureHandle(gl::GLuint64 handle);
25 explicit TextureHandle(const Texture * texture);
26 TextureHandle(const Texture * texture, const Sampler * sampler);
27
30 bool isResident() const;
31
32 gl::GLuint64 handle() const;
33 operator gl::GLuint64() const;
34
35 glm::uvec2 asUVec2() const;
36 operator glm::uvec2() const;
37
38
39protected:
40 gl::GLuint64 m_handle;
41};
42
43
44} // namespace globjects
Wraps OpenGL sampler objects.
Definition: Sampler.h:23
Definition: TextureHandle.h:21
gl::GLuint64 m_handle
Definition: TextureHandle.h:40
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:35
Contains all the classes that wrap OpenGL functionality.