| globjects 1.0.0.000000000000 Strict OpenGL objects wrapper.

AttachedTexture.h
Go to the documentation of this file.
1
2 #pragma once
3
4 #include <glbinding/gl/types.h>
5
6 #include <globjects/base/ref_ptr.h>
7
8 #include <globjects/globjects_api.h>
9 #include <globjects/FramebufferAttachment.h>
10
11
12 namespace globjects
13 {
14
15
16 class Texture;
17 class Framebuffer;
18
26 class GLOBJECTS_API AttachedTexture : public FramebufferAttachment
27 {
28 public:
29 AttachedTexture(Framebuffer * fbo, gl::GLenum attachment, Texture * texture, gl::GLint level, gl::GLint layer = -1);
30
31 virtual bool isTextureAttachment() const override;
32
33 Texture * texture();
34 const Texture * texture() const;
35
36 gl::GLint level() const;
37
38 bool hasLayer() const;
39 gl::GLint layer() const;
40
41 protected:
42 ref_ptr<Texture> m_texture;
43 gl::GLint m_level;
44 gl::GLint m_layer;
45 };
46
47
48 } // namespace globjects
globjects::AttachedTexture
Encapsulates texture attachments of a frame buffer object.
Definition: AttachedTexture.h:26
globjects::ref_ptr
The ref_ptr class provides the interface for a reference pointer.
Definition: LogMessageBuilder.h:20
globjects::AttachedTexture::m_texture
ref_ptr< Texture > m_texture
Definition: AttachedTexture.h:42
globjects
Contains all the classes that wrap OpenGL functionality.
ref_ptr.h
globjects::AttachedTexture::m_level
gl::GLint m_level
Definition: AttachedTexture.h:43
globjects::AttachedTexture::m_layer
gl::GLint m_layer
Definition: AttachedTexture.h:44
globjects::FramebufferAttachment
Wraps attachments to a FrameBufferObject.
Definition: FramebufferAttachment.h:29
globjects::Framebuffer
Enables creation of arbitrary render targets that are not directly drawn on the screen.
Definition: Framebuffer.h:46
globjects::Texture
Wraps OpenGL texture objects. A Texture provides both interfaces to bind them for the OpenGL pipeline...
Definition: Texture.h:30
FramebufferAttachment.h