![]() |
Cinder
0.9.1
|
#include <Fbo.h>
Inherits cinder::gl::Fbo.
Classes | |
struct | Format |
Public Member Functions | |
void | bindFramebufferFace (GLenum faceTarget, GLint level=0, GLenum target=GL_FRAMEBUFFER, GLenum attachment=GL_COLOR_ATTACHMENT0) |
mat4 | calcViewMatrix (GLenum face, const vec3 &eyePos) |
TextureCubeMapRef | getTextureCubeMap (GLenum attachment=GL_COLOR_ATTACHMENT0) |
int | getWidth () const |
int | getHeight () const |
ivec2 | getSize () const |
Area | getBounds () const |
float | getAspectRatio () const |
const Format & | getFormat () const |
Format | getFormat () |
Texture2dRef | getColorTexture () |
Texture2dRef | getDepthTexture () |
Texture2dRef | getTexture2d (GLenum attachment) |
TextureBaseRef | getTextureBase (GLenum attachment) |
void | bindTexture (int textureUnit=0, GLenum attachment=GL_COLOR_ATTACHMENT0) |
void | unbindTexture (int textureUnit=0, GLenum attachment=GL_COLOR_ATTACHMENT0) |
void | bindFramebuffer (GLenum target=GL_FRAMEBUFFER) |
void | resolveTextures () const |
GLuint | getId () const |
GLuint | getMultisampleId () const |
GLuint | getResolveId () const |
void | markAsDirty () |
void | blitTo (const FboRef &dst, const Area &srcArea, const Area &dstArea, GLenum filter=GL_NEAREST, GLbitfield mask=GL_COLOR_BUFFER_BIT) const |
void | blitToScreen (const Area &srcArea, const Area &dstArea, GLenum filter=GL_NEAREST, GLbitfield mask=GL_COLOR_BUFFER_BIT) const |
void | blitFromScreen (const Area &srcArea, const Area &dstArea, GLenum filter=GL_NEAREST, GLbitfield mask=GL_COLOR_BUFFER_BIT) |
const std::string & | getLabel () const |
void | setLabel (const std::string &label) |
Surface8u | readPixels8u (const Area &area, GLenum attachment=GL_COLOR_ATTACHMENT0) const |
Static Public Member Functions | |
static FboCubeMapRef | create (int32_t faceWidth, int32_t faceHeight, const Format &format=Format()) |
static FboRef | create (int width, int height, const Format &format=Format()) |
static FboRef | create (int width, int height, bool alpha, bool depth=true, bool stencil=false) |
static void | unbindFramebuffer () |
static GLint | getMaxSamples () |
static GLint | getMaxAttachments () |
Protected Member Functions | |
FboCubeMap (int32_t faceWidth, int32_t faceHeight, const Format &format, const TextureCubeMapRef &textureCubeMap) | |
void | init () |
void | initMultisamplingSettings (bool *useMsaa, bool *useCsaa, Format *format) |
void | prepareAttachments (const Format &format, bool multisampling) |
void | attachAttachments () |
void | initMultisample (const Format &format) |
void | updateMipmaps (GLenum attachment) const |
bool | checkStatus (class FboExceptionInvalidSpecification *resultExc) |
void | setDrawBuffers (GLuint fbId, const std::map< GLenum, RenderbufferRef > &attachmentsBuffer, const std::map< GLenum, TextureBaseRef > &attachmentsTexture) |
Protected Attributes | |
TextureCubeMapRef | mTextureCubeMap |
int | mWidth |
int | mHeight |
Format | mFormat |
GLuint | mId |
GLuint | mMultisampleFramebufferId |
std::map< GLenum, RenderbufferRef > | mAttachmentsBuffer |
std::map< GLenum, RenderbufferRef > | mAttachmentsMultisampleBuffer |
std::map< GLenum, TextureBaseRef > | mAttachmentsTexture |
std::string | mLabel |
bool | mNeedsResolve |
bool | mNeedsMipmapUpdate |
Static Protected Attributes | |
static GLint | sMaxSamples = -1 |
static GLint | sMaxAttachments = -1 |
Helper class for implementing dynamic cube mapping.
|
protected |
|
static |
void cinder::gl::FboCubeMap::bindFramebufferFace | ( | GLenum | faceTarget, |
GLint | level = 0 , |
||
GLenum | target = GL_FRAMEBUFFER , |
||
GLenum | attachment = GL_COLOR_ATTACHMENT0 |
||
) |
Binds a face of the Fbo as the currently active framebuffer. faceTarget expects values in the GL_TEXTURE_CUBE_MAP_POSITIVE_X
family.
mat4 cinder::gl::FboCubeMap::calcViewMatrix | ( | GLenum | face, |
const vec3 & | eyePos | ||
) |
Returns the view matrix appropriate for a given face (in the GL_TEXTURE_CUBE_MAP_POSITIVE_X
family) looking from the position eyePos.
TextureCubeMapRef cinder::gl::FboCubeMap::getTextureCubeMap | ( | GLenum | attachment = GL_COLOR_ATTACHMENT0 | ) |
Returns a TextureCubeMapRef attached at attachment (default GL_COLOR_ATTACHMENT0
). Resolves multisampling and renders mipmaps if necessary. Returns NULL if a TextureCubeMap is not bound at attachment.
|
staticinherited |
Creates an FBO width pixels wide and height pixels high, using Fbo::Format format.
|
staticinherited |
Creates an FBO width pixels wide and height pixels high, a color texture (with optional alpha channel), and optionally a depth buffer and stencil buffer.
|
inherited |
Returns the width of the FBO in pixels.
|
inherited |
Returns the height of the FBO in pixels.
|
inherited |
Returns the size of the FBO in pixels.
|
inherited |
Returns the bounding area of the FBO in pixels.
|
inherited |
Returns the aspect ratio of the FBO.
|
inherited |
Returns the Fbo::Format of this FBO.
|
inherited |
Returns the Fbo::Format of this FBO.
|
inherited |
|
inherited |
|
inherited |
Returns a Texture2dRef attached at attachment (such as GL_COLOR_ATTACHMENT0
). Resolves multisampling and renders mipmaps if necessary. Returns NULL if a Texture2d is not bound at attachment.
|
inherited |
Returns a TextureBaseRef attached at attachment (such as GL_COLOR_ATTACHMENT0
). Resolves multisampling and renders mipmaps if necessary. Returns NULL if a Texture is not bound at attachment.
|
inherited |
Binds the color texture associated with an Fbo to its target. Optionally binds to a multitexturing unit when textureUnit is non-zero. Optionally binds to a multitexturing unit when textureUnit is non-zero. attachment specifies which color buffer in the case of multiple attachments.
|
inherited |
Unbinds the texture associated with an Fbo attachment.
|
inherited |
Binds the Fbo as the currently active framebuffer, meaning it will receive the results of all subsequent rendering until it is unbound.
|
staticinherited |
Unbinds the Fbo as the currently active framebuffer, restoring the primary context as the target for all subsequent rendering.
|
inherited |
Resolves internal Multisample FBO to attached Textures. Only necessary when not using getColorTexture() or getTexture(), which resolve automatically.
|
inherited |
Returns the ID of the framebuffer. For antialiased FBOs this is the ID of the output multisampled FBO.
|
inherited |
For antialiased FBOs this returns the ID of the mirror FBO designed for multisampled writing. Returns 0 otherwise.
|
inherited |
Returns the resolve FBO, which is the same value as getId() without multisampling.
|
inherited |
Marks multisampling framebuffer and mipmaps as needing updates. Not generally necessary to call directly.
|
inherited |
Copies to FBO dst from srcArea to dstArea using filter filter. mask allows specification of color (GL_COLOR_BUFFER_BIT
) and/or depth(GL_DEPTH_BUFFER_BIT
). Calls glBlitFramebufferEXT() and is subject to its constraints and coordinate system.
|
inherited |
Copies to the screen from Area srcArea to dstArea using filter filter. mask allows specification of color (GL_COLOR_BUFFER_BIT
) and/or depth(GL_DEPTH_BUFFER_BIT
). Calls glBlitFramebufferEXT() and is subject to its constraints and coordinate system.
|
inherited |
Copies from the screen from Area srcArea to dstArea using filter filter. mask allows specification of color (GL_COLOR_BUFFER_BIT
) and/or depth(GL_DEPTH_BUFFER_BIT
). Calls glBlitFramebufferEXT() and is subject to its constraints and coordinate system.
|
staticinherited |
Returns the maximum number of samples the graphics card is capable of using per pixel in MSAA for an Fbo.
|
staticinherited |
Returns the maximum number of color attachments the graphics card is capable of using for an Fbo.
|
inherited |
Returns the debugging label associated with the Fbo.
|
inherited |
Sets the debugging label associated with the Fbo. Calls glObjectLabel() when available.
|
inherited |
Returns a copy of the pixels in attachment within area (cropped to the bounding rectangle of the attachment) as an 8-bit per channel Surface. attachment ignored on ES 2.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
staticprotectedinherited |
|
staticprotectedinherited |