Package com.jogamp.opengl
Interface FBObject.Colorbuffer
- All Known Implementing Classes:
FBObject.ColorAttachment,FBObject.TextureAttachment
- Enclosing class:
- FBObject
public static interface FBObject.Colorbuffer
Generic color buffer FBO attachment, either of type
FBObject.ColorAttachment or FBObject.TextureAttachment.
Always an instance of FBObject.Attachment.
-
Method Summary
Modifier and TypeMethodDescriptionvoidformatToGLCapabilities(GLCapabilities caps, boolean rgba8Avail) Writes the internal format to the given GLCapabilities object.voidReleases the color buffer if initialized, i.e.Casts this object to aFBObject.ColorAttachmentreference, seeisTextureAttachment().intinternal format of colorbufferintheight of colorbufferintgetName()colorbuffer name [1..max]Casts this object to aFBObject.TextureAttachmentreference, seeisTextureAttachment().intgetWidth()width of colorbufferbooleaninitialize(GL gl) Initializes the color buffer and set it's parameter, if uninitialized, i.e.booleanReturnstrueif instance is of typeFBObject.TextureAttachmentandfalseif instance is of typeFBObject.ColorAttachment.
-
Method Details
-
initialize
Initializes the color buffer and set it's parameter, if uninitialized, i.e. name iszero.- Returns:
trueif newly initialized, otherwisefalse.- Throws:
GLException- if buffer generation or setup fails. The just created buffer name will be deleted in this case.
-
free
Releases the color buffer if initialized, i.e. name is notzero.- Throws:
GLException- if buffer release fails.
-
formatToGLCapabilities
Writes the internal format to the given GLCapabilities object.- Parameters:
caps- the destination for format bitsrgba8Avail- whether rgba8 is available
-
isTextureAttachment
boolean isTextureAttachment()Returnstrueif instance is of typeFBObject.TextureAttachmentandfalseif instance is of typeFBObject.ColorAttachment. -
getTextureAttachment
FBObject.TextureAttachment getTextureAttachment()Casts this object to aFBObject.TextureAttachmentreference, seeisTextureAttachment().- Throws:
GLException- if this object is not of typeFBObject.TextureAttachment- See Also:
-
getColorAttachment
FBObject.ColorAttachment getColorAttachment()Casts this object to aFBObject.ColorAttachmentreference, seeisTextureAttachment().- Throws:
GLException- if this object is not of typeFBObject.ColorAttachment- See Also:
-
getFormat
int getFormat()internal format of colorbuffer -
getWidth
int getWidth()width of colorbuffer -
getHeight
int getHeight()height of colorbuffer -
getName
int getName()colorbuffer name [1..max]
-