globjects  1.0.0.000000000000
Strict OpenGL objects wrapper.
FramebufferAttachment.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <string>
5 
6 #include <glbinding/gl/types.h>
7 
9 
10 #include <globjects/globjects_api.h>
11 
12 
13 namespace globjects
14 {
15 
16 
17 class AttachedTexture;
18 class AttachedRenderbuffer;
19 class Framebuffer;
20 
29 class GLOBJECTS_API FramebufferAttachment : public Referenced
30 {
31 public:
32  FramebufferAttachment(Framebuffer * fbo, gl::GLenum attachment);
33 
34  gl::GLenum attachment() const;
35 
36  gl::GLint getParameter(gl::GLenum pname) const;
37 
38  virtual bool isTextureAttachment() const;
39  virtual bool isRenderBufferAttachment() const;
40 
41  AttachedTexture * asTextureAttachment();
42  const AttachedTexture * asTextureAttachment() const;
43  AttachedRenderbuffer * asRenderBufferAttachment();
44  const AttachedRenderbuffer * asRenderBufferAttachment() const;
45 
46  std::string attachmentString() const;
47 
48 protected:
49  Framebuffer * m_fbo; // TODO: weak pointer?
50  gl::GLenum m_attachment;
51 };
52 
53 
54 } // namespace globjects
Encapsulates texture attachments of a frame buffer object.
Definition: AttachedTexture.h:26
Framebuffer * m_fbo
Definition: FramebufferAttachment.h:49
Contains all the classes that wrap OpenGL functionality.
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
gl::GLenum m_attachment
Definition: FramebufferAttachment.h:50
Wrapper of render buffer attachments of a frame buffer object.
Definition: AttachedRenderbuffer.h:27
Superclass for all classes that use reference counting in globjects.
Definition: Referenced.h:22