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
13namespace globjects
14{
15
16
17class AttachedTexture;
18class AttachedRenderbuffer;
19class Framebuffer;
20
29class GLOBJECTS_API FramebufferAttachment : public Referenced
30{
31public:
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
45
46 std::string attachmentString() const;
47
48protected:
49 Framebuffer * m_fbo; // TODO: weak pointer?
50 gl::GLenum m_attachment;
51};
52
53
54} // namespace globjects
Wrapper of render buffer attachments of a frame buffer object.
Definition: AttachedRenderbuffer.h:28
Encapsulates texture attachments of a frame buffer object.
Definition: AttachedTexture.h:27
Wraps attachments to a FrameBufferObject.
Definition: FramebufferAttachment.h:30
const AttachedTexture * asTextureAttachment() const
const AttachedRenderbuffer * asRenderBufferAttachment() const
virtual bool isRenderBufferAttachment() const
std::string attachmentString() const
virtual bool isTextureAttachment() const
FramebufferAttachment(Framebuffer *fbo, gl::GLenum attachment)
gl::GLint getParameter(gl::GLenum pname) const
gl::GLenum m_attachment
Definition: FramebufferAttachment.h:50
AttachedTexture * asTextureAttachment()
AttachedRenderbuffer * asRenderBufferAttachment()
Framebuffer * m_fbo
Definition: FramebufferAttachment.h:49
Enables creation of arbitrary render targets that are not directly drawn on the screen.
Definition: Framebuffer.h:47
Superclass for all classes that use reference counting in globjects.
Definition: Referenced.h:23
Contains all the classes that wrap OpenGL functionality.