13 #include <globjects/globjects_api.h>
21 class FramebufferAttachment;
52 , DirectStateAccessEXT
56 static void hintBindlessImplementation(BindlessImplementation impl);
69 void bind(gl::GLenum target)
const;
74 static void unbind(gl::GLenum target);
76 void setParameter(gl::GLenum pname, gl::GLint param);
77 gl::GLint getAttachmentParameter(gl::GLenum attachment, gl::GLenum pname)
const;
79 void attachTexture(gl::GLenum attachment,
Texture * texture, gl::GLint level = 0);
80 void attachTextureLayer(gl::GLenum attachment,
Texture * texture, gl::GLint level = 0, gl::GLint layer = 0);
81 void attachRenderBuffer(gl::GLenum attachment,
Renderbuffer * renderBuffer);
83 bool detach(gl::GLenum attachment);
85 void setReadBuffer(gl::GLenum mode)
const;
86 void setDrawBuffer(gl::GLenum mode)
const;
87 void setDrawBuffers(gl::GLsizei n,
const gl::GLenum * modes)
const;
88 void setDrawBuffers(
const std::vector<gl::GLenum> & modes)
const;
90 void clear(gl::ClearBufferMask mask);
92 void clearBufferiv(gl::GLenum buffer, gl::GLint drawBuffer,
const gl::GLint * value);
93 void clearBufferuiv(gl::GLenum buffer, gl::GLint drawBuffer,
const gl::GLuint * value);
94 void clearBufferfv(gl::GLenum buffer, gl::GLint drawBuffer,
const gl::GLfloat * value);
95 void clearBufferfi(gl::GLenum buffer, gl::GLint drawBuffer, gl::GLfloat depth, gl::GLint stencil);
97 void clearBuffer(gl::GLenum buffer, gl::GLint drawBuffer,
const glm::ivec4 & value);
98 void clearBuffer(gl::GLenum buffer, gl::GLint drawBuffer,
const glm::uvec4 & value);
99 void clearBuffer(gl::GLenum buffer, gl::GLint drawBuffer,
const glm::vec4 & value);
101 static void colorMask(gl::GLboolean red, gl::GLboolean green, gl::GLboolean blue, gl::GLboolean alpha);
102 static void colorMask(
const glm::bvec4 & mask);
103 static void colorMaski(gl::GLuint buffer, gl::GLboolean red, gl::GLboolean green, gl::GLboolean blue, gl::GLboolean alpha);
104 static void colorMaski(gl::GLuint buffer,
const glm::bvec4 & mask);
105 static void clearColor(gl::GLfloat red, gl::GLfloat green, gl::GLfloat blue, gl::GLfloat alpha);
106 static void clearColor(
const glm::vec4 & color);
107 static void clearDepth(gl::GLclampd depth);
109 void readPixels(gl::GLint x, gl::GLint y, gl::GLsizei width, gl::GLsizei height, gl::GLenum format, gl::GLenum type, gl::GLvoid * data =
nullptr)
const;
110 void readPixels(
const std::array<gl::GLint, 4> & rect, gl::GLenum format, gl::GLenum type, gl::GLvoid * data =
nullptr)
const;
111 void readPixels(gl::GLenum readBuffer,
const std::array<gl::GLint, 4> & rect, gl::GLenum format, gl::GLenum type, gl::GLvoid * data =
nullptr)
const;
112 std::vector<unsigned char> readPixelsToByteArray(
const std::array<gl::GLint, 4> & rect, gl::GLenum format, gl::GLenum type)
const;
113 std::vector<unsigned char> readPixelsToByteArray(gl::GLenum readBuffer,
const std::array<gl::GLint, 4> & rect, gl::GLenum format, gl::GLenum type)
const;
114 void readPixelsToBuffer(
const std::array<gl::GLint, 4> & rect, gl::GLenum format, gl::GLenum type,
Buffer * pbo)
const;
116 gl::GLenum checkStatus()
const;
117 std::string statusString()
const;
118 void printStatus(
bool onlyErrors =
false)
const;
121 std::vector<FramebufferAttachment*> attachments();
123 void blit(gl::GLenum readBuffer,
const std::array<gl::GLint, 4> & srcRect,
Framebuffer * destFbo, gl::GLenum drawBuffer,
const std::array<gl::GLint, 4> & destRect, gl::ClearBufferMask mask, gl::GLenum filter)
const;
124 void blit(gl::GLenum readBuffer,
const std::array<gl::GLint, 4> & srcRect,
Framebuffer * destFbo,
const std::vector<gl::GLenum> & drawBuffers,
const std::array<gl::GLint, 4> & destRect, gl::ClearBufferMask mask, gl::GLenum filter)
const;
126 virtual gl::GLenum objectType()
const override;
134 static void blit(gl::GLint srcX0, gl::GLint srcY0, gl::GLint srcX1, gl::GLint srcY1, gl::GLint destX0, gl::GLint destY0, gl::GLint destX1, gl::GLint destY1, gl::ClearBufferMask mask, gl::GLenum filter);
135 static void blit(
const std::array<gl::GLint, 4> & srcRect,
const std::array<gl::GLint, 4> & destRect, gl::ClearBufferMask mask, gl::GLenum filter);