Package foundry.veil.render.framebuffer
Interface AdvancedFboAttachment
- All Superinterfaces:
AutoCloseable,org.lwjgl.system.NativeResource
- All Known Implementing Classes:
AdvancedFboRenderAttachment,AdvancedFboTextureAttachment
public interface AdvancedFboAttachment
extends org.lwjgl.system.NativeResource
An attachment added to an
AdvancedFboImpl.-
Method Summary
Modifier and TypeMethodDescriptionvoidattach(int target, int attachment) Attaches this attachment to the provided target under the specified attachment id.voidBinds this attachment.booleanvoidcreate()Creates the attachment and initializes it with the default properties.intReturns the OpenGL attachment point.intintint@Nullable StringgetName()intgetWidth()voidUnbinds this attachment.Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Method Details
-
create
void create()Creates the attachment and initializes it with the default properties. -
attach
void attach(int target, int attachment) Attaches this attachment to the provided target under the specified attachment id.- Parameters:
target- The target to attach this attachment toattachment- The attachment to attach this attachment under
-
bindAttachment
void bindAttachment()Binds this attachment. -
unbindAttachment
void unbindAttachment()Unbinds this attachment. -
getAttachmentType
int getAttachmentType()Returns the OpenGL attachment point. One of:
All possible OpenGL attachment points COLOR_ATTACHMENT0COLOR_ATTACHMENT1COLOR_ATTACHMENT2COLOR_ATTACHMENT3COLOR_ATTACHMENT4COLOR_ATTACHMENT5COLOR_ATTACHMENT6COLOR_ATTACHMENT7COLOR_ATTACHMENT8COLOR_ATTACHMENT9COLOR_ATTACHMENT10COLOR_ATTACHMENT11COLOR_ATTACHMENT12COLOR_ATTACHMENT13COLOR_ATTACHMENT14COLOR_ATTACHMENT15COLOR_ATTACHMENT16COLOR_ATTACHMENT17COLOR_ATTACHMENT18COLOR_ATTACHMENT19COLOR_ATTACHMENT20COLOR_ATTACHMENT21COLOR_ATTACHMENT22COLOR_ATTACHMENT23COLOR_ATTACHMENT24COLOR_ATTACHMENT25COLOR_ATTACHMENT26COLOR_ATTACHMENT27COLOR_ATTACHMENT28COLOR_ATTACHMENT29COLOR_ATTACHMENT30COLOR_ATTACHMENT31DEPTH_ATTACHMENTSTENCIL_ATTACHMENTDEPTH_STENCIL_ATTACHMENT- Returns:
- OpenGL attachment point
-
getFormat
int getFormat()- Returns:
- The OpenGL format for this attachment
-
getWidth
int getWidth()- Returns:
- The width of this attachment
-
getHeight
int getHeight()- Returns:
- The height of this attachment
-
getLevels
int getLevels()- Returns:
- Texture targets return mipmaps and render targets return samples.
-
canSample
boolean canSample()- Returns:
- Whether this attachment can be read from
-
getName
- Returns:
- The custom name of this attachment or
nullto useDiffuseSampler#
-
createCopy
AdvancedFboAttachment createCopy()- Returns:
- A new identical attachment to this one
-