Class AdvancedFboTextureAttachment
java.lang.Object
net.minecraft.client.renderer.texture.AbstractTexture
foundry.veil.api.client.render.framebuffer.AdvancedFboTextureAttachment
- All Implemented Interfaces:
AdvancedFboAttachment,AutoCloseable,Cloneable,org.lwjgl.system.NativeResource
- Direct Known Subclasses:
AdvancedFboMutableTextureAttachment
public class AdvancedFboTextureAttachment
extends net.minecraft.client.renderer.texture.AbstractTexture
implements AdvancedFboAttachment
An attachment for an
AdvancedFboImpl that represents a color texture buffer.-
Field Summary
Fields inherited from class net.minecraft.client.renderer.texture.AbstractTexture
blur, id, mipmap, NOT_ASSIGNED -
Constructor Summary
ConstructorsConstructorDescriptionAdvancedFboTextureAttachment(int attachmentType, int format, int texelFormat, int dataType, int width, int height, int mipmapLevels, boolean linear, @Nullable String name) Creates a new attachment that adds a texture. -
Method Summary
Modifier and TypeMethodDescriptionvoidattach(int attachment) Attaches this attachment to the provided target under the specified attachment point.voidBinds this attachment.booleanclone()voidcreate()Creates the attachment and initializes it with the default properties.voidfree()intReturns the OpenGL attachment point.intint@Nullable StringgetName()voidload(net.minecraft.server.packs.resources.ResourceManager manager) voidUnbinds this attachment.Methods inherited from class net.minecraft.client.renderer.texture.AbstractTexture
bind, close, getId, releaseId, reset, setFilterMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lwjgl.system.NativeResource
close
-
Constructor Details
-
AdvancedFboTextureAttachment
public AdvancedFboTextureAttachment(int attachmentType, int format, int texelFormat, int dataType, int width, int height, int mipmapLevels, boolean linear, @Nullable @Nullable String name) Creates a new attachment that adds a texture.- Parameters:
attachmentType- The attachment point to put this onformat- The format of the image datatexelFormat- The format of the image texel datadataType- The type of data to store in the texturewidth- The width of the attachmentheight- The height of the attachmentmipmapLevels- The number of mipmaps levels to havename- The custom name of this attachment for shader references
-
-
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
public void attach(int attachment) Description copied from interface:AdvancedFboAttachmentAttaches this attachment to the provided target under the specified attachment point.- Specified by:
attachin interfaceAdvancedFboAttachment- Parameters:
attachment- The attachment point to add this attachment to
-
clone
- Specified by:
clonein interfaceAdvancedFboAttachment- Overrides:
clonein classObject- Returns:
- A new identical attachment to this one
-
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
-
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#
-
free
public void free()- Specified by:
freein interfaceorg.lwjgl.system.NativeResource
-
load
public void load(net.minecraft.server.packs.resources.ResourceManager manager) - Specified by:
loadin classnet.minecraft.client.renderer.texture.AbstractTexture
-