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 
11 namespace globjects
12 {
13 
14 
15 class Texture;
16 class Sampler;
17 
18 class GLOBJECTS_API TextureHandle
19 {
20 public:
21  TextureHandle();
22  TextureHandle(gl::GLuint64 handle);
23  explicit TextureHandle(const Texture * texture);
24  TextureHandle(const Texture * texture, const Sampler * sampler);
25 
26  void makeResident();
27  void makeNonResident();
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 
36 private:
37  gl::GLuint64 m_handle;
38 };
39 
40 
41 } // namespace globjects
Contains all the classes that wrap OpenGL functionality.
Definition: TextureHandle.h:18
Wraps OpenGL sampler objects.
Definition: Sampler.h:18
Wraps OpenGL texture objects. A Texture provides both interfaces to bind them for the OpenGL pipeline...
Definition: Texture.h:30