Class TextureArray
java.lang.Object
dev.pfaff.altargui.texture.TextureArray
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
allocate
(int width, int height, int layerCount, TextureOptions options) Allocates the texture.bound()
void
close()
void
dev.pfaff.glass.opengl.enums.GLTextureTarget
target()
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 channelType, 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 channelType, 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 channelType) Remember to callstartUploading()
.void
uploadFull
(dev.pfaff.glass.opengl.enums.GLPixelFormat format, MemorySegment pixels) Remember to callstartUploading()
.
-
Field Details
-
handle
public final int handle
-
-
Constructor Details
-
TextureArray
public TextureArray()
-
-
Method Details
-
bound
-
allocate
Allocates the texture. It must already bebound()
. -
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 channelType, 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 channelType) 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 channelType, MemorySegment pixels) Remember to callstartUploading()
. -
uploadFull
Remember to callstartUploading()
. -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
target
public dev.pfaff.glass.opengl.enums.GLTextureTarget target()
-