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 
7 
8 #include <globjects/globjects_api.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:
43  gl::GLint m_level;
44  gl::GLint m_layer;
45 };
46 
47 
48 } // namespace globjects
Encapsulates texture attachments of a frame buffer object.
Definition: AttachedTexture.h:26
The ref_ptr class provides the interface for a reference pointer.
Definition: LogMessageBuilder.h:20
ref_ptr< Texture > m_texture
Definition: AttachedTexture.h:42
Contains all the classes that wrap OpenGL functionality.
gl::GLint m_level
Definition: AttachedTexture.h:43
gl::GLint m_layer
Definition: AttachedTexture.h:44
Wraps attachments to a FrameBufferObject.
Definition: FramebufferAttachment.h:29
Enables creation of arbitrary render targets that are not directly drawn on the screen.
Definition: Framebuffer.h:46
Wraps OpenGL texture objects. A Texture provides both interfaces to bind them for the OpenGL pipeline...
Definition: Texture.h:30