Class TextureArray
java.lang.Object
dev.pfaff.altargui.texture.AbstractTextureArray
dev.pfaff.altargui.texture.TextureArray
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final dev.pfaff.glass.opengl.enums.GLTextureTarget
final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bindAndAllocate
(int width, int height, int layerCount, TextureOptions options) Allocates the texture.void
bindAndUpload
(ImageSrc image, TextureHandle handle, int xOffset, int yOffset, int width, int height) The texture array will be bound and unbound by this method.bound()
void
close()
void
dump()
int
height()
int
layers()
void
void
upload
(int layer, int xOffset, int yOffset, int width, int height, dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels) Remember to callstartUploading()
.void
upload
(int layer, int width, int height, dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels) Remember to callstartUploading()
.void
uploadFromPixelUnpackBuffer
(int layer, int xOffset, int yOffset, int width, int height, dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type) Remember to callstartUploading()
.void
uploadFull
(dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels) Remember to callstartUploading()
.int
width()
-
Field Details
-
BIND_TARGET
public static final dev.pfaff.glass.opengl.enums.GLTextureTarget BIND_TARGET -
handle
public final int handle
-
-
Constructor Details
-
TextureArray
public TextureArray()
-
-
Method Details
-
width
public int width() -
height
public int height() -
layers
public int layers() -
bound
- Specified by:
bound
in classAbstractTextureArray
-
bindAndAllocate
Allocates the texture. It must already bebound()
.- Specified by:
bindAndAllocate
in classAbstractTextureArray
-
bindAndUpload
public void bindAndUpload(ImageSrc image, TextureHandle handle, int xOffset, int yOffset, int width, int height) Description copied from class:AbstractTextureArray
The texture array will be bound and unbound by this method.- Specified by:
bindAndUpload
in classAbstractTextureArray
-
startUploading
public void startUploading() -
upload
public void upload(int layer, int xOffset, int yOffset, int width, int height, dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels) Remember to callstartUploading()
. -
uploadFromPixelUnpackBuffer
public void uploadFromPixelUnpackBuffer(int layer, int xOffset, int yOffset, int width, int height, dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type) Remember to callstartUploading()
. -
upload
public void upload(int layer, int width, int height, dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels) Remember to callstartUploading()
. -
uploadFull
public void uploadFull(dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels) Remember to callstartUploading()
. -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classAbstractTextureArray
-
dump
public void dump()- Specified by:
dump
in classAbstractTextureArray
-