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
void
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
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 callapplyDefaultPixelStoreParams()
.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 callapplyDefaultPixelStoreParams()
.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 callapplyDefaultPixelStoreParams()
.void
uploadFull
(dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels) Remember to callapplyDefaultPixelStoreParams()
.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
-
applyDefaultPixelStoreParams
public void applyDefaultPixelStoreParams() -
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 callapplyDefaultPixelStoreParams()
. -
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 callapplyDefaultPixelStoreParams()
. -
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 callapplyDefaultPixelStoreParams()
. -
uploadFull
public void uploadFull(dev.pfaff.glass.opengl.enums.GLPixelFormat format, dev.pfaff.glass.opengl.enums.GLPixelType type, MemorySegment pixels) Remember to callapplyDefaultPixelStoreParams()
. -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classAbstractTextureArray
-
dump
public void dump()- Specified by:
dump
in classAbstractTextureArray
-