Class AdvancedFboRenderAttachment
java.lang.Object
foundry.veil.api.client.render.framebuffer.AdvancedFboRenderAttachment
- All Implemented Interfaces:
AdvancedFboAttachment,AutoCloseable,Cloneable,org.lwjgl.system.NativeResource
An attachment for an
AdvancedFboImpl that represents a depth render buffer.-
Constructor Summary
ConstructorsConstructorDescriptionAdvancedFboRenderAttachment(int attachmentType, int attachmentFormat, int width, int height, int samples) Creates a new attachment that adds a renderbuffer. -
Method Summary
Modifier and TypeMethodDescriptionvoidattach(AdvancedFbo framebuffer, int attachment) Attaches this attachment to the provided target under the specified attachment point.voidBinds this attachment.boolean@NotNull AdvancedFboAttachmentclone()voidcreate()Creates the attachment and initializes it with the default properties.booleanvoidfree()intReturns the OpenGL attachment point.intintgetId()int@Nullable StringgetName()inthashCode()voidUnbinds this attachment.Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lwjgl.system.NativeResource
close
-
Constructor Details
-
AdvancedFboRenderAttachment
public AdvancedFboRenderAttachment(int attachmentType, int attachmentFormat, int width, int height, int samples) Creates a new attachment that adds a renderbuffer.- Parameters:
attachmentType- The attachment point to put this onattachmentFormat- The format of the attachment datawidth- The width of the attachmentheight- The height of the attachmentsamples- The number of samples to have. It must be between1andVeilRenderSystem.maxSamples()
-
-
Method Details
-
create
public void create()Description copied from interface:AdvancedFboAttachmentCreates the attachment and initializes it with the default properties.- Specified by:
createin interfaceAdvancedFboAttachment
-
attach
Description copied from interface:AdvancedFboAttachmentAttaches this attachment to the provided target under the specified attachment point.- Specified by:
attachin interfaceAdvancedFboAttachment- Parameters:
framebuffer- The framebuffer to attach toattachment- The attachment point to add this attachment to
-
bindAttachment
public void bindAttachment()Description copied from interface:AdvancedFboAttachmentBinds this attachment.- Specified by:
bindAttachmentin interfaceAdvancedFboAttachment
-
unbindAttachment
public void unbindAttachment()Description copied from interface:AdvancedFboAttachmentUnbinds this attachment.- Specified by:
unbindAttachmentin interfaceAdvancedFboAttachment
-
getId
public int getId()- Returns:
- The OpenGL renderbuffer id of this attachment
-
getAttachmentType
public int getAttachmentType()Description copied from interface:AdvancedFboAttachmentReturns 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- Specified by:
getAttachmentTypein interfaceAdvancedFboAttachment- Returns:
- OpenGL attachment point
-
getFormat
public int getFormat()- Specified by:
getFormatin interfaceAdvancedFboAttachment- Returns:
- The OpenGL format for this attachment
-
getLevels
public int getLevels()- Specified by:
getLevelsin interfaceAdvancedFboAttachment- Returns:
- Texture targets return mipmaps and render targets return samples.
-
canSample
public boolean canSample()- Specified by:
canSamplein interfaceAdvancedFboAttachment- Returns:
- Whether this attachment can be read from
-
getName
- Specified by:
getNamein interfaceAdvancedFboAttachment- Returns:
- The custom name of this attachment or
nullto useDiffuseSampler#
-
clone
- Specified by:
clonein interfaceAdvancedFboAttachment- Overrides:
clonein classObject- Returns:
- A new identical attachment to this one
-
equals
-
hashCode
public int hashCode() -
free
public void free()- Specified by:
freein interfaceorg.lwjgl.system.NativeResource
-