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 TypeMethodDescriptionvoid
formatToGLCapabilities
(GLCapabilities caps, boolean rgba8Avail) Writes the internal format to the given GLCapabilities object.void
Releases the color buffer if initialized, i.e.Casts this object to aFBObject.ColorAttachment
reference, seeisTextureAttachment()
.int
internal format of colorbufferint
height of colorbufferint
getName()
colorbuffer name [1..max]Casts this object to aFBObject.TextureAttachment
reference, seeisTextureAttachment()
.int
getWidth()
width of colorbufferboolean
initialize
(GL gl) Initializes the color buffer and set it's parameter, if uninitialized, i.e.boolean
Returnstrue
if instance is of typeFBObject.TextureAttachment
andfalse
if instance is of typeFBObject.ColorAttachment
.
-
Method Details
-
initialize
Initializes the color buffer and set it's parameter, if uninitialized, i.e. name iszero
.- Returns:
true
if 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()Returnstrue
if instance is of typeFBObject.TextureAttachment
andfalse
if instance is of typeFBObject.ColorAttachment
. -
getTextureAttachment
FBObject.TextureAttachment getTextureAttachment()Casts this object to aFBObject.TextureAttachment
reference, seeisTextureAttachment()
.- Throws:
GLException
- if this object is not of typeFBObject.TextureAttachment
- See Also:
-
getColorAttachment
FBObject.ColorAttachment getColorAttachment()Casts this object to aFBObject.ColorAttachment
reference, 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]
-