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