Package com.jogamp.opengl
Class FBObject.TextureAttachment
java.lang.Object
com.jogamp.opengl.FBObject.Attachment
com.jogamp.opengl.FBObject.TextureAttachment
- All Implemented Interfaces:
FBObject.Colorbuffer
- Enclosing class:
- FBObject
public static class FBObject.TextureAttachment
extends FBObject.Attachment
implements FBObject.Colorbuffer
Texture FBO attachment
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jogamp.opengl.FBObject.Attachment
FBObject.Attachment.Type
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
details of the texture setupfinal int
details of the texture setupfinal int
details of the texture setupfinal int
details of the texture setupfinal int
details of the texture setupfinal int
details of the texture setupFields inherited from class com.jogamp.opengl.FBObject.Attachment
format, type
-
Constructor Summary
ConstructorsConstructorDescriptionTextureAttachment
(FBObject.Attachment.Type type, int iFormat, int width, int height, int dataFormat, int dataType, int magFilter, int minFilter, int wrapS, int wrapT, int name) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Releases the attachment if initialized, i.e.final FBObject.ColorAttachment
Casts this object to aFBObject.ColorAttachment
reference, seeFBObject.Colorbuffer.isTextureAttachment()
.Casts this object to aFBObject.TextureAttachment
reference, seeFBObject.Colorbuffer.isTextureAttachment()
.boolean
initialize
(GL gl) Initializes the texture and set it's parameter, if uninitialized, i.e.final boolean
Returnstrue
if instance is of typeFBObject.TextureAttachment
andfalse
if instance is of typeFBObject.ColorAttachment
.toString()
Methods inherited from class com.jogamp.opengl.FBObject.Attachment
equals, formatToGLCapabilities, getFormat, getHeight, getName, getType, getWidth, hashCode
Methods inherited from interface com.jogamp.opengl.FBObject.Colorbuffer
formatToGLCapabilities, getFormat, getHeight, getName, getWidth
-
Field Details
-
dataFormat
public final int dataFormatdetails of the texture setup -
dataType
public final int dataTypedetails of the texture setup -
magFilter
public final int magFilterdetails of the texture setup -
minFilter
public final int minFilterdetails of the texture setup -
wrapS
public final int wrapSdetails of the texture setup -
wrapT
public final int wrapTdetails of the texture setup
-
-
Constructor Details
-
TextureAttachment
public TextureAttachment(FBObject.Attachment.Type type, int iFormat, int width, int height, int dataFormat, int dataType, int magFilter, int minFilter, int wrapS, int wrapT, int name) - Parameters:
type
- allowed types are [FBObject.Attachment.Type.COLOR_TEXTURE
,FBObject.Attachment.Type.DEPTH_TEXTURE
,FBObject.Attachment.Type.STENCIL_TEXTURE
]iFormat
-width
-height
-dataFormat
-dataType
-magFilter
-minFilter
-wrapS
-wrapT
-name
-
-
-
Method Details
-
initialize
Initializes the texture and set it's parameter, if uninitialized, i.e. name iszero
.- Specified by:
initialize
in interfaceFBObject.Colorbuffer
- Specified by:
initialize
in classFBObject.Attachment
- Returns:
true
if newly initialized, otherwisefalse
.- Throws:
GLException
- if texture generation and setup fails. The just created texture name will be deleted in this case.
-
free
Description copied from class:FBObject.Attachment
Releases the attachment if initialized, i.e. name is notzero
.if(0 != name) { do free .. name = 0; }
- Specified by:
free
in interfaceFBObject.Colorbuffer
- Specified by:
free
in classFBObject.Attachment
-
isTextureAttachment
public final boolean isTextureAttachment()Description copied from interface:FBObject.Colorbuffer
Returnstrue
if instance is of typeFBObject.TextureAttachment
andfalse
if instance is of typeFBObject.ColorAttachment
.- Specified by:
isTextureAttachment
in interfaceFBObject.Colorbuffer
-
getTextureAttachment
Description copied from interface:FBObject.Colorbuffer
Casts this object to aFBObject.TextureAttachment
reference, seeFBObject.Colorbuffer.isTextureAttachment()
.- Specified by:
getTextureAttachment
in interfaceFBObject.Colorbuffer
- See Also:
-
getColorAttachment
Description copied from interface:FBObject.Colorbuffer
Casts this object to aFBObject.ColorAttachment
reference, seeFBObject.Colorbuffer.isTextureAttachment()
.- Specified by:
getColorAttachment
in interfaceFBObject.Colorbuffer
- See Also:
-
toString
- Overrides:
toString
in classFBObject.Attachment
-