Package org.lwjgl.util.ktx
Class ktxTextureCreateInfo
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<ktxTextureCreateInfo>
org.lwjgl.util.ktx.ktxTextureCreateInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class ktxTextureCreateInfo
extends org.lwjgl.system.Struct<ktxTextureCreateInfo>
implements org.lwjgl.system.NativeResource
Structure for passing texture information to
Texture1_Create and Texture2_Create.
Layout
struct ktxTextureCreateInfo {
ktx_uint32_t glInternalformat();
ktx_uint32_t vkFormat();
ktx_uint32_t * pDfd(int);
ktx_uint32_t baseWidth();
ktx_uint32_t baseHeight();
ktx_uint32_t baseDepth();
ktx_uint32_t numDimensions();
ktx_uint32_t numLevels();
ktx_uint32_t numLayers();
ktx_uint32_t numFaces();
ktx_bool_t isArray();
ktx_bool_t generateMipmaps();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionktxTextureCreateInfo(ByteBuffer container) Creates aktxTextureCreateInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintdepth of the base level of the texturebaseDepth(int value) Sets the specified value to thebaseDepth()field.intheight of the base level of the texturebaseHeight(int value) Sets the specified value to thebaseHeight()field.intwidth of the base level of the texturebaseWidth(int value) Sets the specified value to thebaseWidth()field.static ktxTextureCreateInfocalloc()Returns a newktxTextureCreateInfoinstance allocated withmemCalloc.static ktxTextureCreateInfo.Buffercalloc(int capacity) Returns a newktxTextureCreateInfo.Bufferinstance allocated withmemCalloc.static ktxTextureCreateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newktxTextureCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ktxTextureCreateInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newktxTextureCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ktxTextureCreateInfocreate()Returns a newktxTextureCreateInfoinstance allocated withBufferUtils.static ktxTextureCreateInfo.Buffercreate(int capacity) Returns a newktxTextureCreateInfo.Bufferinstance allocated withBufferUtils.static ktxTextureCreateInfocreate(long address) Returns a newktxTextureCreateInfoinstance for the specified memory address.static ktxTextureCreateInfo.Buffercreate(long address, int capacity) Create aktxTextureCreateInfo.Bufferinstance at the specified memory.static @Nullable ktxTextureCreateInfocreateSafe(long address) static @Nullable ktxTextureCreateInfo.BuffercreateSafe(long address, int capacity) booleanset toTRUEif mipmaps should be generated for the texture when loading into a 3D APIgenerateMipmaps(boolean value) Sets the specified value to thegenerateMipmaps()field.intinternal format for the texture, e.g.,GL_RGB8.glInternalformat(int value) Sets the specified value to theglInternalformat()field.booleanisArray()set toTRUEif the texture is to be an array texture.isArray(boolean value) Sets the specified value to theisArray()field.static ktxTextureCreateInfomalloc()Returns a newktxTextureCreateInfoinstance allocated withmemAlloc.static ktxTextureCreateInfo.Buffermalloc(int capacity) Returns a newktxTextureCreateInfo.Bufferinstance allocated withmemAlloc.static ktxTextureCreateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newktxTextureCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static ktxTextureCreateInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newktxTextureCreateInfoinstance allocated on the specifiedMemoryStack.static intnbaseDepth(long struct) Unsafe version ofbaseDepth().static voidnbaseDepth(long struct, int value) Unsafe version ofbaseDepth.static intnbaseHeight(long struct) Unsafe version ofbaseHeight().static voidnbaseHeight(long struct, int value) Unsafe version ofbaseHeight.static intnbaseWidth(long struct) Unsafe version ofbaseWidth().static voidnbaseWidth(long struct, int value) Unsafe version ofbaseWidth.static booleanngenerateMipmaps(long struct) Unsafe version ofgenerateMipmaps().static voidngenerateMipmaps(long struct, boolean value) Unsafe version ofgenerateMipmaps.static intnglInternalformat(long struct) Unsafe version ofglInternalformat().static voidnglInternalformat(long struct, int value) Unsafe version ofglInternalformat.static booleannisArray(long struct) Unsafe version ofisArray().static voidnisArray(long struct, boolean value) Unsafe version ofisArray.static intnnumDimensions(long struct) Unsafe version ofnumDimensions().static voidnnumDimensions(long struct, int value) Unsafe version ofnumDimensions.static intnnumFaces(long struct) Unsafe version ofnumFaces().static voidnnumFaces(long struct, int value) Unsafe version ofnumFaces.static intnnumLayers(long struct) Unsafe version ofnumLayers().static voidnnumLayers(long struct, int value) Unsafe version ofnumLayers.static intnnumLevels(long struct) Unsafe version ofnumLevels().static voidnnumLevels(long struct, int value) Unsafe version ofnumLevels.static @Nullable IntBuffernpDfd(long struct, int capacity) Unsafe version ofpDfd.static voidUnsafe version ofpDfd.intnumber of dimensions in the texture, 1, 2 or 3numDimensions(int value) Sets the specified value to thenumDimensions()field.intnumFaces()number of faces: 6 for cube maps, 1 otherwisenumFaces(int value) Sets the specified value to thenumFaces()field.intnumber of array layers in the texturenumLayers(int value) Sets the specified value to thenumLayers()field.intnumber of mip levels in the texture.numLevels(int value) Sets the specified value to thenumLevels()field.static intnvkFormat(long struct) Unsafe version ofvkFormat().static voidnvkFormat(long struct, int value) Unsafe version ofvkFormat.@Nullable IntBufferpDfd(int capacity) set(int glInternalformat, int vkFormat, @Nullable IntBuffer pDfd, int baseWidth, int baseHeight, int baseDepth, int numDimensions, int numLevels, int numLayers, int numFaces, boolean isArray, boolean generateMipmaps) Initializes this struct with the specified values.set(ktxTextureCreateInfo src) Copies the specified struct data to this struct.intsizeof()intvkFormat()vkFormatfor texture.vkFormat(int value) Sets the specified value to thevkFormat()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
GLINTERNALFORMAT
public static final int GLINTERNALFORMATThe struct member offsets. -
VKFORMAT
public static final int VKFORMATThe struct member offsets. -
PDFD
public static final int PDFDThe struct member offsets. -
BASEWIDTH
public static final int BASEWIDTHThe struct member offsets. -
BASEHEIGHT
public static final int BASEHEIGHTThe struct member offsets. -
BASEDEPTH
public static final int BASEDEPTHThe struct member offsets. -
NUMDIMENSIONS
public static final int NUMDIMENSIONSThe struct member offsets. -
NUMLEVELS
public static final int NUMLEVELSThe struct member offsets. -
NUMLAYERS
public static final int NUMLAYERSThe struct member offsets. -
NUMFACES
public static final int NUMFACESThe struct member offsets. -
ISARRAY
public static final int ISARRAYThe struct member offsets. -
GENERATEMIPMAPS
public static final int GENERATEMIPMAPSThe struct member offsets.
-
-
Constructor Details
-
ktxTextureCreateInfo
Creates aktxTextureCreateInfoinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<ktxTextureCreateInfo>
-
glInternalformat
public int glInternalformat()internal format for the texture, e.g.,GL_RGB8. Ignored when creating aktxTexture2. -
vkFormat
public int vkFormat()vkFormatfor texture. Ignored when creating aktxTexture1. -
pDfd
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- pointer to DFD. Used only when creating a
ktxTexture2and only ifvkFormatisVK_FORMAT_UNDEFINED.
-
baseWidth
public int baseWidth()width of the base level of the texture -
baseHeight
public int baseHeight()height of the base level of the texture -
baseDepth
public int baseDepth()depth of the base level of the texture -
numDimensions
public int numDimensions()number of dimensions in the texture, 1, 2 or 3 -
numLevels
public int numLevels()number of mip levels in the texture. Should be 1 ifgenerateMipmapsisTRUE. -
numLayers
public int numLayers()number of array layers in the texture -
numFaces
public int numFaces()number of faces: 6 for cube maps, 1 otherwise -
isArray
public boolean isArray()set toTRUEif the texture is to be an array texture. Means OpenGL will use aGL_TEXTURE_*_ARRAYtarget. -
generateMipmaps
public boolean generateMipmaps()set toTRUEif mipmaps should be generated for the texture when loading into a 3D API -
glInternalformat
Sets the specified value to theglInternalformat()field. -
vkFormat
Sets the specified value to thevkFormat()field. -
pDfd
-
baseWidth
Sets the specified value to thebaseWidth()field. -
baseHeight
Sets the specified value to thebaseHeight()field. -
baseDepth
Sets the specified value to thebaseDepth()field. -
numDimensions
Sets the specified value to thenumDimensions()field. -
numLevels
Sets the specified value to thenumLevels()field. -
numLayers
Sets the specified value to thenumLayers()field. -
numFaces
Sets the specified value to thenumFaces()field. -
isArray
Sets the specified value to theisArray()field. -
generateMipmaps
Sets the specified value to thegenerateMipmaps()field. -
set
public ktxTextureCreateInfo set(int glInternalformat, int vkFormat, @Nullable IntBuffer pDfd, int baseWidth, int baseHeight, int baseDepth, int numDimensions, int numLevels, int numLayers, int numFaces, boolean isArray, boolean generateMipmaps) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newktxTextureCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newktxTextureCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newktxTextureCreateInfoinstance allocated withBufferUtils. -
create
Returns a newktxTextureCreateInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newktxTextureCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newktxTextureCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newktxTextureCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aktxTextureCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newktxTextureCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newktxTextureCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newktxTextureCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newktxTextureCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nglInternalformat
public static int nglInternalformat(long struct) Unsafe version ofglInternalformat(). -
nvkFormat
public static int nvkFormat(long struct) Unsafe version ofvkFormat(). -
npDfd
Unsafe version ofpDfd. -
nbaseWidth
public static int nbaseWidth(long struct) Unsafe version ofbaseWidth(). -
nbaseHeight
public static int nbaseHeight(long struct) Unsafe version ofbaseHeight(). -
nbaseDepth
public static int nbaseDepth(long struct) Unsafe version ofbaseDepth(). -
nnumDimensions
public static int nnumDimensions(long struct) Unsafe version ofnumDimensions(). -
nnumLevels
public static int nnumLevels(long struct) Unsafe version ofnumLevels(). -
nnumLayers
public static int nnumLayers(long struct) Unsafe version ofnumLayers(). -
nnumFaces
public static int nnumFaces(long struct) Unsafe version ofnumFaces(). -
nisArray
public static boolean nisArray(long struct) Unsafe version ofisArray(). -
ngenerateMipmaps
public static boolean ngenerateMipmaps(long struct) Unsafe version ofgenerateMipmaps(). -
nglInternalformat
public static void nglInternalformat(long struct, int value) Unsafe version ofglInternalformat. -
nvkFormat
public static void nvkFormat(long struct, int value) Unsafe version ofvkFormat. -
npDfd
Unsafe version ofpDfd. -
nbaseWidth
public static void nbaseWidth(long struct, int value) Unsafe version ofbaseWidth. -
nbaseHeight
public static void nbaseHeight(long struct, int value) Unsafe version ofbaseHeight. -
nbaseDepth
public static void nbaseDepth(long struct, int value) Unsafe version ofbaseDepth. -
nnumDimensions
public static void nnumDimensions(long struct, int value) Unsafe version ofnumDimensions. -
nnumLevels
public static void nnumLevels(long struct, int value) Unsafe version ofnumLevels. -
nnumLayers
public static void nnumLayers(long struct, int value) Unsafe version ofnumLayers. -
nnumFaces
public static void nnumFaces(long struct, int value) Unsafe version ofnumFaces. -
nisArray
public static void nisArray(long struct, boolean value) Unsafe version ofisArray. -
ngenerateMipmaps
public static void ngenerateMipmaps(long struct, boolean value) Unsafe version ofgenerateMipmaps.
-