Package com.jogamp.opengl
Interface FBObject.Colorbuffer
-
- All Known Implementing Classes:
FBObject.ColorAttachment,FBObject.TextureAttachment
- Enclosing class:
- FBObject
public static interface FBObject.ColorbufferGeneric color buffer FBO attachment, either of typeFBObject.ColorAttachmentorFBObject.TextureAttachment.Always an instance of
FBObject.Attachment.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidformatToGLCapabilities(GLCapabilities caps, boolean rgba8Avail)Writes the internal format to the given GLCapabilities object.voidfree(GL gl)Releases the color buffer if initialized, i.e.FBObject.ColorAttachmentgetColorAttachment()Casts this object to aFBObject.ColorAttachmentreference, seeisTextureAttachment().intgetFormat()internal format of colorbufferintgetHeight()height of colorbufferintgetName()colorbuffer name [1..max]FBObject.TextureAttachmentgetTextureAttachment()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.booleanisTextureAttachment()Returnstrueif instance is of typeFBObject.TextureAttachmentandfalseif instance is of typeFBObject.ColorAttachment.
-
-
-
Method Detail
-
initialize
boolean initialize(GL gl) throws GLException
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
void free(GL gl) throws GLException
Releases the color buffer if initialized, i.e. name is notzero.- Throws:
GLException- if buffer release fails.
-
formatToGLCapabilities
void formatToGLCapabilities(GLCapabilities caps, boolean rgba8Avail)
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:
isTextureAttachment()
-
getColorAttachment
FBObject.ColorAttachment getColorAttachment()
Casts this object to aFBObject.ColorAttachmentreference, seeisTextureAttachment().- Throws:
GLException- if this object is not of typeFBObject.ColorAttachment- See Also:
isTextureAttachment()
-
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]
-
-