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 internalFormat, int format, int width, int height, int mipmapLevels, TextureFilter filter, @Nullable String name) Creates a new attachment that adds a texture. -
Method Summary
Modifier and TypeMethodDescriptionvoidattach(AdvancedFbo framebuffer, 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.booleanvoidfree()intReturns the OpenGL attachment point.intintintgetId()int@Nullable StringgetName()intgetWidth()inthashCode()voidload(net.minecraft.server.packs.resources.ResourceManager manager) voidsetFilter(boolean blur, boolean mipmap) voidUnbinds this attachment.Methods inherited from class net.minecraft.client.renderer.texture.AbstractTexture
bind, close, releaseId, resetMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lwjgl.system.NativeResource
close
-
Constructor Details
-
AdvancedFboTextureAttachment
public AdvancedFboTextureAttachment(int attachmentType, int internalFormat, int format, int width, int height, int mipmapLevels, TextureFilter filter, @Nullable @Nullable String name) Creates a new attachment that adds a texture.- Parameters:
attachmentType- The attachment point to put this oninternalFormat- The internal format of the image dataformat- The format of the image data when initializingwidth- 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
-
setFilter
public void setFilter(boolean blur, boolean mipmap) - Overrides:
setFilterin classnet.minecraft.client.renderer.texture.AbstractTexture
-
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
-
create
public void create()Description copied from interface:AdvancedFboAttachmentCreates the attachment and initializes it with the default properties.- Specified by:
createin interfaceAdvancedFboAttachment
-
getId
public int getId()- Overrides:
getIdin classnet.minecraft.client.renderer.texture.AbstractTexture
-
clone
- Specified by:
clonein interfaceAdvancedFboAttachment- Overrides:
clonein classObject- Returns:
- A new identical attachment to this one
-
equals
-
hashCode
public int hashCode() -
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
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getLevels
public int getLevels()- Specified by:
getLevelsin interfaceAdvancedFboAttachment- Returns:
- Texture targets return mipmaps and render targets return samples.
-
getFilter
-
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
-