public final class Framebuffer extends java.lang.Object implements IDestroyable
RenderTarget| Constructor and Description |
|---|
Framebuffer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRenderTarget(RenderTarget renderTarget,
GLEnums.Attachment attachment)
|
RenderTarget |
attach(IGL gl,
RenderTarget renderTarget,
GLEnums.Attachment attachment)
|
void |
destroy(IGL gl)
Destroy this
Framebuffer and all attached RenderTarget |
RenderTarget |
dettach(IGL gl,
GLEnums.Attachment attachment)
Dettach a
RenderTarget from this Framebuffer |
void |
end(IGL gl)
Unbind this
Framebuffer |
java.util.Set<GLEnums.Attachment> |
getAttachments() |
int |
getHeight() |
int |
getMemoryUsage() |
RenderTarget |
getRenderTarget(GLEnums.Attachment attachment) |
int |
getWidth() |
boolean |
init(IGL gl,
int width,
int height)
Init or resize this
Framebuffer |
boolean |
isValid(IGL gl) |
void |
setMRTAttachments(GLEnums.Attachment[] mrtAttachments) |
void |
start(IGL gl)
Bind this
Framebuffer |
public RenderTarget attach(IGL gl, RenderTarget renderTarget, GLEnums.Attachment attachment)
RenderTarget to this Framebuffer
at the specified attachment.isValid(IGL) or init(IGL, int, int) must be called prior
binding again this Framebuffergl - OpenGL contextrenderTarget - RenderTarget to attach to this Framebufferattachment - attachment idRenderTarget attached to specified attachmentIGL.GL_COLOR_ATTACHMENT0,
IGL.GL_DEPTH_ATTACHMENT,
IGL.GL_STENCIL_ATTACHMENT,
#dettach(IGL, int),
isValid(IGL)public RenderTarget dettach(IGL gl, GLEnums.Attachment attachment)
RenderTarget from this Framebuffergl - OpenGL contextattachment - attachment idRenderTarget dettached from this Framebufferpublic void setMRTAttachments(GLEnums.Attachment[] mrtAttachments)
mrtAttachments - list of attachments for Multiple Render Targetspublic boolean init(IGL gl, int width, int height)
Framebuffergl - OpenGL contextwidth - width in pixelsheight - height in pixelsisValid(IGL)public boolean isValid(IGL gl)
gl - OpenGL contextFramebuffer is complete according to OpenGL completeness specificationpublic int getWidth()
Framebuffer widthpublic int getHeight()
Framebuffer heightpublic void start(IGL gl)
Framebuffergl - OpenGL contextpublic void end(IGL gl)
Framebuffergl - OpenGL contextpublic void addRenderTarget(RenderTarget renderTarget, GLEnums.Attachment attachment)
renderTarget - RenderTarget to add to this Framebufferattachment - attachment idjava.lang.IllegalStateException - if this Framebuffer already containsIGL.GL_COLOR_ATTACHMENT0,
IGL.GL_DEPTH_ATTACHMENT,
IGL.GL_STENCIL_ATTACHMENTpublic final RenderTarget getRenderTarget(GLEnums.Attachment attachment)
attachment - RenderTarget attached to the specified attachment, if anypublic final java.util.Set<GLEnums.Attachment> getAttachments()
public void destroy(IGL gl)
Framebuffer and all attached RenderTargetdestroy in interface IDestroyablegl - OpenGL contextpublic final int getMemoryUsage()
Bonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com