Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
A cross-platform, graphics API agnostic rendering library. It provides a high performance, low level abstraction for common platform graphics APIs like OpenGL, Direct3D and Apple Metal.
{@link #BGFX_DEBUG_WIREFRAME DEBUG_WIREFRAME} - Wireframe rendering. All rendering primitives will be rendered as lines.
*
{@link #BGFX_DEBUG_IFH DEBUG_IFH} -
* Infinitely fast hardware. When this flag is set all rendering calls will be skipped. This is useful when profiling to quickly assess potential
* bottlenecks between CPU and GPU.
*
* @param _normalized when using fixed point attribute type (f.e. {@link #BGFX_ATTRIB_TYPE_UINT8 ATTRIB_TYPE_UINT8}) value will be normalized for vertex shader usage. When {@code normalized} is set to
* true, {@link #BGFX_ATTRIB_TYPE_UINT8 ATTRIB_TYPE_UINT8} value in range 0-255 will be in range 0.0-1.0 in vertex shader.
* @param _asInt packaging rule for {@code vertexPack}, {@code vertexUnpack}, and {@code vertexConvert} for {@link #BGFX_ATTRIB_TYPE_UINT8 ATTRIB_TYPE_UINT8} and {@link #BGFX_ATTRIB_TYPE_INT16 ATTRIB_TYPE_INT16}. Unpacking
* code must be implemented inside vertex shader.
*/
public static void bgfx_vertex_decl_add(@NativeType("bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("bgfx_attrib_t") int _attrib, @NativeType("uint8_t") int _num, @NativeType("bgfx_attrib_type_t") int _type, @NativeType("bool") boolean _normalized, @NativeType("bool") boolean _asInt) {
nbgfx_vertex_decl_add(_decl.address(), _attrib, (byte)_num, _type, _normalized, _asInt);
}
// --- [ bgfx_vertex_decl_skip ] ---
/** Unsafe version of: {@link #bgfx_vertex_decl_skip vertex_decl_skip} */
public static void nbgfx_vertex_decl_skip(long _decl, byte _num) {
long __functionAddress = Functions.vertex_decl_skip;
invokePV(__functionAddress, _decl, _num);
}
/**
* Skips {@code _num} bytes in vertex stream.
*
* @param _decl the vertex declaration
* @param _num the number of bytes to skip
*/
public static void bgfx_vertex_decl_skip(@NativeType("bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("uint8_t") int _num) {
nbgfx_vertex_decl_skip(_decl.address(), (byte)_num);
}
// --- [ bgfx_vertex_decl_end ] ---
/** Unsafe version of: {@link #bgfx_vertex_decl_end vertex_decl_end} */
public static void nbgfx_vertex_decl_end(long _decl) {
long __functionAddress = Functions.vertex_decl_end;
invokePV(__functionAddress, _decl);
}
/**
* Ends a vertex declaration.
*
* @param _decl the vertex declaration
*/
public static void bgfx_vertex_decl_end(@NativeType("bgfx_vertex_decl_t *") BGFXVertexDecl _decl) {
nbgfx_vertex_decl_end(_decl.address());
}
// --- [ bgfx_vertex_pack ] ---
/** Unsafe version of: {@link #bgfx_vertex_pack vertex_pack} */
public static void nbgfx_vertex_pack(long _input, boolean _inputNormalized, int _attr, long _decl, long _data, int _index) {
long __functionAddress = Functions.vertex_pack;
invokePPPV(__functionAddress, _input, _inputNormalized, _attr, _decl, _data, _index);
}
/**
* Packs vertex attribute into vertex stream format.
*
* @param _input value to be packed into vertex stream
* @param _inputNormalized true if input value is already normalized
* @param _attr attribute to pack. One of:
{@link #BGFX_ATTRIB_POSITION ATTRIB_POSITION}
{@link #BGFX_ATTRIB_NORMAL ATTRIB_NORMAL}
{@link #BGFX_ATTRIB_TANGENT ATTRIB_TANGENT}
{@link #BGFX_ATTRIB_BITANGENT ATTRIB_BITANGENT}
{@link #BGFX_ATTRIB_COLOR0 ATTRIB_COLOR0}
{@link #BGFX_ATTRIB_COLOR1 ATTRIB_COLOR1}
{@link #BGFX_ATTRIB_COLOR2 ATTRIB_COLOR2}
{@link #BGFX_ATTRIB_COLOR3 ATTRIB_COLOR3}
{@link #BGFX_ATTRIB_INDICES ATTRIB_INDICES}
{@link #BGFX_ATTRIB_WEIGHT ATTRIB_WEIGHT}
{@link #BGFX_ATTRIB_TEXCOORD0 ATTRIB_TEXCOORD0}
{@link #BGFX_ATTRIB_TEXCOORD1 ATTRIB_TEXCOORD1}
{@link #BGFX_ATTRIB_TEXCOORD2 ATTRIB_TEXCOORD2}
{@link #BGFX_ATTRIB_TEXCOORD3 ATTRIB_TEXCOORD3}
{@link #BGFX_ATTRIB_TEXCOORD4 ATTRIB_TEXCOORD4}
{@link #BGFX_ATTRIB_TEXCOORD5 ATTRIB_TEXCOORD5}
{@link #BGFX_ATTRIB_TEXCOORD6 ATTRIB_TEXCOORD6}
{@link #BGFX_ATTRIB_TEXCOORD7 ATTRIB_TEXCOORD7}
* @param _decl vertex stream declaration
* @param _data destination vertex stream where data will be packed
* @param _index vertex index that will be modified
*/
public static void bgfx_vertex_pack(@NativeType("const float *") FloatBuffer _input, @NativeType("bool") boolean _inputNormalized, @NativeType("bgfx_attrib_t") int _attr, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("void *") ByteBuffer _data, @NativeType("uint32_t") int _index) {
if (CHECKS) {
check(_input, 4);
}
nbgfx_vertex_pack(memAddress(_input), _inputNormalized, _attr, _decl.address(), memAddress(_data), _index);
}
// --- [ bgfx_vertex_unpack ] ---
/** Unsafe version of: {@link #bgfx_vertex_unpack vertex_unpack} */
public static void nbgfx_vertex_unpack(long _output, int _attr, long _decl, long _data, int _index) {
long __functionAddress = Functions.vertex_unpack;
invokePPPV(__functionAddress, _output, _attr, _decl, _data, _index);
}
/**
* Unpacks vertex attribute from vertex stream format.
*
* @param _output result of unpacking
* @param _attr attribute to unpack. One of:
{@link #BGFX_ATTRIB_POSITION ATTRIB_POSITION}
{@link #BGFX_ATTRIB_NORMAL ATTRIB_NORMAL}
{@link #BGFX_ATTRIB_TANGENT ATTRIB_TANGENT}
{@link #BGFX_ATTRIB_BITANGENT ATTRIB_BITANGENT}
{@link #BGFX_ATTRIB_COLOR0 ATTRIB_COLOR0}
{@link #BGFX_ATTRIB_COLOR1 ATTRIB_COLOR1}
{@link #BGFX_ATTRIB_COLOR2 ATTRIB_COLOR2}
{@link #BGFX_ATTRIB_COLOR3 ATTRIB_COLOR3}
{@link #BGFX_ATTRIB_INDICES ATTRIB_INDICES}
{@link #BGFX_ATTRIB_WEIGHT ATTRIB_WEIGHT}
{@link #BGFX_ATTRIB_TEXCOORD0 ATTRIB_TEXCOORD0}
{@link #BGFX_ATTRIB_TEXCOORD1 ATTRIB_TEXCOORD1}
{@link #BGFX_ATTRIB_TEXCOORD2 ATTRIB_TEXCOORD2}
{@link #BGFX_ATTRIB_TEXCOORD3 ATTRIB_TEXCOORD3}
{@link #BGFX_ATTRIB_TEXCOORD4 ATTRIB_TEXCOORD4}
{@link #BGFX_ATTRIB_TEXCOORD5 ATTRIB_TEXCOORD5}
{@link #BGFX_ATTRIB_TEXCOORD6 ATTRIB_TEXCOORD6}
{@link #BGFX_ATTRIB_TEXCOORD7 ATTRIB_TEXCOORD7}
* @param _decl vertex stream declaration
* @param _data source vertex stream from where data will be unpacked
* @param _index vertex index that will be unpacked
*/
public static void bgfx_vertex_unpack(@NativeType("float *") FloatBuffer _output, @NativeType("bgfx_attrib_t") int _attr, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("const void *") ByteBuffer _data, @NativeType("uint32_t") int _index) {
if (CHECKS) {
check(_output, 4);
}
nbgfx_vertex_unpack(memAddress(_output), _attr, _decl.address(), memAddress(_data), _index);
}
// --- [ bgfx_vertex_convert ] ---
/** Unsafe version of: {@link #bgfx_vertex_convert vertex_convert} */
public static void nbgfx_vertex_convert(long _destDecl, long _destData, long _srcDecl, long _srcData, int _num) {
long __functionAddress = Functions.vertex_convert;
invokePPPPV(__functionAddress, _destDecl, _destData, _srcDecl, _srcData, _num);
}
/**
* Converts vertex stream data from one vertex stream format to another.
*
* @param _destDecl destination vertex stream declaration
* @param _destData destination vertex stream
* @param _srcDecl source vertex stream declaration
* @param _srcData source vertex stream data
* @param _num number of vertices to convert from source to destination
*/
public static void bgfx_vertex_convert(@NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _destDecl, @NativeType("void *") ByteBuffer _destData, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _srcDecl, @NativeType("const void *") ByteBuffer _srcData, @NativeType("uint32_t") int _num) {
nbgfx_vertex_convert(_destDecl.address(), memAddress(_destData), _srcDecl.address(), memAddress(_srcData), _num);
}
// --- [ bgfx_weld_vertices ] ---
/**
* Unsafe version of: {@link #bgfx_weld_vertices weld_vertices}
*
* @param _num number of vertices in vertex stream
*/
public static short nbgfx_weld_vertices(long _output, long _decl, long _data, short _num, float _epsilon) {
long __functionAddress = Functions.weld_vertices;
return invokePPPS(__functionAddress, _output, _decl, _data, _num, _epsilon);
}
/**
* Welds vertices.
*
* @param _output welded vertices remapping table. The size of buffer be the same as number of vertices.
* @param _decl vertex stream declaration
* @param _data vertex stream
* @param _epsilon error tolerance for vertex position comparison
*
* @return number of unique vertices after vertex welding
*/
@NativeType("uint16_t")
public static short bgfx_weld_vertices(@NativeType("uint16_t *") ShortBuffer _output, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("const void *") ByteBuffer _data, float _epsilon) {
return nbgfx_weld_vertices(memAddress(_output), _decl.address(), memAddress(_data), (short)_output.remaining(), _epsilon);
}
// --- [ bgfx_topology_convert ] ---
/**
* Unsafe version of: {@link #bgfx_topology_convert topology_convert}
*
* @param _dstSize destination index buffer in bytes. It must be large enough to contain output indices. If destination size is insufficient index buffer will be
* truncated.
* @param _numIndices number of input indices
*/
public static int nbgfx_topology_convert(int _conversion, long _dst, int _dstSize, long _indices, int _numIndices, boolean _index32) {
long __functionAddress = Functions.topology_convert;
return invokePPI(__functionAddress, _conversion, _dst, _dstSize, _indices, _numIndices, _index32);
}
/**
* Converts index buffer for use with different primitive topologies.
*
* @param _conversion conversion type. One of:
* @param _dst destination index buffer. If this argument is {@code NULL} function will return number of indices after conversion
* @param _indices source indices
* @param _index32 set to `true` if input indices are 32-bit
*
* @return number of output indices after conversion
*/
@NativeType("uint32_t")
public static int bgfx_topology_convert(@NativeType("bgfx_topology_convert_t") int _conversion, @Nullable @NativeType("void *") ByteBuffer _dst, @NativeType("const void *") ByteBuffer _indices, @NativeType("bool") boolean _index32) {
return nbgfx_topology_convert(_conversion, memAddressSafe(_dst), remainingSafe(_dst), memAddress(_indices), _indices.remaining() >> (_index32 ? 2 : 1), _index32);
}
/**
* Converts index buffer for use with different primitive topologies.
*
* @param _conversion conversion type. One of:
* @param _dst destination index buffer. If this argument is {@code NULL} function will return number of indices after conversion
* @param _indices source indices
* @param _index32 set to `true` if input indices are 32-bit
*
* @return number of output indices after conversion
*/
@NativeType("uint32_t")
public static int bgfx_topology_convert(@NativeType("bgfx_topology_convert_t") int _conversion, @Nullable @NativeType("void *") ShortBuffer _dst, @NativeType("const void *") ShortBuffer _indices, @NativeType("bool") boolean _index32) {
return nbgfx_topology_convert(_conversion, memAddressSafe(_dst), remainingSafe(_dst) << 1, memAddress(_indices), (int)(((long)_indices.remaining() << 1) >> (_index32 ? 2 : 1)), _index32);
}
/**
* Converts index buffer for use with different primitive topologies.
*
* @param _conversion conversion type. One of:
* @param _dst destination index buffer. If this argument is {@code NULL} function will return number of indices after conversion
* @param _indices source indices
* @param _index32 set to `true` if input indices are 32-bit
*
* @return number of output indices after conversion
*/
@NativeType("uint32_t")
public static int bgfx_topology_convert(@NativeType("bgfx_topology_convert_t") int _conversion, @Nullable @NativeType("void *") IntBuffer _dst, @NativeType("const void *") IntBuffer _indices, @NativeType("bool") boolean _index32) {
return nbgfx_topology_convert(_conversion, memAddressSafe(_dst), remainingSafe(_dst) << 2, memAddress(_indices), (int)(((long)_indices.remaining() << 2) >> (_index32 ? 2 : 1)), _index32);
}
// --- [ bgfx_topology_sort_tri_list ] ---
/**
* Unsafe version of: {@link #bgfx_topology_sort_tri_list topology_sort_tri_list}
*
* @param _dstSize destination index buffer in bytes. It must be large enough to contain output indices. If destination size is insufficient index buffer will be
* truncated.
* @param _numIndices number of input indices
*/
public static void nbgfx_topology_sort_tri_list(int _sort, long _dst, int _dstSize, long _dir, long _pos, long _vertices, int _stride, long _indices, int _numIndices, boolean _index32) {
long __functionAddress = Functions.topology_sort_tri_list;
invokePPPPPV(__functionAddress, _sort, _dst, _dstSize, _dir, _pos, _vertices, _stride, _indices, _numIndices, _index32);
}
/**
* Sorts indices.
*
* @param _sort sort order. One of:
* @param _dst destination index buffer
* @param _dir direction (vector must be normalized)
* @param _pos position
* @param _vertices pointer to first vertex represented as float x, y, z. Must contain at least number of vertices referenced by index buffer.
* @param _stride vertex stride
* @param _indices source indices
* @param _index32 set to `true` if input indices are 32-bit
*/
public static void bgfx_topology_sort_tri_list(@NativeType("bgfx_topology_sort_t") int _sort, @NativeType("void *") ByteBuffer _dst, @NativeType("const float *") FloatBuffer _dir, @NativeType("const float *") FloatBuffer _pos, @NativeType("const void *") ByteBuffer _vertices, @NativeType("uint32_t") int _stride, @NativeType("const void *") ByteBuffer _indices, @NativeType("bool") boolean _index32) {
if (CHECKS) {
check(_dir, 3);
check(_pos, 3);
}
nbgfx_topology_sort_tri_list(_sort, memAddress(_dst), _dst.remaining(), memAddress(_dir), memAddress(_pos), memAddress(_vertices), _stride, memAddress(_indices), _indices.remaining() >> (_index32 ? 2 : 1), _index32);
}
/**
* Sorts indices.
*
* @param _sort sort order. One of:
* @param _dst destination index buffer
* @param _dir direction (vector must be normalized)
* @param _pos position
* @param _vertices pointer to first vertex represented as float x, y, z. Must contain at least number of vertices referenced by index buffer.
* @param _stride vertex stride
* @param _indices source indices
* @param _index32 set to `true` if input indices are 32-bit
*/
public static void bgfx_topology_sort_tri_list(@NativeType("bgfx_topology_sort_t") int _sort, @NativeType("void *") IntBuffer _dst, @NativeType("const float *") FloatBuffer _dir, @NativeType("const float *") FloatBuffer _pos, @NativeType("const void *") ByteBuffer _vertices, @NativeType("uint32_t") int _stride, @NativeType("const void *") IntBuffer _indices, @NativeType("bool") boolean _index32) {
if (CHECKS) {
check(_dir, 3);
check(_pos, 3);
}
nbgfx_topology_sort_tri_list(_sort, memAddress(_dst), _dst.remaining() << 2, memAddress(_dir), memAddress(_pos), memAddress(_vertices), _stride, memAddress(_indices), (int)(((long)_indices.remaining() << 2) >> (_index32 ? 2 : 1)), _index32);
}
// --- [ bgfx_get_supported_renderers ] ---
/**
* Unsafe version of: {@link #bgfx_get_supported_renderers get_supported_renderers}
*
* @param _max maximum number of elements in {@code _enum} array
*/
public static byte nbgfx_get_supported_renderers(byte _max, long _enum) {
long __functionAddress = Functions.get_supported_renderers;
return invokePB(__functionAddress, _max, _enum);
}
/**
* Returns supported backend API renderers.
*
* @param _enum array where supported renderers will be written
*
* @return the number of renderers written to {@code _enum}
*/
@NativeType("uint8_t")
public static byte bgfx_get_supported_renderers(@NativeType("bgfx_renderer_type_t *") IntBuffer _enum) {
return nbgfx_get_supported_renderers((byte)_enum.remaining(), memAddress(_enum));
}
// --- [ bgfx_get_renderer_name ] ---
/** Unsafe version of: {@link #bgfx_get_renderer_name get_renderer_name} */
public static long nbgfx_get_renderer_name(int _type) {
long __functionAddress = Functions.get_renderer_name;
return invokeP(__functionAddress, _type);
}
/**
* Returns name of renderer.
*
* @param _type the renderer type. One of:
*/
@Nullable
@NativeType("const char *")
public static String bgfx_get_renderer_name(@NativeType("bgfx_renderer_type_t") int _type) {
long __result = nbgfx_get_renderer_name(_type);
return memASCIISafe(__result);
}
// --- [ bgfx_init ] ---
/** Unsafe version of: {@link #bgfx_init init} */
public static boolean nbgfx_init(int _type, short _vendorId, short _deviceId, long _callback, long _allocator) {
long __functionAddress = Functions.init;
return invokePPZ(__functionAddress, _type, _vendorId, _deviceId, _callback, _allocator);
}
/**
* Initializes bgfx library.
*
* @param _type select rendering backend. When set to {@link #BGFX_RENDERER_TYPE_COUNT RENDERER_TYPE_COUNT}, a default rendering backend will be selected appropriate to the platform. One of:
* @param _vendorId vendor PCI id. If set to {@link #BGFX_PCI_ID_NONE PCI_ID_NONE} it will select the first device.
* @param _deviceId device id. If set to 0 it will select first device, or device with matching id.
* @param _callback provide application specific callback interface
* @param _allocator custom allocator. When custom allocator is not specified, bgfx uses the CRT allocator. Bgfx assumes custom allocator is thread safe.
*
* @return `true` if initialization was successful
*/
@NativeType("bool")
public static boolean bgfx_init(@NativeType("bgfx_renderer_type_t") int _type, @NativeType("uint16_t") short _vendorId, @NativeType("uint16_t") int _deviceId, @Nullable @NativeType("bgfx_callback_interface_t *") BGFXCallbackInterface _callback, @Nullable @NativeType("bgfx_allocator_interface_t *") BGFXAllocatorInterface _allocator) {
return nbgfx_init(_type, _vendorId, (short)_deviceId, memAddressSafe(_callback), memAddressSafe(_allocator));
}
// --- [ bgfx_shutdown ] ---
/** Shuts down bgfx library. */
public static void bgfx_shutdown() {
long __functionAddress = Functions.shutdown;
invokeV(__functionAddress);
}
// --- [ bgfx_reset ] ---
/**
* Resets graphic settings and back-buffer size.
*
*
This call doesn't actually change window size, it just resizes back-buffer. Windowing code has to change window size.
*
* @param _width back-buffer width
* @param _height back-buffer height
* @param _flags reset flags. One or more of:
*/
public static void bgfx_reset(@NativeType("uint32_t") int _width, @NativeType("uint32_t") int _height, @NativeType("uint32_t") int _flags) {
long __functionAddress = Functions.reset;
invokeV(__functionAddress, _width, _height, _flags);
}
// --- [ bgfx_begin ] ---
/**
* Begin submitting draw calls from thread.
*
* @return an encoder for submitting draw calls from multiple threads
*/
@NativeType("struct bgfx_encoder *")
public static long bgfx_begin() {
long __functionAddress = Functions.begin;
return invokeP(__functionAddress);
}
// --- [ bgfx_end ] ---
/**
* End submitting draw calls from thread.
*
* @param _encoder the encoder
*/
public static void bgfx_end(@NativeType("struct bgfx_encoder *") long _encoder) {
long __functionAddress = Functions.end;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder);
}
// --- [ bgfx_frame ] ---
/**
* Advances to next frame. When using multithreaded renderer, this call just swaps internal buffers, kicks render thread, and returns. In singlethreaded
* renderer this call does frame rendering.
*
* @param _capture capture frame with graphics debugger
*
* @return current frame number. This might be used in conjunction with double/multi buffering data outside the library and passing it to library {@link #bgfx_make_ref make_ref}
* calls.
*/
@NativeType("uint32_t")
public static int bgfx_frame(@NativeType("bool") boolean _capture) {
long __functionAddress = Functions.frame;
return invokeI(__functionAddress, _capture);
}
// --- [ bgfx_get_renderer_type ] ---
/** Returns current renderer backend API type. */
@NativeType("bgfx_renderer_type_t")
public static int bgfx_get_renderer_type() {
long __functionAddress = Functions.get_renderer_type;
return invokeI(__functionAddress);
}
// --- [ bgfx_get_caps ] ---
/** Unsafe version of: {@link #bgfx_get_caps get_caps} */
public static long nbgfx_get_caps() {
long __functionAddress = Functions.get_caps;
return invokeP(__functionAddress);
}
/** Returns renderer capabilities. */
@Nullable
@NativeType("const bgfx_caps_t *")
public static BGFXCaps bgfx_get_caps() {
long __result = nbgfx_get_caps();
return BGFXCaps.createSafe(__result);
}
// --- [ bgfx_get_hmd ] ---
/** Unsafe version of: {@link #bgfx_get_hmd get_hmd} */
public static long nbgfx_get_hmd() {
long __functionAddress = Functions.get_hmd;
return invokeP(__functionAddress);
}
/** Returns HMD info. */
@Nullable
@NativeType("const bgfx_hmd_t *")
public static BGFXHmd bgfx_get_hmd() {
long __result = nbgfx_get_hmd();
return BGFXHmd.createSafe(__result);
}
// --- [ bgfx_get_stats ] ---
/** Unsafe version of: {@link #bgfx_get_stats get_stats} */
public static long nbgfx_get_stats() {
long __functionAddress = Functions.get_stats;
return invokeP(__functionAddress);
}
/**
* Returns performance counters.
*
*
The pointer returned is valid until {@link #bgfx_frame frame} is called.
*/
@Nullable
@NativeType("const bgfx_stats_t *")
public static BGFXStats bgfx_get_stats() {
long __result = nbgfx_get_stats();
return BGFXStats.createSafe(__result);
}
// --- [ bgfx_alloc ] ---
/** Unsafe version of: {@link #bgfx_alloc alloc} */
public static long nbgfx_alloc(int _size) {
long __functionAddress = Functions.alloc;
return invokeP(__functionAddress, _size);
}
/**
* Allocates buffer to pass to bgfx calls. Data will be freed inside bgfx.
*
* @param _size the number of bytes to allocate
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_alloc(@NativeType("uint32_t") int _size) {
long __result = nbgfx_alloc(_size);
return BGFXMemory.createSafe(__result);
}
// --- [ bgfx_copy ] ---
/**
* Unsafe version of: {@link #bgfx_copy copy}
*
* @param _size size of data to be copied
*/
public static long nbgfx_copy(long _data, int _size) {
long __functionAddress = Functions.copy;
return invokePP(__functionAddress, _data, _size);
}
/**
* Allocates buffer and copies data into it. Data will be freed inside bgfx.
*
* @param _data pointer to data to be copied
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") ByteBuffer _data) {
long __result = nbgfx_copy(memAddress(_data), _data.remaining());
return BGFXMemory.createSafe(__result);
}
/**
* Allocates buffer and copies data into it. Data will be freed inside bgfx.
*
* @param _data pointer to data to be copied
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") ShortBuffer _data) {
long __result = nbgfx_copy(memAddress(_data), _data.remaining() << 1);
return BGFXMemory.createSafe(__result);
}
/**
* Allocates buffer and copies data into it. Data will be freed inside bgfx.
*
* @param _data pointer to data to be copied
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") IntBuffer _data) {
long __result = nbgfx_copy(memAddress(_data), _data.remaining() << 2);
return BGFXMemory.createSafe(__result);
}
/**
* Allocates buffer and copies data into it. Data will be freed inside bgfx.
*
* @param _data pointer to data to be copied
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") LongBuffer _data) {
long __result = nbgfx_copy(memAddress(_data), _data.remaining() << 3);
return BGFXMemory.createSafe(__result);
}
/**
* Allocates buffer and copies data into it. Data will be freed inside bgfx.
*
* @param _data pointer to data to be copied
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") FloatBuffer _data) {
long __result = nbgfx_copy(memAddress(_data), _data.remaining() << 2);
return BGFXMemory.createSafe(__result);
}
/**
* Allocates buffer and copies data into it. Data will be freed inside bgfx.
*
* @param _data pointer to data to be copied
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") DoubleBuffer _data) {
long __result = nbgfx_copy(memAddress(_data), _data.remaining() << 3);
return BGFXMemory.createSafe(__result);
}
/**
* Allocates buffer and copies data into it. Data will be freed inside bgfx.
*
* @param _data pointer to data to be copied
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") PointerBuffer _data) {
long __result = nbgfx_copy(memAddress(_data), _data.remaining() << POINTER_SHIFT);
return BGFXMemory.createSafe(__result);
}
// --- [ bgfx_make_ref ] ---
/**
* Unsafe version of: {@link #bgfx_make_ref make_ref}
*
* @param _size the number of bytes to reference
*/
public static long nbgfx_make_ref(long _data, int _size) {
long __functionAddress = Functions.make_ref;
return invokePP(__functionAddress, _data, _size);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
Data passed must be available for at least 2 {@link #bgfx_frame frame} calls.
*
* @param _data the data to reference
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref(@NativeType("const void *") ByteBuffer _data) {
long __result = nbgfx_make_ref(memAddress(_data), _data.remaining());
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
Data passed must be available for at least 2 {@link #bgfx_frame frame} calls.
*
* @param _data the data to reference
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref(@NativeType("const void *") ShortBuffer _data) {
long __result = nbgfx_make_ref(memAddress(_data), _data.remaining() << 1);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
Data passed must be available for at least 2 {@link #bgfx_frame frame} calls.
*
* @param _data the data to reference
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref(@NativeType("const void *") IntBuffer _data) {
long __result = nbgfx_make_ref(memAddress(_data), _data.remaining() << 2);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
Data passed must be available for at least 2 {@link #bgfx_frame frame} calls.
*
* @param _data the data to reference
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref(@NativeType("const void *") LongBuffer _data) {
long __result = nbgfx_make_ref(memAddress(_data), _data.remaining() << 3);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
Data passed must be available for at least 2 {@link #bgfx_frame frame} calls.
*
* @param _data the data to reference
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref(@NativeType("const void *") FloatBuffer _data) {
long __result = nbgfx_make_ref(memAddress(_data), _data.remaining() << 2);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
Data passed must be available for at least 2 {@link #bgfx_frame frame} calls.
*
* @param _data the data to reference
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref(@NativeType("const void *") DoubleBuffer _data) {
long __result = nbgfx_make_ref(memAddress(_data), _data.remaining() << 3);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
Data passed must be available for at least 2 {@link #bgfx_frame frame} calls.
*
* @param _data the data to reference
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref(@NativeType("const void *") PointerBuffer _data) {
long __result = nbgfx_make_ref(memAddress(_data), _data.remaining() << POINTER_SHIFT);
return BGFXMemory.createSafe(__result);
}
// --- [ bgfx_make_ref_release ] ---
/**
* Unsafe version of: {@link #bgfx_make_ref_release make_ref_release}
*
* @param _size the number of bytes to reference
*/
public static long nbgfx_make_ref_release(long _data, int _size, long _releaseFn, long _userData) {
long __functionAddress = Functions.make_ref_release;
return invokePPPP(__functionAddress, _data, _size, _releaseFn, _userData);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
The {@code bgfx_release_fn_t} function pointer will release this memory after it's consumed. The {@code bgfx_release_fn_t} function must be able to be
* called from any thread.
*
* @param _data the data to reference
* @param _releaseFn the release function
* @param _userData user data to pass to {@code _releaseFn}
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref_release(@NativeType("const void *") ByteBuffer _data, @NativeType("bgfx_release_fn_t") BGFXReleaseFunctionCallbackI _releaseFn, @NativeType("void *") long _userData) {
long __result = nbgfx_make_ref_release(memAddress(_data), _data.remaining(), _releaseFn.address(), _userData);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
The {@code bgfx_release_fn_t} function pointer will release this memory after it's consumed. The {@code bgfx_release_fn_t} function must be able to be
* called from any thread.
*
* @param _data the data to reference
* @param _releaseFn the release function
* @param _userData user data to pass to {@code _releaseFn}
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref_release(@NativeType("const void *") ShortBuffer _data, @NativeType("bgfx_release_fn_t") BGFXReleaseFunctionCallbackI _releaseFn, @NativeType("void *") long _userData) {
long __result = nbgfx_make_ref_release(memAddress(_data), _data.remaining() << 1, _releaseFn.address(), _userData);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
The {@code bgfx_release_fn_t} function pointer will release this memory after it's consumed. The {@code bgfx_release_fn_t} function must be able to be
* called from any thread.
*
* @param _data the data to reference
* @param _releaseFn the release function
* @param _userData user data to pass to {@code _releaseFn}
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref_release(@NativeType("const void *") IntBuffer _data, @NativeType("bgfx_release_fn_t") BGFXReleaseFunctionCallbackI _releaseFn, @NativeType("void *") long _userData) {
long __result = nbgfx_make_ref_release(memAddress(_data), _data.remaining() << 2, _releaseFn.address(), _userData);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
The {@code bgfx_release_fn_t} function pointer will release this memory after it's consumed. The {@code bgfx_release_fn_t} function must be able to be
* called from any thread.
*
* @param _data the data to reference
* @param _releaseFn the release function
* @param _userData user data to pass to {@code _releaseFn}
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref_release(@NativeType("const void *") LongBuffer _data, @NativeType("bgfx_release_fn_t") BGFXReleaseFunctionCallbackI _releaseFn, @NativeType("void *") long _userData) {
long __result = nbgfx_make_ref_release(memAddress(_data), _data.remaining() << 3, _releaseFn.address(), _userData);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
The {@code bgfx_release_fn_t} function pointer will release this memory after it's consumed. The {@code bgfx_release_fn_t} function must be able to be
* called from any thread.
*
* @param _data the data to reference
* @param _releaseFn the release function
* @param _userData user data to pass to {@code _releaseFn}
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref_release(@NativeType("const void *") FloatBuffer _data, @NativeType("bgfx_release_fn_t") BGFXReleaseFunctionCallbackI _releaseFn, @NativeType("void *") long _userData) {
long __result = nbgfx_make_ref_release(memAddress(_data), _data.remaining() << 2, _releaseFn.address(), _userData);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
The {@code bgfx_release_fn_t} function pointer will release this memory after it's consumed. The {@code bgfx_release_fn_t} function must be able to be
* called from any thread.
*
* @param _data the data to reference
* @param _releaseFn the release function
* @param _userData user data to pass to {@code _releaseFn}
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref_release(@NativeType("const void *") DoubleBuffer _data, @NativeType("bgfx_release_fn_t") BGFXReleaseFunctionCallbackI _releaseFn, @NativeType("void *") long _userData) {
long __result = nbgfx_make_ref_release(memAddress(_data), _data.remaining() << 3, _releaseFn.address(), _userData);
return BGFXMemory.createSafe(__result);
}
/**
* Makes reference to data to pass to bgfx. Unlike {@link #bgfx_alloc alloc}, this call doesn't allocate memory for data. It just copies the {@code _data} pointer.
*
*
The {@code bgfx_release_fn_t} function pointer will release this memory after it's consumed. The {@code bgfx_release_fn_t} function must be able to be
* called from any thread.
*
* @param _data the data to reference
* @param _releaseFn the release function
* @param _userData user data to pass to {@code _releaseFn}
*/
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_make_ref_release(@NativeType("const void *") PointerBuffer _data, @NativeType("bgfx_release_fn_t") BGFXReleaseFunctionCallbackI _releaseFn, @NativeType("void *") long _userData) {
long __result = nbgfx_make_ref_release(memAddress(_data), _data.remaining() << POINTER_SHIFT, _releaseFn.address(), _userData);
return BGFXMemory.createSafe(__result);
}
// --- [ bgfx_set_debug ] ---
/**
* Sets debug flags.
*
* @param _debug the debug flags. One or more of:
{@link #BGFX_DEBUG_NONE DEBUG_NONE}
{@link #BGFX_DEBUG_WIREFRAME DEBUG_WIREFRAME}
{@link #BGFX_DEBUG_IFH DEBUG_IFH}
{@link #BGFX_DEBUG_STATS DEBUG_STATS}
{@link #BGFX_DEBUG_TEXT DEBUG_TEXT}
{@link #BGFX_DEBUG_PROFILER DEBUG_PROFILER}
*/
public static void bgfx_set_debug(@NativeType("uint32_t") int _debug) {
long __functionAddress = Functions.set_debug;
invokeV(__functionAddress, _debug);
}
// --- [ bgfx_dbg_text_clear ] ---
/** Unsafe version of: {@link #bgfx_dbg_text_clear dbg_text_clear} */
public static void nbgfx_dbg_text_clear(byte _attr, boolean _small) {
long __functionAddress = Functions.dbg_text_clear;
invokeV(__functionAddress, _attr, _small);
}
/**
* Clears internal debug text buffer.
*
* @param _attr color palette. Where top 4-bits represent index of background, and bottom 4-bits represent foreground color from standard VGA text palette (ANSI
* escape codes).
* @param _small
*/
public static void bgfx_dbg_text_clear(@NativeType("uint8_t") int _attr, @NativeType("bool") boolean _small) {
nbgfx_dbg_text_clear((byte)_attr, _small);
}
// --- [ bgfx_dbg_text_printf ] ---
/** Unsafe version of: {@link #bgfx_dbg_text_printf dbg_text_printf} */
public static void nbgfx_dbg_text_printf(short _x, short _y, byte _attr, long _format) {
long __functionAddress = Functions.dbg_text_printf;
invokePV(__functionAddress, _x, _y, _attr, _format);
}
/**
* Prints into internal debug text character-buffer (VGA-compatible text mode).
*
* @param _x x coordinate
* @param _y y coordinate
* @param _attr color palette. Where top 4-bits represent index of background, and bottom 4-bits represent foreground color from standard VGA text palette (ANSI
* escape codes).
* @param _format `printf` style format
*/
public static void bgfx_dbg_text_printf(@NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint8_t") int _attr, @NativeType("const char *") ByteBuffer _format) {
if (CHECKS) {
checkNT1(_format);
}
nbgfx_dbg_text_printf((short)_x, (short)_y, (byte)_attr, memAddress(_format));
}
/**
* Prints into internal debug text character-buffer (VGA-compatible text mode).
*
* @param _x x coordinate
* @param _y y coordinate
* @param _attr color palette. Where top 4-bits represent index of background, and bottom 4-bits represent foreground color from standard VGA text palette (ANSI
* escape codes).
* @param _format `printf` style format
*/
public static void bgfx_dbg_text_printf(@NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint8_t") int _attr, @NativeType("const char *") CharSequence _format) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer _formatEncoded = stack.ASCII(_format);
nbgfx_dbg_text_printf((short)_x, (short)_y, (byte)_attr, memAddress(_formatEncoded));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bgfx_dbg_text_vprintf ] ---
/** Unsafe version of: {@link #bgfx_dbg_text_vprintf dbg_text_vprintf} */
public static void nbgfx_dbg_text_vprintf(short _x, short _y, byte _attr, long _format, long _argList) {
long __functionAddress = Functions.dbg_text_vprintf;
if (CHECKS) {
check(_argList);
}
invokePPV(__functionAddress, _x, _y, _attr, _format, _argList);
}
/**
* Print into internal debug text character-buffer (VGA-compatible text mode).
*
* @param _x x coordinate
* @param _y y coordinate
* @param _attr color palette. Where top 4-bits represent index of background, and bottom 4-bits represent foreground color from standard VGA text palette.
* @param _format `printf` style format
* @param _argList additional arguments for format string
*/
public static void bgfx_dbg_text_vprintf(@NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint8_t") int _attr, @NativeType("const char *") ByteBuffer _format, @NativeType("va_list *") long _argList) {
if (CHECKS) {
checkNT1(_format);
}
nbgfx_dbg_text_vprintf((short)_x, (short)_y, (byte)_attr, memAddress(_format), _argList);
}
/**
* Print into internal debug text character-buffer (VGA-compatible text mode).
*
* @param _x x coordinate
* @param _y y coordinate
* @param _attr color palette. Where top 4-bits represent index of background, and bottom 4-bits represent foreground color from standard VGA text palette.
* @param _format `printf` style format
* @param _argList additional arguments for format string
*/
public static void bgfx_dbg_text_vprintf(@NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint8_t") int _attr, @NativeType("const char *") CharSequence _format, @NativeType("va_list *") long _argList) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer _formatEncoded = stack.ASCII(_format);
nbgfx_dbg_text_vprintf((short)_x, (short)_y, (byte)_attr, memAddress(_formatEncoded), _argList);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bgfx_dbg_text_image ] ---
/** Unsafe version of: {@link #bgfx_dbg_text_image dbg_text_image} */
public static void nbgfx_dbg_text_image(short _x, short _y, short _width, short _height, long _data, short _pitch) {
long __functionAddress = Functions.dbg_text_image;
invokePV(__functionAddress, _x, _y, _width, _height, _data, _pitch);
}
/**
* Draws image into internal debug text buffer.
*
* @param _x x coordinate
* @param _y y coordinate
* @param _width image width
* @param _height image height
* @param _data raw image data (character/attribute raw encoding)
* @param _pitch image pitch in bytes
*/
public static void bgfx_dbg_text_image(@NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height, @NativeType("const void *") ByteBuffer _data, @NativeType("uint16_t") int _pitch) {
if (CHECKS) {
check(_data, _height * _pitch);
}
nbgfx_dbg_text_image((short)_x, (short)_y, (short)_width, (short)_height, memAddress(_data), (short)_pitch);
}
// --- [ bgfx_create_index_buffer ] ---
/** Unsafe version of: {@link #bgfx_create_index_buffer create_index_buffer} */
public static short nbgfx_create_index_buffer(long _mem, short _flags) {
long __functionAddress = Functions.create_index_buffer;
if (CHECKS) {
BGFXMemory.validate(_mem);
}
return invokePS(__functionAddress, _mem, _flags);
}
/**
* Creates static index buffer.
*
* @param _mem index buffer data
* @param _flags buffer creation flags. One or more of:
*/
@NativeType("bgfx_dynamic_index_buffer_handle_t")
public static short bgfx_create_dynamic_index_buffer(@NativeType("uint32_t") int _num, @NativeType("uint16_t") int _flags) {
return nbgfx_create_dynamic_index_buffer(_num, (short)_flags);
}
// --- [ bgfx_create_dynamic_index_buffer_mem ] ---
/** Unsafe version of: {@link #bgfx_create_dynamic_index_buffer_mem create_dynamic_index_buffer_mem} */
public static short nbgfx_create_dynamic_index_buffer_mem(long _mem, short _flags) {
long __functionAddress = Functions.create_dynamic_index_buffer_mem;
if (CHECKS) {
BGFXMemory.validate(_mem);
}
return invokePS(__functionAddress, _mem, _flags);
}
/**
* Creates dynamic index buffer and initializes it.
*
* @param _mem index buffer data
* @param _flags buffer creation flags. One or more of:
*/
@NativeType("bgfx_dynamic_vertex_buffer_handle_t")
public static short bgfx_create_dynamic_vertex_buffer_mem(@NativeType("const bgfx_memory_t *") BGFXMemory _mem, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("uint16_t") int _flags) {
return nbgfx_create_dynamic_vertex_buffer_mem(_mem.address(), _decl.address(), (short)_flags);
}
// --- [ bgfx_update_dynamic_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_update_dynamic_vertex_buffer update_dynamic_vertex_buffer} */
public static void nbgfx_update_dynamic_vertex_buffer(short _handle, int _startVertex, long _mem) {
long __functionAddress = Functions.update_dynamic_vertex_buffer;
if (CHECKS) {
BGFXMemory.validate(_mem);
}
invokePV(__functionAddress, _handle, _startVertex, _mem);
}
/**
* Updates dynamic vertex buffer.
*
* @param _handle dynamic vertex buffer handle
* @param _startVertex start vertex
* @param _mem vertex buffer data
*/
public static void bgfx_update_dynamic_vertex_buffer(@NativeType("bgfx_dynamic_vertex_buffer_handle_t") short _handle, @NativeType("uint32_t") int _startVertex, @NativeType("const bgfx_memory_t *") BGFXMemory _mem) {
nbgfx_update_dynamic_vertex_buffer(_handle, _startVertex, _mem.address());
}
// --- [ bgfx_destroy_dynamic_vertex_buffer ] ---
/**
* Destroys dynamic vertex buffer.
*
* @param _handle the dynamic vertex buffer to destroy
*/
public static void bgfx_destroy_dynamic_vertex_buffer(@NativeType("bgfx_dynamic_vertex_buffer_handle_t") short _handle) {
long __functionAddress = Functions.destroy_dynamic_vertex_buffer;
invokeV(__functionAddress, _handle);
}
// --- [ bgfx_get_avail_transient_index_buffer ] ---
/**
* Returns number of requested or maximum available indices.
*
* @param _num number of required indices
*/
@NativeType("uint32_t")
public static int bgfx_get_avail_transient_index_buffer(@NativeType("uint32_t") int _num) {
long __functionAddress = Functions.get_avail_transient_index_buffer;
return invokeI(__functionAddress, _num);
}
// --- [ bgfx_get_avail_transient_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_get_avail_transient_vertex_buffer get_avail_transient_vertex_buffer} */
public static int nbgfx_get_avail_transient_vertex_buffer(int _num, long _decl) {
long __functionAddress = Functions.get_avail_transient_vertex_buffer;
return invokePI(__functionAddress, _num, _decl);
}
/**
* Returns number of requested or maximum available vertices.
*
* @param _num number of required vertices
* @param _decl vertex declaration
*/
@NativeType("uint32_t")
public static int bgfx_get_avail_transient_vertex_buffer(@NativeType("uint32_t") int _num, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _decl) {
return nbgfx_get_avail_transient_vertex_buffer(_num, _decl.address());
}
// --- [ bgfx_get_avail_instance_data_buffer ] ---
/** Unsafe version of: {@link #bgfx_get_avail_instance_data_buffer get_avail_instance_data_buffer} */
public static int nbgfx_get_avail_instance_data_buffer(int _num, short _stride) {
long __functionAddress = Functions.get_avail_instance_data_buffer;
return invokeI(__functionAddress, _num, _stride);
}
/**
* Returns number of requested or maximum available instance buffer slots.
*
* @param _num number of required instances
* @param _stride stride per instance
*/
@NativeType("uint32_t")
public static int bgfx_get_avail_instance_data_buffer(@NativeType("uint32_t") int _num, @NativeType("uint16_t") int _stride) {
return nbgfx_get_avail_instance_data_buffer(_num, (short)_stride);
}
// --- [ bgfx_alloc_transient_index_buffer ] ---
/** Unsafe version of: {@link #bgfx_alloc_transient_index_buffer alloc_transient_index_buffer} */
public static void nbgfx_alloc_transient_index_buffer(long _tib, int _num) {
long __functionAddress = Functions.alloc_transient_index_buffer;
invokePV(__functionAddress, _tib, _num);
}
/**
* Allocates transient index buffer.
*
*
Only 16-bit index buffer is supported.
*
* @param _tib {@link BGFXTransientIndexBuffer} structure is filled and is valid for the duration of frame, and it can be reused for multiple draw calls
* @param _num number of indices to allocate
*/
public static void bgfx_alloc_transient_index_buffer(@NativeType("bgfx_transient_index_buffer_t *") BGFXTransientIndexBuffer _tib, @NativeType("uint32_t") int _num) {
nbgfx_alloc_transient_index_buffer(_tib.address(), _num);
}
// --- [ bgfx_alloc_transient_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_alloc_transient_vertex_buffer alloc_transient_vertex_buffer} */
public static void nbgfx_alloc_transient_vertex_buffer(long _tvb, int _num, long _decl) {
long __functionAddress = Functions.alloc_transient_vertex_buffer;
invokePPV(__functionAddress, _tvb, _num, _decl);
}
/**
* Allocates transient vertex buffer.
*
* @param _tvb {@link BGFXTransientVertexBuffer} structure is filled and is valid for the duration of frame, and it can be reused for multiple draw calls
* @param _num number of vertices to allocate
* @param _decl vertex declaration
*/
public static void bgfx_alloc_transient_vertex_buffer(@NativeType("bgfx_transient_vertex_buffer_t *") BGFXTransientVertexBuffer _tvb, @NativeType("uint32_t") int _num, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _decl) {
nbgfx_alloc_transient_vertex_buffer(_tvb.address(), _num, _decl.address());
}
// --- [ bgfx_alloc_transient_buffers ] ---
/** Unsafe version of: {@link #bgfx_alloc_transient_buffers alloc_transient_buffers} */
public static boolean nbgfx_alloc_transient_buffers(long _tvb, long _decl, int _numVertices, long _tib, int _numIndices) {
long __functionAddress = Functions.alloc_transient_buffers;
return invokePPPZ(__functionAddress, _tvb, _decl, _numVertices, _tib, _numIndices);
}
/**
* Checks for required space and allocates transient vertex and index buffers. If both space requirements are satisfied function returns true.
*
*
Only 16-bit index buffer is supported.
*
* @param _tvb {@link BGFXTransientVertexBuffer} structure is filled and is valid for the duration of frame, and it can be reused for multiple draw calls
* @param _decl vertex declaration
* @param _numVertices number of vertices to allocate
* @param _tib {@link BGFXTransientIndexBuffer} structure is filled and is valid for the duration of frame, and it can be reused for multiple draw calls
* @param _numIndices number of indices to allocate
*/
@NativeType("bool")
public static boolean bgfx_alloc_transient_buffers(@NativeType("bgfx_transient_vertex_buffer_t *") BGFXTransientVertexBuffer _tvb, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("uint32_t") int _numVertices, @NativeType("bgfx_transient_index_buffer_t *") BGFXTransientIndexBuffer _tib, @NativeType("uint32_t") int _numIndices) {
return nbgfx_alloc_transient_buffers(_tvb.address(), _decl.address(), _numVertices, _tib.address(), _numIndices);
}
// --- [ bgfx_alloc_instance_data_buffer ] ---
/** Unsafe version of: {@link #bgfx_alloc_instance_data_buffer alloc_instance_data_buffer} */
public static void nbgfx_alloc_instance_data_buffer(long _idb, int _num, short _stride) {
long __functionAddress = Functions.alloc_instance_data_buffer;
invokePV(__functionAddress, _idb, _num, _stride);
}
/**
* Allocates instance data buffer.
*
* @param _idb {@link BGFXInstanceDataBuffer} structure is filled and is valid for duration of frame, and it can be reused for multiple draw calls
* @param _num number of instances
* @param _stride instance stride. Must be multiple of 16
*/
public static void bgfx_alloc_instance_data_buffer(@NativeType("bgfx_instance_data_buffer_t *") BGFXInstanceDataBuffer _idb, @NativeType("uint32_t") int _num, @NativeType("uint16_t") int _stride) {
nbgfx_alloc_instance_data_buffer(_idb.address(), _num, (short)_stride);
}
// --- [ bgfx_create_indirect_buffer ] ---
/**
* Creates draw indirect buffer.
*
* @param _num number of indirect calls
*/
@NativeType("bgfx_indirect_buffer_handle_t")
public static short bgfx_create_indirect_buffer(@NativeType("uint32_t") int _num) {
long __functionAddress = Functions.create_indirect_buffer;
return invokeS(__functionAddress, _num);
}
// --- [ bgfx_destroy_indirect_buffer ] ---
/**
* Destroys draw indirect buffer.
*
* @param _handle the draw indirect buffer to destroy
*/
public static void bgfx_destroy_indirect_buffer(@NativeType("bgfx_indirect_buffer_handle_t") short _handle) {
long __functionAddress = Functions.destroy_indirect_buffer;
invokeV(__functionAddress, _handle);
}
// --- [ bgfx_create_shader ] ---
/** Unsafe version of: {@link #bgfx_create_shader create_shader} */
public static short nbgfx_create_shader(long _mem) {
long __functionAddress = Functions.create_shader;
if (CHECKS) {
BGFXMemory.validate(_mem);
}
return invokePS(__functionAddress, _mem);
}
/**
* Creates shader from memory buffer.
*
* @param _mem
*/
@NativeType("bgfx_shader_handle_t")
public static short bgfx_create_shader(@NativeType("const bgfx_memory_t *") BGFXMemory _mem) {
return nbgfx_create_shader(_mem.address());
}
// --- [ bgfx_get_shader_uniforms ] ---
/**
* Unsafe version of: {@link #bgfx_get_shader_uniforms get_shader_uniforms}
*
* @param _max maximum capacity of {@code _uniforms}
*/
public static short nbgfx_get_shader_uniforms(short _handle, long _uniforms, short _max) {
long __functionAddress = Functions.get_shader_uniforms;
return invokePS(__functionAddress, _handle, _uniforms, _max);
}
/**
* Returns the number of uniforms and uniform handles used inside shader.
*
*
Only non-predefined uniforms are returned.
*
* @param _handle shader handle
* @param _uniforms {@code bgfx_uniform_handle_t} array where data will be stored
*
* @return number of uniforms used by shader
*/
@NativeType("uint16_t")
public static short bgfx_get_shader_uniforms(@NativeType("bgfx_shader_handle_t") short _handle, @NativeType("bgfx_uniform_handle_t *") ShortBuffer _uniforms) {
return nbgfx_get_shader_uniforms(_handle, memAddress(_uniforms), (short)_uniforms.remaining());
}
// --- [ bgfx_set_shader_name ] ---
/** Unsafe version of: {@link #bgfx_set_shader_name set_shader_name} */
public static void nbgfx_set_shader_name(short _handle, long _name) {
long __functionAddress = Functions.set_shader_name;
invokePV(__functionAddress, _handle, _name);
}
/**
* Sets shader debug name.
*
* @param _handle shader handle
* @param _name shader name
*/
public static void bgfx_set_shader_name(@NativeType("bgfx_shader_handle_t") short _handle, @NativeType("const char *") ByteBuffer _name) {
if (CHECKS) {
checkNT1(_name);
}
nbgfx_set_shader_name(_handle, memAddress(_name));
}
/**
* Sets shader debug name.
*
* @param _handle shader handle
* @param _name shader name
*/
public static void bgfx_set_shader_name(@NativeType("bgfx_shader_handle_t") short _handle, @NativeType("const char *") CharSequence _name) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer _nameEncoded = stack.UTF8(_name);
nbgfx_set_shader_name(_handle, memAddress(_nameEncoded));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bgfx_destroy_shader ] ---
/**
* Destroys shader. Once a shader program is created with {@code _handle}, it is safe to destroy that shader.
*
* @param _handle the shader to destroy
*/
public static void bgfx_destroy_shader(@NativeType("bgfx_shader_handle_t") short _handle) {
long __functionAddress = Functions.destroy_shader;
invokeV(__functionAddress, _handle);
}
// --- [ bgfx_create_program ] ---
/**
* Creates program with vertex and fragment shaders.
*
* @param _vsh vertex shader
* @param _fsh fragment shader
* @param _destroyShaders if true, shaders will be destroyed when program is destroyed
*
* @return program handle if vertex shader output and fragment shader input are matching, otherwise returns invalid program handle.
*/
@NativeType("bgfx_program_handle_t")
public static short bgfx_create_program(@NativeType("bgfx_shader_handle_t") short _vsh, @NativeType("bgfx_shader_handle_t") short _fsh, @NativeType("bool") boolean _destroyShaders) {
long __functionAddress = Functions.create_program;
return invokeS(__functionAddress, _vsh, _fsh, _destroyShaders);
}
// --- [ bgfx_create_compute_program ] ---
/**
* Creates program with compute shader.
*
* @param _csh compute shader
* @param _destroyShaders if true, shader will be destroyed when program is destroyed
*/
@NativeType("bgfx_program_handle_t")
public static short bgfx_create_compute_program(@NativeType("bgfx_shader_handle_t") short _csh, @NativeType("bool") boolean _destroyShaders) {
long __functionAddress = Functions.create_compute_program;
return invokeS(__functionAddress, _csh, _destroyShaders);
}
// --- [ bgfx_destroy_program ] ---
/**
* Destroy program.
*
* @param _handle the program to destroy
*/
public static void bgfx_destroy_program(@NativeType("bgfx_program_handle_t") short _handle) {
long __functionAddress = Functions.destroy_program;
invokeV(__functionAddress, _handle);
}
// --- [ bgfx_is_texture_valid ] ---
/** Unsafe version of: {@link #bgfx_is_texture_valid is_texture_valid} */
public static boolean nbgfx_is_texture_valid(short _depth, boolean _cubeMap, short _numLayers, int _format, int _flags) {
long __functionAddress = Functions.is_texture_valid;
return invokeZ(__functionAddress, _depth, _cubeMap, _numLayers, _format, _flags);
}
/**
* Validate texture parameters.
*
* @param _depth depth dimension of volume texture
* @param _cubeMap indicates that texture contains cubemap
* @param _numLayers number of layers in texture array
* @param _format texture format. One of:
* @param _skip skip top level mips when parsing texture
* @param _info when non-{@code NULL} is specified it returns parsed texture information
*/
@NativeType("bgfx_texture_handle_t")
public static short bgfx_create_texture(@NativeType("const bgfx_memory_t *") BGFXMemory _mem, @NativeType("uint32_t") int _flags, @NativeType("uint8_t") int _skip, @Nullable @NativeType("bgfx_texture_info_t *") BGFXTextureInfo _info) {
return nbgfx_create_texture(_mem.address(), _flags, (byte)_skip, memAddressSafe(_info));
}
// --- [ bgfx_create_texture_2d ] ---
/** Unsafe version of: {@link #bgfx_create_texture_2d create_texture_2d} */
public static short nbgfx_create_texture_2d(short _width, short _height, boolean _hasMips, short _numLayers, int _format, int _flags, long _mem) {
long __functionAddress = Functions.create_texture_2d;
if (CHECKS) {
if (_mem != NULL) { BGFXMemory.validate(_mem); }
}
return invokePS(__functionAddress, _width, _height, _hasMips, _numLayers, _format, _flags, _mem);
}
/**
* Creates 2D texture.
*
* @param _width width
* @param _height height
* @param _hasMips indicates that texture contains full mip-map chain
* @param _numLayers number of layers in texture array. Must be 1 if caps {@link #BGFX_CAPS_TEXTURE_2D_ARRAY CAPS_TEXTURE_2D_ARRAY} flag is not set.
* @param _format texture format. One of:
* @param _mem texture data. If {@code _mem} is non-{@code NULL}, created texture will be immutable. When {@code _numLayers} is more than 1, expected memory layout is
* texture and all mips together for each array element.
*/
@NativeType("bgfx_texture_handle_t")
public static short bgfx_create_texture_2d(@NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height, @NativeType("bool") boolean _hasMips, @NativeType("uint16_t") int _numLayers, @NativeType("bgfx_texture_format_t") int _format, @NativeType("uint32_t") int _flags, @Nullable @NativeType("const bgfx_memory_t *") BGFXMemory _mem) {
return nbgfx_create_texture_2d((short)_width, (short)_height, _hasMips, (short)_numLayers, _format, _flags, memAddressSafe(_mem));
}
// --- [ bgfx_create_texture_2d_scaled ] ---
/** Unsafe version of: {@link #bgfx_create_texture_2d_scaled create_texture_2d_scaled} */
public static short nbgfx_create_texture_2d_scaled(int _ratio, boolean _hasMips, short _numLayers, int _format, int _flags) {
long __functionAddress = Functions.create_texture_2d_scaled;
return invokeS(__functionAddress, _ratio, _hasMips, _numLayers, _format, _flags);
}
/**
* Creates frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio if back buffer resolution changes.
*
* @param _ratio frame buffer size in respect to back-buffer size. One of:
* @param _hasMips indicates that texture contains full mip-map chain
* @param _numLayers number of layers in texture array. Must be 1 if caps {@link #BGFX_CAPS_TEXTURE_2D_ARRAY CAPS_TEXTURE_2D_ARRAY} flag is not set.
* @param _format texture format. One of:
* @param _mem texture data. If {@code _mem} is non-{@code NULL}, created texture will be immutable.
*/
@NativeType("bgfx_texture_handle_t")
public static short bgfx_create_texture_3d(@NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height, @NativeType("uint16_t") int _depth, @NativeType("bool") boolean _hasMips, @NativeType("bgfx_texture_format_t") int _format, @NativeType("uint32_t") int _flags, @Nullable @NativeType("const bgfx_memory_t *") BGFXMemory _mem) {
return nbgfx_create_texture_3d((short)_width, (short)_height, (short)_depth, _hasMips, _format, _flags, memAddressSafe(_mem));
}
// --- [ bgfx_create_texture_cube ] ---
/** Unsafe version of: {@link #bgfx_create_texture_cube create_texture_cube} */
public static short nbgfx_create_texture_cube(short _size, boolean _hasMips, short _numLayers, int _format, int _flags, long _mem) {
long __functionAddress = Functions.create_texture_cube;
if (CHECKS) {
if (_mem != NULL) { BGFXMemory.validate(_mem); }
}
return invokePS(__functionAddress, _size, _hasMips, _numLayers, _format, _flags, _mem);
}
/**
* Creates Cube texture.
*
* @param _size cube side size
* @param _hasMips indicates that texture contains full mip-map chain
* @param _numLayers number of layers in texture array. Must be 1 if caps {@link #BGFX_CAPS_TEXTURE_CUBE_ARRAY CAPS_TEXTURE_CUBE_ARRAY} flag is not set.
* @param _format one of:
* @param _mem texture data. If {@code _mem} is non-{@code NULL}, created texture will be immutable. When {@code _numLayers} is more than 1, expected memory layout is
* cubemap texture and all mips together for each array element.
*/
@NativeType("bgfx_texture_handle_t")
public static short bgfx_create_texture_cube(@NativeType("uint16_t") int _size, @NativeType("bool") boolean _hasMips, @NativeType("uint16_t") int _numLayers, @NativeType("bgfx_texture_format_t") int _format, @NativeType("uint32_t") int _flags, @Nullable @NativeType("const bgfx_memory_t *") BGFXMemory _mem) {
return nbgfx_create_texture_cube((short)_size, _hasMips, (short)_numLayers, _format, _flags, memAddressSafe(_mem));
}
// --- [ bgfx_update_texture_2d ] ---
/** Unsafe version of: {@link #bgfx_update_texture_2d update_texture_2d} */
public static void nbgfx_update_texture_2d(short _handle, short _layer, byte _mip, short _x, short _y, short _width, short _height, long _mem, short _pitch) {
long __functionAddress = Functions.update_texture_2d;
if (CHECKS) {
BGFXMemory.validate(_mem);
}
invokePV(__functionAddress, _handle, _layer, _mip, _x, _y, _width, _height, _mem, _pitch);
}
/**
* Updates 2D texture.
*
* @param _handle texture handle
* @param _layer layers in texture array
* @param _mip mip level
* @param _x x offset in texture
* @param _y y offset in texture
* @param _width width of texture block
* @param _height height of texture block
* @param _mem texture update data
* @param _pitch pitch of input image (bytes). When {@code _pitch} is set to {@code UINT16_MAX}, it will be calculated internally based on {@code _width}.
*/
public static void bgfx_update_texture_2d(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("uint16_t") int _layer, @NativeType("uint8_t") int _mip, @NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height, @NativeType("const bgfx_memory_t *") BGFXMemory _mem, @NativeType("uint16_t") int _pitch) {
nbgfx_update_texture_2d(_handle, (short)_layer, (byte)_mip, (short)_x, (short)_y, (short)_width, (short)_height, _mem.address(), (short)_pitch);
}
// --- [ bgfx_update_texture_3d ] ---
/** Unsafe version of: {@link #bgfx_update_texture_3d update_texture_3d} */
public static void nbgfx_update_texture_3d(short _handle, byte _mip, short _x, short _y, short _z, short _width, short _height, short _depth, long _mem) {
long __functionAddress = Functions.update_texture_3d;
if (CHECKS) {
BGFXMemory.validate(_mem);
}
invokePV(__functionAddress, _handle, _mip, _x, _y, _z, _width, _height, _depth, _mem);
}
/**
* Updates 3D texture.
*
* @param _handle texture handle
* @param _mip mip level
* @param _x x offset in texture
* @param _y y offset in texture
* @param _z z offset in texture
* @param _width width of texture block
* @param _height height of texture block
* @param _depth depth of texture block
* @param _mem texture update data
*/
public static void bgfx_update_texture_3d(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("uint8_t") int _mip, @NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint16_t") int _z, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height, @NativeType("uint16_t") int _depth, @NativeType("const bgfx_memory_t *") BGFXMemory _mem) {
nbgfx_update_texture_3d(_handle, (byte)_mip, (short)_x, (short)_y, (short)_z, (short)_width, (short)_height, (short)_depth, _mem.address());
}
// --- [ bgfx_update_texture_cube ] ---
/** Unsafe version of: {@link #bgfx_update_texture_cube update_texture_cube} */
public static void nbgfx_update_texture_cube(short _handle, short _layer, byte _side, byte _mip, short _x, short _y, short _width, short _height, long _mem, short _pitch) {
long __functionAddress = Functions.update_texture_cube;
if (CHECKS) {
BGFXMemory.validate(_mem);
}
invokePV(__functionAddress, _handle, _layer, _side, _mip, _x, _y, _width, _height, _mem, _pitch);
}
/**
* Updates Cube texture.
*
*
Cubemap sides: 0 is +X, 1 is -X, 2 is +Y, 3 is -Y, 4 is +Z, and 5 is -Z.
* @param _mip mip level
* @param _x x offset in texture
* @param _y y offset in texture
* @param _width width of texture block
* @param _height height of texture block
* @param _mem texture update data
* @param _pitch pitch of input image (bytes). When {@code _pitch} is set to {@code UINT16_MAX}, it will be calculated internally based on {@code _width}.
*/
public static void bgfx_update_texture_cube(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("uint16_t") int _layer, @NativeType("uint8_t") byte _side, @NativeType("uint8_t") int _mip, @NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height, @NativeType("const bgfx_memory_t *") BGFXMemory _mem, @NativeType("uint16_t") int _pitch) {
nbgfx_update_texture_cube(_handle, (short)_layer, _side, (byte)_mip, (short)_x, (short)_y, (short)_width, (short)_height, _mem.address(), (short)_pitch);
}
// --- [ bgfx_read_texture ] ---
/** Unsafe version of: {@link #bgfx_read_texture read_texture} */
public static int nbgfx_read_texture(short _handle, long _data, byte _mip) {
long __functionAddress = Functions.read_texture;
return invokePI(__functionAddress, _handle, _data, _mip);
}
/**
* Reads back texture content.
*
*
Texture must be created with {@link #BGFX_TEXTURE_READ_BACK TEXTURE_READ_BACK} flag. Availability depends on {@link #BGFX_CAPS_TEXTURE_READ_BACK CAPS_TEXTURE_READ_BACK}.
*
* @param _handle texture handle
* @param _data destination buffer
* @param _mip mip level
*
* @return frame number when the result will be available
*/
@NativeType("uint32_t")
public static int bgfx_read_texture(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("void *") ByteBuffer _data, @NativeType("uint8_t") int _mip) {
return nbgfx_read_texture(_handle, memAddress(_data), (byte)_mip);
}
/**
* Reads back texture content.
*
*
Texture must be created with {@link #BGFX_TEXTURE_READ_BACK TEXTURE_READ_BACK} flag. Availability depends on {@link #BGFX_CAPS_TEXTURE_READ_BACK CAPS_TEXTURE_READ_BACK}.
*
* @param _handle texture handle
* @param _data destination buffer
* @param _mip mip level
*
* @return frame number when the result will be available
*/
@NativeType("uint32_t")
public static int bgfx_read_texture(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("void *") ShortBuffer _data, @NativeType("uint8_t") int _mip) {
return nbgfx_read_texture(_handle, memAddress(_data), (byte)_mip);
}
/**
* Reads back texture content.
*
*
Texture must be created with {@link #BGFX_TEXTURE_READ_BACK TEXTURE_READ_BACK} flag. Availability depends on {@link #BGFX_CAPS_TEXTURE_READ_BACK CAPS_TEXTURE_READ_BACK}.
*
* @param _handle texture handle
* @param _data destination buffer
* @param _mip mip level
*
* @return frame number when the result will be available
*/
@NativeType("uint32_t")
public static int bgfx_read_texture(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("void *") IntBuffer _data, @NativeType("uint8_t") int _mip) {
return nbgfx_read_texture(_handle, memAddress(_data), (byte)_mip);
}
/**
* Reads back texture content.
*
*
Texture must be created with {@link #BGFX_TEXTURE_READ_BACK TEXTURE_READ_BACK} flag. Availability depends on {@link #BGFX_CAPS_TEXTURE_READ_BACK CAPS_TEXTURE_READ_BACK}.
*
* @param _handle texture handle
* @param _data destination buffer
* @param _mip mip level
*
* @return frame number when the result will be available
*/
@NativeType("uint32_t")
public static int bgfx_read_texture(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("void *") FloatBuffer _data, @NativeType("uint8_t") int _mip) {
return nbgfx_read_texture(_handle, memAddress(_data), (byte)_mip);
}
// --- [ bgfx_set_texture_name ] ---
/** Unsafe version of: {@link #bgfx_set_texture_name set_texture_name} */
public static void nbgfx_set_texture_name(short _handle, long _name) {
long __functionAddress = Functions.set_texture_name;
invokePV(__functionAddress, _handle, _name);
}
/**
* Sets texture debug name.
*
* @param _handle texture handle
* @param _name texture name
*/
public static void bgfx_set_texture_name(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("const char *") ByteBuffer _name) {
if (CHECKS) {
checkNT1(_name);
}
nbgfx_set_texture_name(_handle, memAddress(_name));
}
/**
* Sets texture debug name.
*
* @param _handle texture handle
* @param _name texture name
*/
public static void bgfx_set_texture_name(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("const char *") CharSequence _name) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer _nameEncoded = stack.UTF8(_name);
nbgfx_set_texture_name(_handle, memAddress(_nameEncoded));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bgfx_get_direct_access_ptr ] ---
/**
* Returns texture direct access pointer.
*
*
Returns pointer to texture memory. If returned pointer is {@code NULL} direct access is not available for this texture. If pointer is {@code UINTPTR_MAX}
* sentinel value it means texture is pending creation. Pointer returned can be cached and it will be valid until texture is destroyed.
*
*
Note
*
*
Availability depends on: {@link #BGFX_CAPS_TEXTURE_DIRECT_ACCESS CAPS_TEXTURE_DIRECT_ACCESS}. This feature is available on GPUs that have unified memory architecture (UMA) support.
*
* @param _handle
*/
@NativeType("void *")
public static long bgfx_get_direct_access_ptr(@NativeType("bgfx_texture_handle_t") short _handle) {
long __functionAddress = Functions.get_direct_access_ptr;
return invokeP(__functionAddress, _handle);
}
// --- [ bgfx_destroy_texture ] ---
/**
* Destroys texture.
*
* @param _handle texture handle
*/
public static void bgfx_destroy_texture(@NativeType("bgfx_texture_handle_t") short _handle) {
long __functionAddress = Functions.destroy_texture;
invokeV(__functionAddress, _handle);
}
// --- [ bgfx_create_frame_buffer ] ---
/** Unsafe version of: {@link #bgfx_create_frame_buffer create_frame_buffer} */
public static short nbgfx_create_frame_buffer(short _width, short _height, int _format, int _textureFlags) {
long __functionAddress = Functions.create_frame_buffer;
return invokeS(__functionAddress, _width, _height, _format, _textureFlags);
}
/**
* Creates frame buffer (simple).
*
* @param _width texture width
* @param _height texture height
* @param _format texture format. One of:
*
* @return handle to frame buffer object
*/
@NativeType("bgfx_frame_buffer_handle_t")
public static short bgfx_create_frame_buffer(@NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height, @NativeType("bgfx_texture_format_t") int _format, @NativeType("uint32_t") int _textureFlags) {
return nbgfx_create_frame_buffer((short)_width, (short)_height, _format, _textureFlags);
}
// --- [ bgfx_create_frame_buffer_scaled ] ---
/**
* Creates frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio if back buffer resolution changes.
*
* @param _ratio frame buffer size in respect to back-buffer size. One of:
*
* @return handle to frame buffer object
*/
@NativeType("bgfx_frame_buffer_handle_t")
public static short bgfx_create_frame_buffer_from_nwh(@NativeType("void *") long _nwh, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height, @NativeType("bgfx_texture_format_t") int _depthFormat) {
return nbgfx_create_frame_buffer_from_nwh(_nwh, (short)_width, (short)_height, _depthFormat);
}
// --- [ bgfx_get_texture ] ---
/** Unsafe version of: {@link #bgfx_get_texture get_texture} */
public static short nbgfx_get_texture(short _handle, byte _attachment) {
long __functionAddress = Functions.get_texture;
return invokeS(__functionAddress, _handle, _attachment);
}
/**
* Obtains texture handle of frame buffer attachment.
*
* @param _handle frame buffer handle
* @param _attachment frame buffer attachment index
*
* @return invalid texture handle if attachment index is not correct, or frame buffer is created with native window handle
*/
@NativeType("bgfx_texture_handle_t")
public static short bgfx_get_texture(@NativeType("bgfx_frame_buffer_handle_t") short _handle, @NativeType("uint8_t") int _attachment) {
return nbgfx_get_texture(_handle, (byte)_attachment);
}
// --- [ bgfx_destroy_frame_buffer ] ---
/**
* Destroys frame buffer.
*
* @param _handle the frame buffer to destroy
*/
public static void bgfx_destroy_frame_buffer(@NativeType("bgfx_frame_buffer_handle_t") short _handle) {
long __functionAddress = Functions.destroy_frame_buffer;
invokeV(__functionAddress, _handle);
}
// --- [ bgfx_create_uniform ] ---
/** Unsafe version of: {@link #bgfx_create_uniform create_uniform} */
public static short nbgfx_create_uniform(long _name, int _type, short _num) {
long __functionAddress = Functions.create_uniform;
return invokePS(__functionAddress, _name, _type, _num);
}
/**
* Creates shader uniform parameter.
*
*
Uniform names are unique. It's valid to call {@code bgfx_create_uniform} multiple times with the same uniform name. The library will always return the
* same handle, but the handle reference count will be incremented. This means that the same number of {@link #bgfx_destroy_uniform destroy_uniform} must be called to properly
* destroy the uniform.
*
*
Predefined uniforms (declared in `bgfx_shader.sh`):
*
*
*
{@code u_viewRect vec4(x, y, width, height)} - view rectangle for current view, in pixels.
{@code u_model mat4[BGFX_CONFIG_MAX_BONES]} - array of model matrices.
*
{@code u_modelView mat4} - concatenated model view matrix, only first model matrix from array is used.
*
{@code u_modelViewProj mat4} - concatenated model view projection matrix.
*
{@code u_alphaRef float} - alpha reference value for alpha test.
*
*
* @param _name uniform name in shader
* @param _type type of uniform. One of:
{@link #BGFX_UNIFORM_TYPE_INT1 UNIFORM_TYPE_INT1}
{@link #BGFX_UNIFORM_TYPE_END UNIFORM_TYPE_END}
{@link #BGFX_UNIFORM_TYPE_VEC4 UNIFORM_TYPE_VEC4}
{@link #BGFX_UNIFORM_TYPE_MAT3 UNIFORM_TYPE_MAT3}
{@link #BGFX_UNIFORM_TYPE_MAT4 UNIFORM_TYPE_MAT4}
* @param _num number of elements in array
*
* @return handle to uniform object
*/
@NativeType("bgfx_uniform_handle_t")
public static short bgfx_create_uniform(@NativeType("const char *") ByteBuffer _name, @NativeType("bgfx_uniform_type_t") int _type, @NativeType("uint16_t") int _num) {
if (CHECKS) {
checkNT1(_name);
}
return nbgfx_create_uniform(memAddress(_name), _type, (short)_num);
}
/**
* Creates shader uniform parameter.
*
*
Uniform names are unique. It's valid to call {@code bgfx_create_uniform} multiple times with the same uniform name. The library will always return the
* same handle, but the handle reference count will be incremented. This means that the same number of {@link #bgfx_destroy_uniform destroy_uniform} must be called to properly
* destroy the uniform.
*
*
Predefined uniforms (declared in `bgfx_shader.sh`):
*
*
*
{@code u_viewRect vec4(x, y, width, height)} - view rectangle for current view, in pixels.
*
* @param _id view id
* @param _name view name
*/
public static void bgfx_set_view_name(@NativeType("bgfx_view_id_t") int _id, @NativeType("const char *") CharSequence _name) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer _nameEncoded = stack.ASCII(_name);
nbgfx_set_view_name((short)_id, memAddress(_nameEncoded));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bgfx_set_view_rect ] ---
/** Unsafe version of: {@link #bgfx_set_view_rect set_view_rect} */
public static void nbgfx_set_view_rect(short _id, short _x, short _y, short _width, short _height) {
long __functionAddress = Functions.set_view_rect;
invokeV(__functionAddress, _id, _x, _y, _width, _height);
}
/**
* Sets view rectangle. Draw primitive outside view will be clipped.
*
* @param _id view id
* @param _x position x from the left corner of the window
* @param _y position y from the top corner of the window
* @param _width width of view port region
* @param _height height of view port region
*/
public static void bgfx_set_view_rect(@NativeType("bgfx_view_id_t") int _id, @NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height) {
nbgfx_set_view_rect((short)_id, (short)_x, (short)_y, (short)_width, (short)_height);
}
// --- [ bgfx_set_view_rect_auto ] ---
/** Unsafe version of: {@link #bgfx_set_view_rect_auto set_view_rect_auto} */
public static void nbgfx_set_view_rect_auto(short _id, short _x, short _y, int _ratio) {
long __functionAddress = Functions.set_view_rect_auto;
invokeV(__functionAddress, _id, _x, _y, _ratio);
}
/**
* Sets view rectangle. Draw primitive outside view will be clipped.
*
* @param _id view id
* @param _x position x from the left corner of the window
* @param _y position y from the top corner of the window
* @param _ratio width and height will be set in respect to back-buffer size. One of:
*/
public static void bgfx_set_view_rect_auto(@NativeType("bgfx_view_id_t") int _id, @NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("bgfx_backbuffer_ratio_t") int _ratio) {
nbgfx_set_view_rect_auto((short)_id, (short)_x, (short)_y, _ratio);
}
// --- [ bgfx_set_view_scissor ] ---
/** Unsafe version of: {@link #bgfx_set_view_scissor set_view_scissor} */
public static void nbgfx_set_view_scissor(short _id, short _x, short _y, short _width, short _height) {
long __functionAddress = Functions.set_view_scissor;
invokeV(__functionAddress, _id, _x, _y, _width, _height);
}
/**
* Sets view scissor. Draw primitive outside view will be clipped. When {@code _x}, {@code _y}, {@code _width} and {@code _height} are set to 0, scissor
* will be disabled.
*
* @param _id view id
* @param _x position x from the left corner of the window
* @param _y position y from the top corner of the window
* @param _width width of scissor region
* @param _height height of scissor region
*/
public static void bgfx_set_view_scissor(@NativeType("bgfx_view_id_t") int _id, @NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height) {
nbgfx_set_view_scissor((short)_id, (short)_x, (short)_y, (short)_width, (short)_height);
}
// --- [ bgfx_set_view_clear ] ---
/** Unsafe version of: {@link #bgfx_set_view_clear set_view_clear} */
public static void nbgfx_set_view_clear(short _id, short _flags, int _rgba, float _depth, byte _stencil) {
long __functionAddress = Functions.set_view_clear;
invokeV(__functionAddress, _id, _flags, _rgba, _depth, _stencil);
}
/**
* Sets view clear flags.
*
* @param _id view id
* @param _flags clear flags. Use {@link #BGFX_CLEAR_NONE CLEAR_NONE} to remove any clear operation. One or more of:
* @param _bstencil back stencil state. If back is set to {@link #BGFX_STENCIL_NONE STENCIL_NONE} {@code _fstencil} is applied to both front and back facing primitives. One or more of:
*/
public static void bgfx_set_stencil(@NativeType("uint32_t") int _fstencil, @NativeType("uint32_t") int _bstencil) {
long __functionAddress = Functions.set_stencil;
invokeV(__functionAddress, _fstencil, _bstencil);
}
// --- [ bgfx_set_scissor ] ---
/** Unsafe version of: {@link #bgfx_set_scissor set_scissor} */
public static short nbgfx_set_scissor(short _x, short _y, short _width, short _height) {
long __functionAddress = Functions.set_scissor;
return invokeS(__functionAddress, _x, _y, _width, _height);
}
/**
* Sets scissor for draw primitive. For scissor for all primitives in view see {@link #bgfx_set_view_scissor set_view_scissor}.
*
* @param _x position x from the left corner of the window
* @param _y position y from the top corner of the window
* @param _width width of scissor region
* @param _height height of scissor region
*
* @return scissor cache index
*/
@NativeType("uint16_t")
public static short bgfx_set_scissor(@NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height) {
return nbgfx_set_scissor((short)_x, (short)_y, (short)_width, (short)_height);
}
// --- [ bgfx_set_scissor_cached ] ---
/** Unsafe version of: {@link #bgfx_set_scissor_cached set_scissor_cached} */
public static void nbgfx_set_scissor_cached(short _cache) {
long __functionAddress = Functions.set_scissor_cached;
invokeV(__functionAddress, _cache);
}
/**
* Sets scissor from cache for draw primitive.
*
* @param _cache index in scissor cache. Passing {@code UINT16_MAX} unsets primitive scissor and primitive will use view scissor instead.
*/
public static void bgfx_set_scissor_cached(@NativeType("uint16_t") int _cache) {
nbgfx_set_scissor_cached((short)_cache);
}
// --- [ bgfx_set_transform ] ---
/**
* Unsafe version of: {@link #bgfx_set_transform set_transform}
*
* @param _num number of matrices in array
*/
public static int nbgfx_set_transform(long _mtx, short _num) {
long __functionAddress = Functions.set_transform;
return invokePI(__functionAddress, _mtx, _num);
}
/**
* Sets model matrix for draw primitive. If it is not called model will be rendered with identity model matrix.
*
* @param _mtx pointer to first matrix in array
*
* @return index into matrix cache in case the same model matrix has to be used for other draw primitive call
*/
@NativeType("uint32_t")
public static int bgfx_set_transform(@NativeType("const void *") ByteBuffer _mtx) {
return nbgfx_set_transform(memAddress(_mtx), (short)(_mtx.remaining() >> 6));
}
/**
* Sets model matrix for draw primitive. If it is not called model will be rendered with identity model matrix.
*
* @param _mtx pointer to first matrix in array
*
* @return index into matrix cache in case the same model matrix has to be used for other draw primitive call
*/
@NativeType("uint32_t")
public static int bgfx_set_transform(@NativeType("const void *") FloatBuffer _mtx) {
return nbgfx_set_transform(memAddress(_mtx), (short)(_mtx.remaining() >> 4));
}
// --- [ bgfx_alloc_transform ] ---
/** Unsafe version of: {@link #bgfx_alloc_transform alloc_transform} */
public static int nbgfx_alloc_transform(long _transform, short _num) {
long __functionAddress = Functions.alloc_transform;
return invokePI(__functionAddress, _transform, _num);
}
/**
* Reserves {@code _num} matrices in internal matrix cache.
*
*
Pointer returned can be modifed until {@link #bgfx_frame frame} is called.
*
* @param _transform pointer to {@link BGFXTransform} structure
* @param _num number of matrices
*
* @return index into matrix cache
*/
@NativeType("uint32_t")
public static int bgfx_alloc_transform(@NativeType("bgfx_transform_t *") BGFXTransform _transform, @NativeType("uint16_t") int _num) {
return nbgfx_alloc_transform(_transform.address(), (short)_num);
}
// --- [ bgfx_set_transform_cached ] ---
/** Unsafe version of: {@link #bgfx_set_transform_cached set_transform_cached} */
public static void nbgfx_set_transform_cached(int _cache, short _num) {
long __functionAddress = Functions.set_transform_cached;
invokeV(__functionAddress, _cache, _num);
}
/**
* Sets model matrix from matrix cache for draw primitive.
*
* @param _cache index in matrix cache
* @param _num number of matrices from cache
*/
public static void bgfx_set_transform_cached(@NativeType("uint32_t") int _cache, @NativeType("uint16_t") int _num) {
nbgfx_set_transform_cached(_cache, (short)_num);
}
// --- [ bgfx_set_uniform ] ---
/** Unsafe version of: {@link #bgfx_set_uniform set_uniform} */
public static void nbgfx_set_uniform(short _handle, long _value, short _num) {
long __functionAddress = Functions.set_uniform;
invokePV(__functionAddress, _handle, _value, _num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") ByteBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_set_uniform(_handle, memAddress(_value), (short)_num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") ShortBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_set_uniform(_handle, memAddress(_value), (short)_num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") IntBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_set_uniform(_handle, memAddress(_value), (short)_num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") LongBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_set_uniform(_handle, memAddress(_value), (short)_num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") FloatBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_set_uniform(_handle, memAddress(_value), (short)_num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") DoubleBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_set_uniform(_handle, memAddress(_value), (short)_num);
}
// --- [ bgfx_set_index_buffer ] ---
/**
* Sets index buffer for draw primitive.
*
* @param _handle index buffer
* @param _firstIndex first index to render
* @param _numIndices number of indices to render
*/
public static void bgfx_set_index_buffer(@NativeType("bgfx_index_buffer_handle_t") short _handle, @NativeType("uint32_t") int _firstIndex, @NativeType("uint32_t") int _numIndices) {
long __functionAddress = Functions.set_index_buffer;
invokeV(__functionAddress, _handle, _firstIndex, _numIndices);
}
// --- [ bgfx_set_dynamic_index_buffer ] ---
/**
* Sets index buffer for draw primitive.
*
* @param _handle dynamic index buffer
* @param _firstIndex first index to render
* @param _numIndices number of indices to render
*/
public static void bgfx_set_dynamic_index_buffer(@NativeType("bgfx_dynamic_index_buffer_handle_t") short _handle, @NativeType("uint32_t") int _firstIndex, @NativeType("uint32_t") int _numIndices) {
long __functionAddress = Functions.set_dynamic_index_buffer;
invokeV(__functionAddress, _handle, _firstIndex, _numIndices);
}
// --- [ bgfx_set_transient_index_buffer ] ---
/** Unsafe version of: {@link #bgfx_set_transient_index_buffer set_transient_index_buffer} */
public static void nbgfx_set_transient_index_buffer(long _tib, int _firstIndex, int _numIndices) {
long __functionAddress = Functions.set_transient_index_buffer;
if (CHECKS) {
BGFXTransientIndexBuffer.validate(_tib);
}
invokePV(__functionAddress, _tib, _firstIndex, _numIndices);
}
/**
* Sets index buffer for draw primitive.
*
*
Note
*
*
{@code _tib} pointer after this call is invalid.
*
* @param _tib transient index buffer
* @param _firstIndex first index to render
* @param _numIndices number of indices to render
*/
public static void bgfx_set_transient_index_buffer(@NativeType("const bgfx_transient_index_buffer_t *") BGFXTransientIndexBuffer _tib, @NativeType("uint32_t") int _firstIndex, @NativeType("uint32_t") int _numIndices) {
nbgfx_set_transient_index_buffer(_tib.address(), _firstIndex, _numIndices);
}
// --- [ bgfx_set_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_set_vertex_buffer set_vertex_buffer} */
public static void nbgfx_set_vertex_buffer(byte _stream, short _handle, int _startVertex, int _numVertices) {
long __functionAddress = Functions.set_vertex_buffer;
invokeV(__functionAddress, _stream, _handle, _startVertex, _numVertices);
}
/**
* Sets vertex buffer for draw primitive.
*
* @param _stream vertex stream
* @param _handle vertex buffer
* @param _startVertex first vertex to render
* @param _numVertices number of vertices to render
*/
public static void bgfx_set_vertex_buffer(@NativeType("uint8_t") int _stream, @NativeType("bgfx_vertex_buffer_handle_t") short _handle, @NativeType("uint32_t") int _startVertex, @NativeType("uint32_t") int _numVertices) {
nbgfx_set_vertex_buffer((byte)_stream, _handle, _startVertex, _numVertices);
}
// --- [ bgfx_set_dynamic_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_set_dynamic_vertex_buffer set_dynamic_vertex_buffer} */
public static void nbgfx_set_dynamic_vertex_buffer(byte _stream, short _handle, int _startVertex, int _numVertices) {
long __functionAddress = Functions.set_dynamic_vertex_buffer;
invokeV(__functionAddress, _stream, _handle, _startVertex, _numVertices);
}
/**
* Sets vertex buffer for draw primitive.
*
* @param _stream vertex stream
* @param _handle dynamic vertex buffer
* @param _startVertex first vertex to render
* @param _numVertices number of vertices to render
*/
public static void bgfx_set_dynamic_vertex_buffer(@NativeType("uint8_t") int _stream, @NativeType("bgfx_dynamic_vertex_buffer_handle_t") short _handle, @NativeType("uint32_t") int _startVertex, @NativeType("uint32_t") int _numVertices) {
nbgfx_set_dynamic_vertex_buffer((byte)_stream, _handle, _startVertex, _numVertices);
}
// --- [ bgfx_set_transient_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_set_transient_vertex_buffer set_transient_vertex_buffer} */
public static void nbgfx_set_transient_vertex_buffer(byte _stream, long _tvb, int _startVertex, int _numVertices) {
long __functionAddress = Functions.set_transient_vertex_buffer;
if (CHECKS) {
BGFXTransientVertexBuffer.validate(_tvb);
}
invokePV(__functionAddress, _stream, _tvb, _startVertex, _numVertices);
}
/**
* Sets vertex buffer for draw primitive.
*
*
Note
*
*
{@code _tvb} pointer after this call is invalid.
*
* @param _stream vertex stream
* @param _tvb transient vertex buffer
* @param _startVertex first vertex to render
* @param _numVertices number of vertices to render
*/
public static void bgfx_set_transient_vertex_buffer(@NativeType("uint8_t") int _stream, @NativeType("const bgfx_transient_vertex_buffer_t *") BGFXTransientVertexBuffer _tvb, @NativeType("uint32_t") int _startVertex, @NativeType("uint32_t") int _numVertices) {
nbgfx_set_transient_vertex_buffer((byte)_stream, _tvb.address(), _startVertex, _numVertices);
}
// --- [ bgfx_set_instance_data_buffer ] ---
/** Unsafe version of: {@link #bgfx_set_instance_data_buffer set_instance_data_buffer} */
public static void nbgfx_set_instance_data_buffer(long _idb, int _num) {
long __functionAddress = Functions.set_instance_data_buffer;
if (CHECKS) {
BGFXInstanceDataBuffer.validate(_idb);
}
invokePV(__functionAddress, _idb, _num);
}
/**
* Sets instance data buffer for draw primitive.
*
*
Note
*
*
{@code _idb} pointer after this call is invalid.
*
* @param _idb transient instance data buffer
* @param _num number of data instances
*/
public static void bgfx_set_instance_data_buffer(@NativeType("const bgfx_instance_data_buffer_t *") BGFXInstanceDataBuffer _idb, @NativeType("uint32_t") int _num) {
nbgfx_set_instance_data_buffer(_idb.address(), _num);
}
// --- [ bgfx_set_instance_data_from_vertex_buffer ] ---
/**
* Set instance data buffer for draw primitive.
*
* @param _handle vertex buffer
* @param _start first instance data
* @param _num number of data instances
*/
public static void bgfx_set_instance_data_from_vertex_buffer(@NativeType("bgfx_vertex_buffer_handle_t") short _handle, @NativeType("uint32_t") int _start, @NativeType("uint32_t") int _num) {
long __functionAddress = Functions.set_instance_data_from_vertex_buffer;
invokeV(__functionAddress, _handle, _start, _num);
}
// --- [ bgfx_set_instance_data_from_dynamic_vertex_buffer ] ---
/**
* Set instance data buffer for draw primitive.
*
* @param _handle dynamic vertex buffer
* @param _start first instance data
* @param _num number of data instances
*/
public static void bgfx_set_instance_data_from_dynamic_vertex_buffer(@NativeType("bgfx_dynamic_vertex_buffer_handle_t") short _handle, @NativeType("uint32_t") int _start, @NativeType("uint32_t") int _num) {
long __functionAddress = Functions.set_instance_data_from_dynamic_vertex_buffer;
invokeV(__functionAddress, _handle, _start, _num);
}
// --- [ bgfx_set_texture ] ---
/** Unsafe version of: {@link #bgfx_set_texture set_texture} */
public static void nbgfx_set_texture(byte _stage, short _sampler, short _handle, int _flags) {
long __functionAddress = Functions.set_texture;
invokeV(__functionAddress, _stage, _sampler, _handle, _flags);
}
/**
* Sets texture stage for draw primitive.
*
* @param _stage texture unit
* @param _sampler program sampler
* @param _handle texture handle
* @param _flags texture sampling mode. {@code UINT32_MAX} uses texture sampling settings from the texture. One of:
*/
public static void bgfx_set_texture(@NativeType("uint8_t") int _stage, @NativeType("bgfx_uniform_handle_t") short _sampler, @NativeType("bgfx_texture_handle_t") short _handle, @NativeType("uint32_t") int _flags) {
nbgfx_set_texture((byte)_stage, _sampler, _handle, _flags);
}
// --- [ bgfx_touch ] ---
/** Unsafe version of: {@link #bgfx_touch touch} */
public static void nbgfx_touch(short _id) {
long __functionAddress = Functions.touch;
invokeV(__functionAddress, _id);
}
/**
* Submits an empty primitive for rendering. Uniforms and draw state will be applied but no geometry will be submitted.
*
*
These empty draw calls will sort before ordinary draw calls.
*
* @param _id view id
*/
public static void bgfx_touch(@NativeType("bgfx_view_id_t") int _id) {
nbgfx_touch((short)_id);
}
// --- [ bgfx_submit ] ---
/** Unsafe version of: {@link #bgfx_submit submit} */
public static void nbgfx_submit(short _id, short _handle, int _depth, boolean _preserveState) {
long __functionAddress = Functions.submit;
invokeV(__functionAddress, _id, _handle, _depth, _preserveState);
}
/**
* Submits primitive for rendering.
*
* @param _id view id
* @param _handle program
* @param _depth depth for sorting
* @param _preserveState preserve internal draw state for next draw call submit
*/
public static void bgfx_submit(@NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_program_handle_t") short _handle, @NativeType("int32_t") int _depth, @NativeType("bool") boolean _preserveState) {
nbgfx_submit((short)_id, _handle, _depth, _preserveState);
}
// --- [ bgfx_submit_occlusion_query ] ---
/** Unsafe version of: {@link #bgfx_submit_occlusion_query submit_occlusion_query} */
public static void nbgfx_submit_occlusion_query(short _id, short _program, short _occlusionQuery, int _depth, boolean _preserveState) {
long __functionAddress = Functions.submit_occlusion_query;
invokeV(__functionAddress, _id, _program, _occlusionQuery, _depth, _preserveState);
}
/**
* Submits primitive with occlusion query for rendering.
*
* @param _id view id
* @param _program program
* @param _occlusionQuery occlusion query
* @param _depth depth for sorting
* @param _preserveState preserve internal draw state for next draw call submit
*/
public static void bgfx_submit_occlusion_query(@NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_program_handle_t") short _program, @NativeType("bgfx_occlusion_query_handle_t") short _occlusionQuery, @NativeType("int32_t") int _depth, @NativeType("bool") boolean _preserveState) {
nbgfx_submit_occlusion_query((short)_id, _program, _occlusionQuery, _depth, _preserveState);
}
// --- [ bgfx_submit_indirect ] ---
/** Unsafe version of: {@link #bgfx_submit_indirect submit_indirect} */
public static void nbgfx_submit_indirect(short _id, short _handle, short _indirectHandle, short _start, short _num, int _depth, boolean _preserveState) {
long __functionAddress = Functions.submit_indirect;
invokeV(__functionAddress, _id, _handle, _indirectHandle, _start, _num, _depth, _preserveState);
}
/**
* Submits primitive for rendering with index and instance data info from indirect buffer.
*
* @param _id view id
* @param _handle program
* @param _indirectHandle indirect buffer
* @param _start first element in indirect buffer
* @param _num number of dispatches
* @param _depth depth for sorting
* @param _preserveState preserve internal draw state for next draw call submit
*/
public static void bgfx_submit_indirect(@NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_program_handle_t") short _handle, @NativeType("bgfx_indirect_buffer_handle_t") short _indirectHandle, @NativeType("uint16_t") int _start, @NativeType("uint16_t") int _num, @NativeType("int32_t") int _depth, @NativeType("bool") boolean _preserveState) {
nbgfx_submit_indirect((short)_id, _handle, _indirectHandle, (short)_start, (short)_num, _depth, _preserveState);
}
// --- [ bgfx_set_image ] ---
/** Unsafe version of: {@link #bgfx_set_image set_image} */
public static void nbgfx_set_image(byte _stage, short _handle, byte _mip, int _access, int _format) {
long __functionAddress = Functions.set_image;
invokeV(__functionAddress, _stage, _handle, _mip, _access, _format);
}
/**
* Sets compute image from texture.
*
* @param _stage texture unit
* @param _handle texture handle
* @param _mip mip level
* @param _access texture access. One of:
*/
public static void bgfx_set_image(@NativeType("uint8_t") int _stage, @NativeType("bgfx_texture_handle_t") short _handle, @NativeType("uint8_t") int _mip, @NativeType("bgfx_access_t") int _access, @NativeType("bgfx_texture_format_t") int _format) {
nbgfx_set_image((byte)_stage, _handle, (byte)_mip, _access, _format);
}
// --- [ bgfx_set_compute_index_buffer ] ---
/** Unsafe version of: {@link #bgfx_set_compute_index_buffer set_compute_index_buffer} */
public static void nbgfx_set_compute_index_buffer(byte _stage, short _handle, int _access) {
long __functionAddress = Functions.set_compute_index_buffer;
invokeV(__functionAddress, _stage, _handle, _access);
}
/**
* Sets compute index buffer.
*
* @param _stage compute stage
* @param _handle index buffer handle
* @param _access buffer access. One of:
{@link #BGFX_ACCESS_READ ACCESS_READ}
{@link #BGFX_ACCESS_WRITE ACCESS_WRITE}
{@link #BGFX_ACCESS_READWRITE ACCESS_READWRITE}
*/
public static void bgfx_set_compute_index_buffer(@NativeType("uint8_t") int _stage, @NativeType("bgfx_index_buffer_handle_t") short _handle, @NativeType("bgfx_access_t") int _access) {
nbgfx_set_compute_index_buffer((byte)_stage, _handle, _access);
}
// --- [ bgfx_set_compute_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_set_compute_vertex_buffer set_compute_vertex_buffer} */
public static void nbgfx_set_compute_vertex_buffer(byte _stage, short _handle, int _access) {
long __functionAddress = Functions.set_compute_vertex_buffer;
invokeV(__functionAddress, _stage, _handle, _access);
}
/**
* Sets compute vertex buffer.
*
* @param _stage compute stage
* @param _handle vertex buffer handle
* @param _access buffer access. One of:
{@link #BGFX_ACCESS_READ ACCESS_READ}
{@link #BGFX_ACCESS_WRITE ACCESS_WRITE}
{@link #BGFX_ACCESS_READWRITE ACCESS_READWRITE}
*/
public static void bgfx_set_compute_vertex_buffer(@NativeType("uint8_t") int _stage, @NativeType("bgfx_vertex_buffer_handle_t") short _handle, @NativeType("bgfx_access_t") int _access) {
nbgfx_set_compute_vertex_buffer((byte)_stage, _handle, _access);
}
// --- [ bgfx_set_compute_dynamic_index_buffer ] ---
/** Unsafe version of: {@link #bgfx_set_compute_dynamic_index_buffer set_compute_dynamic_index_buffer} */
public static void nbgfx_set_compute_dynamic_index_buffer(byte _stage, short _handle, int _access) {
long __functionAddress = Functions.set_compute_dynamic_index_buffer;
invokeV(__functionAddress, _stage, _handle, _access);
}
/**
* Sets compute dynamic index buffer.
*
* @param _stage compute stage
* @param _handle dynamic index buffer handle
* @param _access buffer access. One of:
{@link #BGFX_ACCESS_READ ACCESS_READ}
{@link #BGFX_ACCESS_WRITE ACCESS_WRITE}
{@link #BGFX_ACCESS_READWRITE ACCESS_READWRITE}
*/
public static void bgfx_set_compute_dynamic_index_buffer(@NativeType("uint8_t") int _stage, @NativeType("bgfx_dynamic_index_buffer_handle_t") short _handle, @NativeType("bgfx_access_t") int _access) {
nbgfx_set_compute_dynamic_index_buffer((byte)_stage, _handle, _access);
}
// --- [ bgfx_set_compute_dynamic_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_set_compute_dynamic_vertex_buffer set_compute_dynamic_vertex_buffer} */
public static void nbgfx_set_compute_dynamic_vertex_buffer(byte _stage, short _handle, int _access) {
long __functionAddress = Functions.set_compute_dynamic_vertex_buffer;
invokeV(__functionAddress, _stage, _handle, _access);
}
/**
* Sets compute dynamic vertex buffer.
*
* @param _stage compute stage
* @param _handle dynamic vertex buffer handle
* @param _access buffer access. One of:
{@link #BGFX_ACCESS_READ ACCESS_READ}
{@link #BGFX_ACCESS_WRITE ACCESS_WRITE}
{@link #BGFX_ACCESS_READWRITE ACCESS_READWRITE}
*/
public static void bgfx_set_compute_dynamic_vertex_buffer(@NativeType("uint8_t") int _stage, @NativeType("bgfx_dynamic_vertex_buffer_handle_t") short _handle, @NativeType("bgfx_access_t") int _access) {
nbgfx_set_compute_dynamic_vertex_buffer((byte)_stage, _handle, _access);
}
// --- [ bgfx_set_compute_indirect_buffer ] ---
/** Unsafe version of: {@link #bgfx_set_compute_indirect_buffer set_compute_indirect_buffer} */
public static void nbgfx_set_compute_indirect_buffer(byte _stage, short _handle, int _access) {
long __functionAddress = Functions.set_compute_indirect_buffer;
invokeV(__functionAddress, _stage, _handle, _access);
}
/**
* Sets compute indirect buffer.
*
* @param _stage compute stage
* @param _handle indirect buffer handle
* @param _access buffer access. One of:
{@link #BGFX_ACCESS_READ ACCESS_READ}
{@link #BGFX_ACCESS_WRITE ACCESS_WRITE}
{@link #BGFX_ACCESS_READWRITE ACCESS_READWRITE}
*/
public static void bgfx_set_compute_indirect_buffer(@NativeType("uint8_t") int _stage, @NativeType("bgfx_indirect_buffer_handle_t") short _handle, @NativeType("bgfx_access_t") int _access) {
nbgfx_set_compute_indirect_buffer((byte)_stage, _handle, _access);
}
// --- [ bgfx_dispatch ] ---
/** Unsafe version of: {@link #bgfx_dispatch dispatch} */
public static void nbgfx_dispatch(short _id, short _handle, int _numX, int _numY, int _numZ, byte _flags) {
long __functionAddress = Functions.dispatch;
invokeV(__functionAddress, _id, _handle, _numX, _numY, _numZ, _flags);
}
/**
* Dispatches compute.
*
* @param _id view id
* @param _handle compute program
* @param _numX number of groups X
* @param _numY number of groups Y
* @param _numZ number of groups Z
* @param _flags view flags. One of:
{@link #BGFX_SUBMIT_EYE_LEFT SUBMIT_EYE_LEFT}
{@link #BGFX_SUBMIT_EYE_RIGHT SUBMIT_EYE_RIGHT}
{@link #BGFX_SUBMIT_EYE_FIRST SUBMIT_EYE_FIRST}
*/
public static void bgfx_dispatch(@NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_program_handle_t") short _handle, @NativeType("uint32_t") int _numX, @NativeType("uint32_t") int _numY, @NativeType("uint32_t") int _numZ, @NativeType("uint8_t") int _flags) {
nbgfx_dispatch((short)_id, _handle, _numX, _numY, _numZ, (byte)_flags);
}
// --- [ bgfx_dispatch_indirect ] ---
/** Unsafe version of: {@link #bgfx_dispatch_indirect dispatch_indirect} */
public static void nbgfx_dispatch_indirect(short _id, short _handle, short _indirectHandle, short _start, short _num, byte _flags) {
long __functionAddress = Functions.dispatch_indirect;
invokeV(__functionAddress, _id, _handle, _indirectHandle, _start, _num, _flags);
}
/**
* Dispatches compute indirect.
*
* @param _id view id
* @param _handle compute program
* @param _indirectHandle indirect buffer
* @param _start first element in indirect buffer
* @param _num number of dispatches
* @param _flags view flags. One of:
{@link #BGFX_SUBMIT_EYE_LEFT SUBMIT_EYE_LEFT}
{@link #BGFX_SUBMIT_EYE_RIGHT SUBMIT_EYE_RIGHT}
{@link #BGFX_SUBMIT_EYE_FIRST SUBMIT_EYE_FIRST}
*/
public static void bgfx_dispatch_indirect(@NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_program_handle_t") short _handle, @NativeType("bgfx_indirect_buffer_handle_t") short _indirectHandle, @NativeType("uint16_t") int _start, @NativeType("uint16_t") int _num, @NativeType("uint8_t") int _flags) {
nbgfx_dispatch_indirect((short)_id, _handle, _indirectHandle, (short)_start, (short)_num, (byte)_flags);
}
// --- [ bgfx_discard ] ---
/** Discards all previously set state for draw or compute call. */
public static void bgfx_discard() {
long __functionAddress = Functions.discard;
invokeV(__functionAddress);
}
// --- [ bgfx_blit ] ---
/** Unsafe version of: {@link #bgfx_blit blit} */
public static void nbgfx_blit(short _id, short _dst, byte _dstMip, short _dstX, short _dstY, short _dstZ, short _src, byte _srcMip, short _srcX, short _srcY, short _srcZ, short _width, short _height, short _depth) {
long __functionAddress = Functions.blit;
invokeV(__functionAddress, _id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth);
}
/**
* Blits texture region between two textures.
*
*
Destination texture must be created with {@link #BGFX_TEXTURE_BLIT_DST TEXTURE_BLIT_DST} flag. Availability depends on {@link #BGFX_CAPS_TEXTURE_BLIT CAPS_TEXTURE_BLIT}.
*
* @param _id view id
* @param _dst destination texture handle
* @param _dstMip destination texture mip level
* @param _dstX destination texture X position
* @param _dstY destination texture Y position
* @param _dstZ if texture is 2D this argument should be 0. If destination texture is cube this argument represents destination texture cube face. For 3D texture
* this argument represents destination texture Z position.
* @param _src source texture handle
* @param _srcMip source texture mip level
* @param _srcX source texture X position
* @param _srcY source texture Y position
* @param _srcZ if texture is 2D this argument should be 0. If destination texture is cube this argument represents destination texture cube face. For 3D texture
* this argument represents destination texture Z position.
* @param _width width of region
* @param _height height of region
* @param _depth if texture is 3D this argument represents depth of region, otherwise it's unused
*/
public static void bgfx_blit(@NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_texture_handle_t") short _dst, @NativeType("uint8_t") int _dstMip, @NativeType("uint16_t") int _dstX, @NativeType("uint16_t") int _dstY, @NativeType("uint16_t") int _dstZ, @NativeType("bgfx_texture_handle_t") short _src, @NativeType("uint8_t") int _srcMip, @NativeType("uint16_t") int _srcX, @NativeType("uint16_t") int _srcY, @NativeType("uint16_t") int _srcZ, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height, @NativeType("uint16_t") int _depth) {
nbgfx_blit((short)_id, _dst, (byte)_dstMip, (short)_dstX, (short)_dstY, (short)_dstZ, _src, (byte)_srcMip, (short)_srcX, (short)_srcY, (short)_srcZ, (short)_width, (short)_height, (short)_depth);
}
// --- [ bgfx_encoder_set_marker ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_marker encoder_set_marker} */
public static void nbgfx_encoder_set_marker(long _encoder, long _marker) {
long __functionAddress = Functions.encoder_set_marker;
if (CHECKS) {
check(_encoder);
}
invokePPV(__functionAddress, _encoder, _marker);
}
/**
* Sets debug marker.
*
* @param _encoder the encoder
* @param _marker debug marker
*/
public static void bgfx_encoder_set_marker(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("const char *") ByteBuffer _marker) {
if (CHECKS) {
checkNT1(_marker);
}
nbgfx_encoder_set_marker(_encoder, memAddress(_marker));
}
/**
* Sets debug marker.
*
* @param _encoder the encoder
* @param _marker debug marker
*/
public static void bgfx_encoder_set_marker(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("const char *") CharSequence _marker) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer _markerEncoded = stack.ASCII(_marker);
nbgfx_encoder_set_marker(_encoder, memAddress(_markerEncoded));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ bgfx_encoder_set_state ] ---
/**
* Sets render states for draw primitive.
*
*
* @param _bstencil back stencil state. If back is set to {@link #BGFX_STENCIL_NONE STENCIL_NONE} {@code _fstencil} is applied to both front and back facing primitives. One or more of:
*/
public static void bgfx_encoder_set_stencil(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint32_t") int _fstencil, @NativeType("uint32_t") int _bstencil) {
long __functionAddress = Functions.encoder_set_stencil;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _fstencil, _bstencil);
}
// --- [ bgfx_encoder_set_scissor ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_scissor encoder_set_scissor} */
public static short nbgfx_encoder_set_scissor(long _encoder, short _x, short _y, short _width, short _height) {
long __functionAddress = Functions.encoder_set_scissor;
if (CHECKS) {
check(_encoder);
}
return invokePS(__functionAddress, _encoder, _x, _y, _width, _height);
}
/**
* Sets scissor for draw primitive. To scissor for all primitives in view see {@link #bgfx_set_view_scissor set_view_scissor}.
*
* @param _encoder the encoder
* @param _x position x from the left side of the window
* @param _y position y from the top side of the window
* @param _width width of scissor region
* @param _height height of scissor region
*
* @return scissor cache index
*/
@NativeType("uint16_t")
public static short bgfx_encoder_set_scissor(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint16_t") int _x, @NativeType("uint16_t") int _y, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height) {
return nbgfx_encoder_set_scissor(_encoder, (short)_x, (short)_y, (short)_width, (short)_height);
}
// --- [ bgfx_encoder_set_scissor_cached ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_scissor_cached encoder_set_scissor_cached} */
public static void nbgfx_encoder_set_scissor_cached(long _encoder, short _cache) {
long __functionAddress = Functions.encoder_set_scissor_cached;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _cache);
}
/**
* Sets scissor from cache for draw primitive.
*
* @param _encoder the encoder
* @param _cache index in scissor cache. Pass {@code UINT16_MAX} to have primitive use view scissor instead.
*/
public static void bgfx_encoder_set_scissor_cached(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint16_t") int _cache) {
nbgfx_encoder_set_scissor_cached(_encoder, (short)_cache);
}
// --- [ bgfx_encoder_set_transform ] ---
/**
* Unsafe version of: {@link #bgfx_encoder_set_transform encoder_set_transform}
*
* @param _num number of matrices in array
*/
public static int nbgfx_encoder_set_transform(long _encoder, long _mtx, short _num) {
long __functionAddress = Functions.encoder_set_transform;
if (CHECKS) {
check(_encoder);
}
return invokePPI(__functionAddress, _encoder, _mtx, _num);
}
/**
* Sets model matrix for draw primitive. If it is not called, the model will be rendered with identity model matrix.
*
* @param _encoder the encoder
* @param _mtx pointer to first matrix in array
*
* @return index into matrix cache in case the same model matrix has to be used for other draw primitive call
*/
@NativeType("uint32_t")
public static int bgfx_encoder_set_transform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("const void *") ByteBuffer _mtx) {
return nbgfx_encoder_set_transform(_encoder, memAddress(_mtx), (short)(_mtx.remaining() >> 6));
}
/**
* Sets model matrix for draw primitive. If it is not called, the model will be rendered with identity model matrix.
*
* @param _encoder the encoder
* @param _mtx pointer to first matrix in array
*
* @return index into matrix cache in case the same model matrix has to be used for other draw primitive call
*/
@NativeType("uint32_t")
public static int bgfx_encoder_set_transform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("const void *") FloatBuffer _mtx) {
return nbgfx_encoder_set_transform(_encoder, memAddress(_mtx), (short)(_mtx.remaining() >> 4));
}
// --- [ bgfx_encoder_alloc_transform ] ---
/** Unsafe version of: {@link #bgfx_encoder_alloc_transform encoder_alloc_transform} */
public static int nbgfx_encoder_alloc_transform(long _encoder, long _transform, short _num) {
long __functionAddress = Functions.encoder_alloc_transform;
if (CHECKS) {
check(_encoder);
}
return invokePPI(__functionAddress, _encoder, _transform, _num);
}
/**
* Reserves {@code _num} matrices in internal matrix cache.
*
*
Pointer returned can be modifed until {@link #bgfx_frame frame} is called.
*
* @param _encoder the encoder
* @param _transform pointer to {@link BGFXTransform} structure
* @param _num number of matrices
*
* @return index into matrix cache
*/
@NativeType("uint32_t")
public static int bgfx_encoder_alloc_transform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_transform_t *") BGFXTransform _transform, @NativeType("uint16_t") int _num) {
return nbgfx_encoder_alloc_transform(_encoder, _transform.address(), (short)_num);
}
// --- [ bgfx_encoder_set_transform_cached ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_transform_cached encoder_set_transform_cached} */
public static void nbgfx_encoder_set_transform_cached(long _encoder, int _cache, short _num) {
long __functionAddress = Functions.encoder_set_transform_cached;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _cache, _num);
}
/**
* Sets model matrix from matrix cache for draw primitive.
*
* @param _encoder the encoder
* @param _cache index in matrix cache
* @param _num number of matrices from cache
*/
public static void bgfx_encoder_set_transform_cached(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint32_t") int _cache, @NativeType("uint16_t") int _num) {
nbgfx_encoder_set_transform_cached(_encoder, _cache, (short)_num);
}
// --- [ bgfx_encoder_set_uniform ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_uniform encoder_set_uniform} */
public static void nbgfx_encoder_set_uniform(long _encoder, short _handle, long _value, short _num) {
long __functionAddress = Functions.encoder_set_uniform;
if (CHECKS) {
check(_encoder);
}
invokePPV(__functionAddress, _encoder, _handle, _value, _num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _encoder the encoder
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") ByteBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_encoder_set_uniform(_encoder, _handle, memAddress(_value), (short)_num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _encoder the encoder
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") ShortBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_encoder_set_uniform(_encoder, _handle, memAddress(_value), (short)_num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _encoder the encoder
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") IntBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_encoder_set_uniform(_encoder, _handle, memAddress(_value), (short)_num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _encoder the encoder
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") LongBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_encoder_set_uniform(_encoder, _handle, memAddress(_value), (short)_num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _encoder the encoder
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") FloatBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_encoder_set_uniform(_encoder, _handle, memAddress(_value), (short)_num);
}
/**
* Sets shader uniform parameter for draw primitive.
*
* @param _encoder the encoder
* @param _handle uniform
* @param _value pointer to uniform data
* @param _num number of elements. Passing {@code UINT16_MAX} will use the {@code _num} passed on uniform creation.
*/
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") DoubleBuffer _value, @NativeType("uint16_t") int _num) {
nbgfx_encoder_set_uniform(_encoder, _handle, memAddress(_value), (short)_num);
}
// --- [ bgfx_encoder_set_index_buffer ] ---
/**
* Sets index buffer for draw primitive.
*
* @param _encoder the encoder
* @param _handle index buffer
* @param _firstIndex first index to render
* @param _numIndices number of indices to render
*/
public static void bgfx_encoder_set_index_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_index_buffer_handle_t") short _handle, @NativeType("uint32_t") int _firstIndex, @NativeType("uint32_t") int _numIndices) {
long __functionAddress = Functions.encoder_set_index_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _handle, _firstIndex, _numIndices);
}
// --- [ bgfx_encoder_set_dynamic_index_buffer ] ---
/**
* Sets index buffer for draw primitive.
*
* @param _encoder the encoder
* @param _handle dynamic index buffer
* @param _firstIndex first index to render
* @param _numIndices number of indices to render
*/
public static void bgfx_encoder_set_dynamic_index_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_dynamic_index_buffer_handle_t") short _handle, @NativeType("uint32_t") int _firstIndex, @NativeType("uint32_t") int _numIndices) {
long __functionAddress = Functions.encoder_set_dynamic_index_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _handle, _firstIndex, _numIndices);
}
// --- [ bgfx_encoder_set_transient_index_buffer ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_transient_index_buffer encoder_set_transient_index_buffer} */
public static void nbgfx_encoder_set_transient_index_buffer(long _encoder, long _tib, int _firstIndex, int _numIndices) {
long __functionAddress = Functions.encoder_set_transient_index_buffer;
if (CHECKS) {
check(_encoder);
BGFXTransientIndexBuffer.validate(_tib);
}
invokePPV(__functionAddress, _encoder, _tib, _firstIndex, _numIndices);
}
/**
* Sets index buffer for draw primitive.
*
*
Note
*
*
{@code _tib} pointer after this call is invalid.
*
* @param _encoder the encoder
* @param _tib transient index buffer
* @param _firstIndex first index to render
* @param _numIndices number of indices to render
*/
public static void bgfx_encoder_set_transient_index_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("const bgfx_transient_index_buffer_t *") BGFXTransientIndexBuffer _tib, @NativeType("uint32_t") int _firstIndex, @NativeType("uint32_t") int _numIndices) {
nbgfx_encoder_set_transient_index_buffer(_encoder, _tib.address(), _firstIndex, _numIndices);
}
// --- [ bgfx_encoder_set_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_vertex_buffer encoder_set_vertex_buffer} */
public static void nbgfx_encoder_set_vertex_buffer(long _encoder, byte _stream, short _handle, int _startVertex, int _numVertices) {
long __functionAddress = Functions.encoder_set_vertex_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _stream, _handle, _startVertex, _numVertices);
}
/**
* Sets vertex buffer for draw primitive.
*
* @param _encoder the encoder
* @param _stream vertex stream
* @param _handle vertex buffer
* @param _startVertex first vertex to render
* @param _numVertices number of vertices to render
*/
public static void bgfx_encoder_set_vertex_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint8_t") int _stream, @NativeType("bgfx_vertex_buffer_handle_t") short _handle, @NativeType("uint32_t") int _startVertex, @NativeType("uint32_t") int _numVertices) {
nbgfx_encoder_set_vertex_buffer(_encoder, (byte)_stream, _handle, _startVertex, _numVertices);
}
// --- [ bgfx_encoder_set_dynamic_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_dynamic_vertex_buffer encoder_set_dynamic_vertex_buffer} */
public static void nbgfx_encoder_set_dynamic_vertex_buffer(long _encoder, byte _stream, short _handle, int _startVertex, int _numVertices) {
long __functionAddress = Functions.encoder_set_dynamic_vertex_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _stream, _handle, _startVertex, _numVertices);
}
/**
* Sets vertex buffer for draw primitive.
*
* @param _encoder the encoder
* @param _stream vertex stream
* @param _handle dynamic vertex buffer
* @param _startVertex first vertex to render
* @param _numVertices number of vertices to render
*/
public static void bgfx_encoder_set_dynamic_vertex_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint8_t") int _stream, @NativeType("bgfx_dynamic_vertex_buffer_handle_t") short _handle, @NativeType("uint32_t") int _startVertex, @NativeType("uint32_t") int _numVertices) {
nbgfx_encoder_set_dynamic_vertex_buffer(_encoder, (byte)_stream, _handle, _startVertex, _numVertices);
}
// --- [ bgfx_encoder_set_transient_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_transient_vertex_buffer encoder_set_transient_vertex_buffer} */
public static void nbgfx_encoder_set_transient_vertex_buffer(long _encoder, byte _stream, long _tvb, int _startVertex, int _numVertices) {
long __functionAddress = Functions.encoder_set_transient_vertex_buffer;
if (CHECKS) {
check(_encoder);
BGFXTransientVertexBuffer.validate(_tvb);
}
invokePPV(__functionAddress, _encoder, _stream, _tvb, _startVertex, _numVertices);
}
/**
* Sets vertex buffer for draw primitive.
*
*
Note
*
*
{@code _tvb} pointer after this call is invalid.
*
* @param _encoder the encoder
* @param _stream vertex stream
* @param _tvb transient vertex buffer
* @param _startVertex first vertex to render
* @param _numVertices number of vertices to render
*/
public static void bgfx_encoder_set_transient_vertex_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint8_t") int _stream, @NativeType("const bgfx_transient_vertex_buffer_t *") BGFXTransientVertexBuffer _tvb, @NativeType("uint32_t") int _startVertex, @NativeType("uint32_t") int _numVertices) {
nbgfx_encoder_set_transient_vertex_buffer(_encoder, (byte)_stream, _tvb.address(), _startVertex, _numVertices);
}
// --- [ bgfx_encoder_set_instance_data_buffer ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_instance_data_buffer encoder_set_instance_data_buffer} */
public static void nbgfx_encoder_set_instance_data_buffer(long _encoder, long _idb, int _num) {
long __functionAddress = Functions.encoder_set_instance_data_buffer;
if (CHECKS) {
check(_encoder);
BGFXInstanceDataBuffer.validate(_idb);
}
invokePPV(__functionAddress, _encoder, _idb, _num);
}
/**
* Sets instance data buffer for draw primitive.
*
*
Note
*
*
{@code _idb} pointer after this call is invalid.
*
* @param _encoder the encoder
* @param _idb transient instance data buffer
* @param _num number of data instances
*/
public static void bgfx_encoder_set_instance_data_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("const bgfx_instance_data_buffer_t *") BGFXInstanceDataBuffer _idb, @NativeType("uint32_t") int _num) {
nbgfx_encoder_set_instance_data_buffer(_encoder, _idb.address(), _num);
}
// --- [ bgfx_encoder_set_instance_data_from_vertex_buffer ] ---
/**
* Set instance data buffer for draw primitive.
*
* @param _encoder the encoder
* @param _handle vertex buffer
* @param _start first instance data
* @param _num number of data instances
*/
public static void bgfx_encoder_set_instance_data_from_vertex_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_vertex_buffer_handle_t") short _handle, @NativeType("uint32_t") int _start, @NativeType("uint32_t") int _num) {
long __functionAddress = Functions.encoder_set_instance_data_from_vertex_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _handle, _start, _num);
}
// --- [ bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer ] ---
/**
* Set instance data buffer for draw primitive.
*
* @param _encoder the encoder
* @param _handle dynamic vertex buffer
* @param _start first instance data
* @param _num number of data instances
*/
public static void bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_dynamic_vertex_buffer_handle_t") short _handle, @NativeType("uint32_t") int _start, @NativeType("uint32_t") int _num) {
long __functionAddress = Functions.encoder_set_instance_data_from_dynamic_vertex_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _handle, _start, _num);
}
// --- [ bgfx_encoder_set_texture ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_texture encoder_set_texture} */
public static void nbgfx_encoder_set_texture(long _encoder, byte _stage, short _sampler, short _handle, int _flags) {
long __functionAddress = Functions.encoder_set_texture;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _stage, _sampler, _handle, _flags);
}
/**
* Sets texture stage for draw primitive.
*
* @param _encoder the encoder
* @param _stage texture unit
* @param _sampler program sampler
* @param _handle texture handle
* @param _flags texture sampling mode. {@code UINT32_MAX} uses texture sampling settings from the texture. One of:
*/
public static void bgfx_encoder_set_texture(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint8_t") int _stage, @NativeType("bgfx_uniform_handle_t") short _sampler, @NativeType("bgfx_texture_handle_t") short _handle, @NativeType("uint32_t") int _flags) {
nbgfx_encoder_set_texture(_encoder, (byte)_stage, _sampler, _handle, _flags);
}
// --- [ bgfx_encoder_touch ] ---
/** Unsafe version of: {@link #bgfx_encoder_touch encoder_touch} */
public static void nbgfx_encoder_touch(long _encoder, short _id) {
long __functionAddress = Functions.encoder_touch;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _id);
}
/**
* Submits an empty primitive for rendering. Uniforms and draw state will be applied but no geometry will be submitted.
*
*
These empty draw calls will sort before ordinary draw calls.
*
* @param _encoder the encoder
* @param _id view id
*/
public static void bgfx_encoder_touch(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_view_id_t") int _id) {
nbgfx_encoder_touch(_encoder, (short)_id);
}
// --- [ bgfx_encoder_submit ] ---
/** Unsafe version of: {@link #bgfx_encoder_submit encoder_submit} */
public static void nbgfx_encoder_submit(long _encoder, short _id, short _handle, int _depth, boolean _preserveState) {
long __functionAddress = Functions.encoder_submit;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _id, _handle, _depth, _preserveState);
}
/**
* Submits primitive for rendering.
*
* @param _encoder the encoder
* @param _id view id
* @param _handle program
* @param _depth depth for sorting
* @param _preserveState preserve internal draw state for next draw call submit
*/
public static void bgfx_encoder_submit(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_program_handle_t") short _handle, @NativeType("int32_t") int _depth, @NativeType("bool") boolean _preserveState) {
nbgfx_encoder_submit(_encoder, (short)_id, _handle, _depth, _preserveState);
}
// --- [ bgfx_encoder_submit_occlusion_query ] ---
/** Unsafe version of: {@link #bgfx_encoder_submit_occlusion_query encoder_submit_occlusion_query} */
public static void nbgfx_encoder_submit_occlusion_query(long _encoder, short _id, short _program, short _occlusionQuery, int _depth, boolean _preserveState) {
long __functionAddress = Functions.encoder_submit_occlusion_query;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _id, _program, _occlusionQuery, _depth, _preserveState);
}
/**
* Submits primitive with occlusion query for rendering.
*
* @param _encoder the encoder
* @param _id view id
* @param _program program
* @param _occlusionQuery occlusion query
* @param _depth depth for sorting
* @param _preserveState preserve internal draw state for next draw call submit
*/
public static void bgfx_encoder_submit_occlusion_query(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_program_handle_t") short _program, @NativeType("bgfx_occlusion_query_handle_t") short _occlusionQuery, @NativeType("int32_t") int _depth, @NativeType("bool") boolean _preserveState) {
nbgfx_encoder_submit_occlusion_query(_encoder, (short)_id, _program, _occlusionQuery, _depth, _preserveState);
}
// --- [ bgfx_encoder_submit_indirect ] ---
/** Unsafe version of: {@link #bgfx_encoder_submit_indirect encoder_submit_indirect} */
public static void nbgfx_encoder_submit_indirect(long _encoder, short _id, short _handle, short _indirectHandle, short _start, short _num, int _depth, boolean _preserveState) {
long __functionAddress = Functions.encoder_submit_indirect;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _id, _handle, _indirectHandle, _start, _num, _depth, _preserveState);
}
/**
* Submits primitive for rendering with index and instance data info from indirect buffer.
*
* @param _encoder the encoder
* @param _id view id
* @param _handle program
* @param _indirectHandle indirect buffer
* @param _start first element in indirect buffer
* @param _num number of dispatches
* @param _depth depth for sorting
* @param _preserveState preserve internal draw state for next draw call submit
*/
public static void bgfx_encoder_submit_indirect(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_program_handle_t") short _handle, @NativeType("bgfx_indirect_buffer_handle_t") short _indirectHandle, @NativeType("uint16_t") int _start, @NativeType("uint16_t") int _num, @NativeType("int32_t") int _depth, @NativeType("bool") boolean _preserveState) {
nbgfx_encoder_submit_indirect(_encoder, (short)_id, _handle, _indirectHandle, (short)_start, (short)_num, _depth, _preserveState);
}
// --- [ bgfx_encoder_set_image ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_image encoder_set_image} */
public static void nbgfx_encoder_set_image(long _encoder, byte _stage, short _handle, byte _mip, int _access, int _format) {
long __functionAddress = Functions.encoder_set_image;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _stage, _handle, _mip, _access, _format);
}
/**
* Sets compute image from texture.
*
* @param _encoder the encoder
* @param _stage texture unit
* @param _handle texture handle
* @param _mip mip level
* @param _access texture access. One of:
*/
public static void bgfx_encoder_set_image(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint8_t") int _stage, @NativeType("bgfx_texture_handle_t") short _handle, @NativeType("uint8_t") int _mip, @NativeType("bgfx_access_t") int _access, @NativeType("bgfx_texture_format_t") int _format) {
nbgfx_encoder_set_image(_encoder, (byte)_stage, _handle, (byte)_mip, _access, _format);
}
// --- [ bgfx_encoder_set_compute_index_buffer ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_compute_index_buffer encoder_set_compute_index_buffer} */
public static void nbgfx_encoder_set_compute_index_buffer(long _encoder, byte _stage, short _handle, int _access) {
long __functionAddress = Functions.encoder_set_compute_index_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _stage, _handle, _access);
}
/**
* Sets compute index buffer.
*
* @param _encoder the encoder
* @param _stage compute stage
* @param _handle index buffer handle
* @param _access buffer access. One of:
{@link #BGFX_ACCESS_READ ACCESS_READ}
{@link #BGFX_ACCESS_WRITE ACCESS_WRITE}
{@link #BGFX_ACCESS_READWRITE ACCESS_READWRITE}
*/
public static void bgfx_encoder_set_compute_index_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint8_t") int _stage, @NativeType("bgfx_index_buffer_handle_t") short _handle, @NativeType("bgfx_access_t") int _access) {
nbgfx_encoder_set_compute_index_buffer(_encoder, (byte)_stage, _handle, _access);
}
// --- [ bgfx_encoder_set_compute_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_compute_vertex_buffer encoder_set_compute_vertex_buffer} */
public static void nbgfx_encoder_set_compute_vertex_buffer(long _encoder, byte _stage, short _handle, int _access) {
long __functionAddress = Functions.encoder_set_compute_vertex_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _stage, _handle, _access);
}
/**
* Sets compute vertex buffer.
*
* @param _encoder the encoder
* @param _stage compute stage
* @param _handle vertex buffer handle
* @param _access buffer access. One of:
{@link #BGFX_ACCESS_READ ACCESS_READ}
{@link #BGFX_ACCESS_WRITE ACCESS_WRITE}
{@link #BGFX_ACCESS_READWRITE ACCESS_READWRITE}
*/
public static void bgfx_encoder_set_compute_vertex_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint8_t") int _stage, @NativeType("bgfx_vertex_buffer_handle_t") short _handle, @NativeType("bgfx_access_t") int _access) {
nbgfx_encoder_set_compute_vertex_buffer(_encoder, (byte)_stage, _handle, _access);
}
// --- [ bgfx_encoder_set_compute_dynamic_index_buffer ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_compute_dynamic_index_buffer encoder_set_compute_dynamic_index_buffer} */
public static void nbgfx_encoder_set_compute_dynamic_index_buffer(long _encoder, byte _stage, short _handle, int _access) {
long __functionAddress = Functions.encoder_set_compute_dynamic_index_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _stage, _handle, _access);
}
/**
* Sets compute dynamic index buffer.
*
* @param _encoder the encoder
* @param _stage compute stage
* @param _handle dynamic index buffer handle
* @param _access buffer access. One of:
{@link #BGFX_ACCESS_READ ACCESS_READ}
{@link #BGFX_ACCESS_WRITE ACCESS_WRITE}
{@link #BGFX_ACCESS_READWRITE ACCESS_READWRITE}
*/
public static void bgfx_encoder_set_compute_dynamic_index_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint8_t") int _stage, @NativeType("bgfx_dynamic_index_buffer_handle_t") short _handle, @NativeType("bgfx_access_t") int _access) {
nbgfx_encoder_set_compute_dynamic_index_buffer(_encoder, (byte)_stage, _handle, _access);
}
// --- [ bgfx_encoder_set_compute_dynamic_vertex_buffer ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_compute_dynamic_vertex_buffer encoder_set_compute_dynamic_vertex_buffer} */
public static void nbgfx_encoder_set_compute_dynamic_vertex_buffer(long _encoder, byte _stage, short _handle, int _access) {
long __functionAddress = Functions.encoder_set_compute_dynamic_vertex_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _stage, _handle, _access);
}
/**
* Sets compute dynamic vertex buffer.
*
* @param _encoder the encoder
* @param _stage compute stage
* @param _handle dynamic vertex buffer handle
* @param _access buffer access. One of:
{@link #BGFX_ACCESS_READ ACCESS_READ}
{@link #BGFX_ACCESS_WRITE ACCESS_WRITE}
{@link #BGFX_ACCESS_READWRITE ACCESS_READWRITE}
*/
public static void bgfx_encoder_set_compute_dynamic_vertex_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint8_t") int _stage, @NativeType("bgfx_dynamic_vertex_buffer_handle_t") short _handle, @NativeType("bgfx_access_t") int _access) {
nbgfx_encoder_set_compute_dynamic_vertex_buffer(_encoder, (byte)_stage, _handle, _access);
}
// --- [ bgfx_encoder_set_compute_indirect_buffer ] ---
/** Unsafe version of: {@link #bgfx_encoder_set_compute_indirect_buffer encoder_set_compute_indirect_buffer} */
public static void nbgfx_encoder_set_compute_indirect_buffer(long _encoder, byte _stage, short _handle, int _access) {
long __functionAddress = Functions.encoder_set_compute_indirect_buffer;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _stage, _handle, _access);
}
/**
* Sets compute indirect buffer.
*
* @param _encoder the encoder
* @param _stage compute stage
* @param _handle indirect buffer handle
* @param _access buffer access. One of:
{@link #BGFX_ACCESS_READ ACCESS_READ}
{@link #BGFX_ACCESS_WRITE ACCESS_WRITE}
{@link #BGFX_ACCESS_READWRITE ACCESS_READWRITE}
*/
public static void bgfx_encoder_set_compute_indirect_buffer(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("uint8_t") int _stage, @NativeType("bgfx_indirect_buffer_handle_t") short _handle, @NativeType("bgfx_access_t") int _access) {
nbgfx_encoder_set_compute_indirect_buffer(_encoder, (byte)_stage, _handle, _access);
}
// --- [ bgfx_encoder_dispatch ] ---
/** Unsafe version of: {@link #bgfx_encoder_dispatch encoder_dispatch} */
public static void nbgfx_encoder_dispatch(long _encoder, short _id, short _handle, int _numX, int _numY, int _numZ, byte _flags) {
long __functionAddress = Functions.encoder_dispatch;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _id, _handle, _numX, _numY, _numZ, _flags);
}
/**
* Dispatches compute.
*
* @param _encoder the encoder
* @param _id view id
* @param _handle compute program
* @param _numX number of groups X
* @param _numY number of groups Y
* @param _numZ number of groups Z
* @param _flags view flags. One of:
{@link #BGFX_SUBMIT_EYE_LEFT SUBMIT_EYE_LEFT}
{@link #BGFX_SUBMIT_EYE_RIGHT SUBMIT_EYE_RIGHT}
{@link #BGFX_SUBMIT_EYE_FIRST SUBMIT_EYE_FIRST}
*/
public static void bgfx_encoder_dispatch(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_program_handle_t") short _handle, @NativeType("uint32_t") int _numX, @NativeType("uint32_t") int _numY, @NativeType("uint32_t") int _numZ, @NativeType("uint8_t") int _flags) {
nbgfx_encoder_dispatch(_encoder, (short)_id, _handle, _numX, _numY, _numZ, (byte)_flags);
}
// --- [ bgfx_encoder_dispatch_indirect ] ---
/** Unsafe version of: {@link #bgfx_encoder_dispatch_indirect encoder_dispatch_indirect} */
public static void nbgfx_encoder_dispatch_indirect(long _encoder, short _id, short _handle, short _indirectHandle, short _start, short _num, byte _flags) {
long __functionAddress = Functions.encoder_dispatch_indirect;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _id, _handle, _indirectHandle, _start, _num, _flags);
}
/**
* Dispatches compute indirect.
*
* @param _encoder the encoder
* @param _id view id
* @param _handle compute program
* @param _indirectHandle indirect buffer
* @param _start first element in indirect buffer
* @param _num number of dispatches
* @param _flags view flags. One of:
{@link #BGFX_SUBMIT_EYE_LEFT SUBMIT_EYE_LEFT}
{@link #BGFX_SUBMIT_EYE_RIGHT SUBMIT_EYE_RIGHT}
{@link #BGFX_SUBMIT_EYE_FIRST SUBMIT_EYE_FIRST}
*/
public static void bgfx_encoder_dispatch_indirect(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_program_handle_t") short _handle, @NativeType("bgfx_indirect_buffer_handle_t") short _indirectHandle, @NativeType("uint16_t") int _start, @NativeType("uint16_t") int _num, @NativeType("uint8_t") int _flags) {
nbgfx_encoder_dispatch_indirect(_encoder, (short)_id, _handle, _indirectHandle, (short)_start, (short)_num, (byte)_flags);
}
// --- [ bgfx_encoder_discard ] ---
/**
* Discards all previously set state for draw or compute call.
*
* @param _encoder the encoder
*/
public static void bgfx_encoder_discard(@NativeType("struct bgfx_encoder *") long _encoder) {
long __functionAddress = Functions.encoder_discard;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder);
}
// --- [ bgfx_encoder_blit ] ---
/** Unsafe version of: {@link #bgfx_encoder_blit encoder_blit} */
public static void nbgfx_encoder_blit(long _encoder, short _id, short _dst, byte _dstMip, short _dstX, short _dstY, short _dstZ, short _src, byte _srcMip, short _srcX, short _srcY, short _srcZ, short _width, short _height, short _depth) {
long __functionAddress = Functions.encoder_blit;
if (CHECKS) {
check(_encoder);
}
invokePV(__functionAddress, _encoder, _id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth);
}
/**
* Blits texture region between two textures.
*
*
Destination texture must be created with {@link #BGFX_TEXTURE_BLIT_DST TEXTURE_BLIT_DST} flag. Availability depends on {@link #BGFX_CAPS_TEXTURE_BLIT CAPS_TEXTURE_BLIT}.
*
* @param _encoder the encoder
* @param _id view id
* @param _dst destination texture handle
* @param _dstMip destination texture mip level
* @param _dstX destination texture X position
* @param _dstY destination texture Y position
* @param _dstZ if texture is 2D this argument should be 0. If destination texture is cube this argument represents destination texture cube face. For 3D texture
* this argument represents destination texture Z position.
* @param _src source texture handle
* @param _srcMip source texture mip level
* @param _srcX source texture X position
* @param _srcY source texture Y position
* @param _srcZ if texture is 2D this argument should be 0. If destination texture is cube this argument represents destination texture cube face. For 3D texture
* this argument represent destination texture Z position.
* @param _width width of region
* @param _height height of region
* @param _depth if texture is 3D this argument represents depth of region, otherwise it's unused
*/
public static void bgfx_encoder_blit(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_view_id_t") int _id, @NativeType("bgfx_texture_handle_t") short _dst, @NativeType("uint8_t") int _dstMip, @NativeType("uint16_t") int _dstX, @NativeType("uint16_t") int _dstY, @NativeType("uint16_t") int _dstZ, @NativeType("bgfx_texture_handle_t") short _src, @NativeType("uint8_t") int _srcMip, @NativeType("uint16_t") int _srcX, @NativeType("uint16_t") int _srcY, @NativeType("uint16_t") int _srcZ, @NativeType("uint16_t") int _width, @NativeType("uint16_t") int _height, @NativeType("uint16_t") int _depth) {
nbgfx_encoder_blit(_encoder, (short)_id, _dst, (byte)_dstMip, (short)_dstX, (short)_dstY, (short)_dstZ, _src, (byte)_srcMip, (short)_srcX, (short)_srcY, (short)_srcZ, (short)_width, (short)_height, (short)_depth);
}
// --- [ bgfx_request_screen_shot ] ---
/** Unsafe version of: {@link #bgfx_request_screen_shot request_screen_shot} */
public static void nbgfx_request_screen_shot(short _handle, long _filePath) {
long __functionAddress = Functions.request_screen_shot;
invokePV(__functionAddress, _handle, _filePath);
}
/**
* Requests screen shot.
*
* @param _handle frame buffer handle
* @param _filePath will be passed to {@link BGFXScreenShotCallback}
*/
public static void bgfx_request_screen_shot(@NativeType("bgfx_frame_buffer_handle_t") short _handle, @NativeType("const char *") ByteBuffer _filePath) {
if (CHECKS) {
checkNT1(_filePath);
}
nbgfx_request_screen_shot(_handle, memAddress(_filePath));
}
/**
* Requests screen shot.
*
* @param _handle frame buffer handle
* @param _filePath will be passed to {@link BGFXScreenShotCallback}
*/
public static void bgfx_request_screen_shot(@NativeType("bgfx_frame_buffer_handle_t") short _handle, @NativeType("const char *") CharSequence _filePath) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer _filePathEncoded = stack.ASCII(_filePath);
nbgfx_request_screen_shot(_handle, memAddress(_filePathEncoded));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ BGFX_STATE_ALPHA_REF ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_ALPHA_REF(@NativeType("uint64_t") long _ref) {
return (_ref << BGFX_STATE_ALPHA_REF_SHIFT) & BGFX_STATE_ALPHA_REF_MASK;
}
// --- [ BGFX_STATE_POINT_SIZE ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_POINT_SIZE(@NativeType("uint64_t") long _size) {
return (_size << BGFX_STATE_POINT_SIZE_SHIFT) & BGFX_STATE_POINT_SIZE_MASK;
}
// --- [ BGFX_STATE_BLEND_FUNC_SEPARATE ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_FUNC_SEPARATE(@NativeType("uint64_t") long _srcRGB, @NativeType("uint64_t") long _dstRGB, @NativeType("uint64_t") long _srcA, @NativeType("uint64_t") long _dstA) {
return ((_srcRGB | (_dstRGB << 4))) | ((_srcA | (_dstA << 4)) << 8);
}
// --- [ BGFX_STATE_BLEND_EQUATION_SEPARATE ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_EQUATION_SEPARATE(@NativeType("uint64_t") long _rgb, @NativeType("uint64_t") long _a) {
return _rgb | (_a << 3);
}
// --- [ BGFX_STATE_BLEND_FUNC ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_FUNC(@NativeType("uint64_t") long _src, @NativeType("uint64_t") long _dst) {
return BGFX_STATE_BLEND_FUNC_SEPARATE(_src, _dst, _src, _dst);
}
// --- [ BGFX_STATE_BLEND_EQUATION ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_EQUATION(@NativeType("uint64_t") long _equation) {
return BGFX_STATE_BLEND_EQUATION_SEPARATE(_equation, _equation);
}
// --- [ BGFX_STATE_BLEND_FUNC_RT_x ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_FUNC_RT_x(@NativeType("uint64_t") long _src, @NativeType("uint64_t") long _dst) {
return (_src >> BGFX_STATE_BLEND_SHIFT) | ((_dst >> BGFX_STATE_BLEND_SHIFT) << 4);
}
// --- [ BGFX_STATE_BLEND_FUNC_RT_xE ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_FUNC_RT_xE(@NativeType("uint64_t") long _src, @NativeType("uint64_t") long _dst, @NativeType("uint64_t") long _equation) {
return BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst) | ((_equation >> BGFX_STATE_BLEND_EQUATION_SHIFT) << 8);
}
// --- [ BGFX_STATE_BLEND_FUNC_RT_1 ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_FUNC_RT_1(@NativeType("uint64_t") long _src, @NativeType("uint64_t") long _dst) {
return BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst) << 0;
}
// --- [ BGFX_STATE_BLEND_FUNC_RT_2 ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_FUNC_RT_2(@NativeType("uint64_t") long _src, @NativeType("uint64_t") long _dst) {
return BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst) << 11;
}
// --- [ BGFX_STATE_BLEND_FUNC_RT_3 ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_FUNC_RT_3(@NativeType("uint64_t") long _src, @NativeType("uint64_t") long _dst) {
return BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst) << 22;
}
// --- [ BGFX_STATE_BLEND_FUNC_RT_1E ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_FUNC_RT_1E(@NativeType("uint64_t") long _src, @NativeType("uint64_t") long _dst, @NativeType("uint64_t") long _equation) {
return BGFX_STATE_BLEND_FUNC_RT_xE(_src, _dst, _equation) << 0;
}
// --- [ BGFX_STATE_BLEND_FUNC_RT_2E ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_FUNC_RT_2E(@NativeType("uint64_t") long _src, @NativeType("uint64_t") long _dst, @NativeType("uint64_t") long _equation) {
return BGFX_STATE_BLEND_FUNC_RT_xE(_src, _dst, _equation) << 11;
}
// --- [ BGFX_STATE_BLEND_FUNC_RT_3E ] ---
@NativeType("uint64_t")
public static long BGFX_STATE_BLEND_FUNC_RT_3E(@NativeType("uint64_t") long _src, @NativeType("uint64_t") long _dst, @NativeType("uint64_t") long _equation) {
return BGFX_STATE_BLEND_FUNC_RT_xE(_src, _dst, _equation) << 22;
}
// --- [ BGFX_STENCIL_FUNC_REF ] ---
@NativeType("uint32_t")
public static int BGFX_STENCIL_FUNC_REF(@NativeType("uint32_t") int _ref) {
return (_ref << BGFX_STENCIL_FUNC_REF_SHIFT) & BGFX_STENCIL_FUNC_REF_MASK;
}
// --- [ BGFX_STENCIL_FUNC_RMASK ] ---
@NativeType("uint32_t")
public static int BGFX_STENCIL_FUNC_RMASK(@NativeType("uint32_t") int _mask) {
return (_mask << BGFX_STENCIL_FUNC_RMASK_SHIFT) & BGFX_STENCIL_FUNC_RMASK_MASK;
}
// --- [ BGFX_TEXTURE_BORDER_COLOR ] ---
@NativeType("uint32_t")
public static int BGFX_TEXTURE_BORDER_COLOR(@NativeType("uint32_t") int _index) {
return (_index << BGFX_TEXTURE_BORDER_COLOR_SHIFT) & BGFX_TEXTURE_BORDER_COLOR_MASK;
}
/** Array version of: {@link #bgfx_vertex_pack vertex_pack} */
public static void bgfx_vertex_pack(@NativeType("const float *") float[] _input, @NativeType("bool") boolean _inputNormalized, @NativeType("bgfx_attrib_t") int _attr, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("void *") ByteBuffer _data, @NativeType("uint32_t") int _index) {
long __functionAddress = Functions.vertex_pack;
if (CHECKS) {
check(_input, 4);
}
invokePPPV(__functionAddress, _input, _inputNormalized, _attr, _decl.address(), memAddress(_data), _index);
}
/** Array version of: {@link #bgfx_vertex_unpack vertex_unpack} */
public static void bgfx_vertex_unpack(@NativeType("float *") float[] _output, @NativeType("bgfx_attrib_t") int _attr, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("const void *") ByteBuffer _data, @NativeType("uint32_t") int _index) {
long __functionAddress = Functions.vertex_unpack;
if (CHECKS) {
check(_output, 4);
}
invokePPPV(__functionAddress, _output, _attr, _decl.address(), memAddress(_data), _index);
}
/** Array version of: {@link #bgfx_weld_vertices weld_vertices} */
@NativeType("uint16_t")
public static short bgfx_weld_vertices(@NativeType("uint16_t *") short[] _output, @NativeType("const bgfx_vertex_decl_t *") BGFXVertexDecl _decl, @NativeType("const void *") ByteBuffer _data, float _epsilon) {
long __functionAddress = Functions.weld_vertices;
return invokePPPS(__functionAddress, _output, _decl.address(), memAddress(_data), (short)_output.length, _epsilon);
}
/** Array version of: {@link #bgfx_topology_convert topology_convert} */
@NativeType("uint32_t")
public static int bgfx_topology_convert(@NativeType("bgfx_topology_convert_t") int _conversion, @Nullable @NativeType("void *") short[] _dst, @NativeType("const void *") short[] _indices, @NativeType("bool") boolean _index32) {
long __functionAddress = Functions.topology_convert;
return invokePPI(__functionAddress, _conversion, _dst, lengthSafe(_dst) << 1, _indices, _indices.length, _index32);
}
/** Array version of: {@link #bgfx_topology_convert topology_convert} */
@NativeType("uint32_t")
public static int bgfx_topology_convert(@NativeType("bgfx_topology_convert_t") int _conversion, @Nullable @NativeType("void *") int[] _dst, @NativeType("const void *") int[] _indices, @NativeType("bool") boolean _index32) {
long __functionAddress = Functions.topology_convert;
return invokePPI(__functionAddress, _conversion, _dst, lengthSafe(_dst) << 2, _indices, _indices.length, _index32);
}
/** Array version of: {@link #bgfx_topology_sort_tri_list topology_sort_tri_list} */
public static void bgfx_topology_sort_tri_list(@NativeType("bgfx_topology_sort_t") int _sort, @NativeType("void *") ByteBuffer _dst, @NativeType("const float *") float[] _dir, @NativeType("const float *") float[] _pos, @NativeType("const void *") ByteBuffer _vertices, @NativeType("uint32_t") int _stride, @NativeType("const void *") ByteBuffer _indices, @NativeType("bool") boolean _index32) {
long __functionAddress = Functions.topology_sort_tri_list;
if (CHECKS) {
check(_dir, 3);
check(_pos, 3);
}
invokePPPPPV(__functionAddress, _sort, memAddress(_dst), _dst.remaining(), _dir, _pos, memAddress(_vertices), _stride, memAddress(_indices), _indices.remaining() >> (_index32 ? 2 : 1), _index32);
}
/** Array version of: {@link #bgfx_topology_sort_tri_list topology_sort_tri_list} */
public static void bgfx_topology_sort_tri_list(@NativeType("bgfx_topology_sort_t") int _sort, @NativeType("void *") short[] _dst, @NativeType("const float *") float[] _dir, @NativeType("const float *") float[] _pos, @NativeType("const void *") ByteBuffer _vertices, @NativeType("uint32_t") int _stride, @NativeType("const void *") short[] _indices, @NativeType("bool") boolean _index32) {
long __functionAddress = Functions.topology_sort_tri_list;
if (CHECKS) {
check(_dir, 3);
check(_pos, 3);
}
invokePPPPPV(__functionAddress, _sort, _dst, _dst.length << 1, _dir, _pos, memAddress(_vertices), _stride, _indices, _indices.length, _index32);
}
/** Array version of: {@link #bgfx_topology_sort_tri_list topology_sort_tri_list} */
public static void bgfx_topology_sort_tri_list(@NativeType("bgfx_topology_sort_t") int _sort, @NativeType("void *") int[] _dst, @NativeType("const float *") float[] _dir, @NativeType("const float *") float[] _pos, @NativeType("const void *") ByteBuffer _vertices, @NativeType("uint32_t") int _stride, @NativeType("const void *") int[] _indices, @NativeType("bool") boolean _index32) {
long __functionAddress = Functions.topology_sort_tri_list;
if (CHECKS) {
check(_dir, 3);
check(_pos, 3);
}
invokePPPPPV(__functionAddress, _sort, _dst, _dst.length << 2, _dir, _pos, memAddress(_vertices), _stride, _indices, _indices.length, _index32);
}
/** Array version of: {@link #bgfx_get_supported_renderers get_supported_renderers} */
@NativeType("uint8_t")
public static byte bgfx_get_supported_renderers(@NativeType("bgfx_renderer_type_t *") int[] _enum) {
long __functionAddress = Functions.get_supported_renderers;
return invokePB(__functionAddress, (byte)_enum.length, _enum);
}
/** Array version of: {@link #bgfx_copy copy} */
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") short[] _data) {
long __functionAddress = Functions.copy;
long __result = invokePP(__functionAddress, _data, _data.length << 1);
return BGFXMemory.createSafe(__result);
}
/** Array version of: {@link #bgfx_copy copy} */
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") int[] _data) {
long __functionAddress = Functions.copy;
long __result = invokePP(__functionAddress, _data, _data.length << 2);
return BGFXMemory.createSafe(__result);
}
/** Array version of: {@link #bgfx_copy copy} */
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") long[] _data) {
long __functionAddress = Functions.copy;
long __result = invokePP(__functionAddress, _data, _data.length << 3);
return BGFXMemory.createSafe(__result);
}
/** Array version of: {@link #bgfx_copy copy} */
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") float[] _data) {
long __functionAddress = Functions.copy;
long __result = invokePP(__functionAddress, _data, _data.length << 2);
return BGFXMemory.createSafe(__result);
}
/** Array version of: {@link #bgfx_copy copy} */
@Nullable
@NativeType("const bgfx_memory_t *")
public static BGFXMemory bgfx_copy(@NativeType("const void *") double[] _data) {
long __functionAddress = Functions.copy;
long __result = invokePP(__functionAddress, _data, _data.length << 3);
return BGFXMemory.createSafe(__result);
}
/** Array version of: {@link #bgfx_get_shader_uniforms get_shader_uniforms} */
@NativeType("uint16_t")
public static short bgfx_get_shader_uniforms(@NativeType("bgfx_shader_handle_t") short _handle, @NativeType("bgfx_uniform_handle_t *") short[] _uniforms) {
long __functionAddress = Functions.get_shader_uniforms;
return invokePS(__functionAddress, _handle, _uniforms, (short)_uniforms.length);
}
/** Array version of: {@link #bgfx_read_texture read_texture} */
@NativeType("uint32_t")
public static int bgfx_read_texture(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("void *") short[] _data, @NativeType("uint8_t") int _mip) {
long __functionAddress = Functions.read_texture;
return invokePI(__functionAddress, _handle, _data, (byte)_mip);
}
/** Array version of: {@link #bgfx_read_texture read_texture} */
@NativeType("uint32_t")
public static int bgfx_read_texture(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("void *") int[] _data, @NativeType("uint8_t") int _mip) {
long __functionAddress = Functions.read_texture;
return invokePI(__functionAddress, _handle, _data, (byte)_mip);
}
/** Array version of: {@link #bgfx_read_texture read_texture} */
@NativeType("uint32_t")
public static int bgfx_read_texture(@NativeType("bgfx_texture_handle_t") short _handle, @NativeType("void *") float[] _data, @NativeType("uint8_t") int _mip) {
long __functionAddress = Functions.read_texture;
return invokePI(__functionAddress, _handle, _data, (byte)_mip);
}
/** Array version of: {@link #bgfx_create_frame_buffer_from_handles create_frame_buffer_from_handles} */
@NativeType("bgfx_frame_buffer_handle_t")
public static short bgfx_create_frame_buffer_from_handles(@NativeType("const bgfx_texture_handle_t *") short[] _handles, @NativeType("bool") boolean _destroyTextures) {
long __functionAddress = Functions.create_frame_buffer_from_handles;
return invokePS(__functionAddress, (byte)_handles.length, _handles, _destroyTextures);
}
/** Array version of: {@link #bgfx_get_result get_result} */
@NativeType("bgfx_occlusion_query_result_t")
public static int bgfx_get_result(@NativeType("bgfx_occlusion_query_handle_t") short _handle, @Nullable @NativeType("int32_t *") int[] _result) {
long __functionAddress = Functions.get_result;
if (CHECKS) {
checkSafe(_result, 1);
}
return invokePI(__functionAddress, _handle, _result);
}
/** Array version of: {@link #bgfx_set_palette_color set_palette_color} */
public static void bgfx_set_palette_color(@NativeType("uint8_t") int _index, @NativeType("const float *") float[] _rgba) {
long __functionAddress = Functions.set_palette_color;
if (CHECKS) {
check(_rgba, 4);
}
invokePV(__functionAddress, (byte)_index, _rgba);
}
/** Array version of: {@link #bgfx_set_view_transform set_view_transform} */
public static void bgfx_set_view_transform(@NativeType("bgfx_view_id_t") int _id, @Nullable @NativeType("const void *") float[] _view, @Nullable @NativeType("const void *") float[] _proj) {
long __functionAddress = Functions.set_view_transform;
if (CHECKS) {
checkSafe(_view, 64 >> 2);
checkSafe(_proj, 64 >> 2);
}
invokePPV(__functionAddress, (short)_id, _view, _proj);
}
/** Array version of: {@link #bgfx_set_view_transform_stereo set_view_transform_stereo} */
public static void bgfx_set_view_transform_stereo(@NativeType("bgfx_view_id_t") int _id, @Nullable @NativeType("const void *") float[] _view, @Nullable @NativeType("const void *") float[] _projL, @NativeType("uint8_t") int _flags, @Nullable @NativeType("const void *") float[] _projR) {
long __functionAddress = Functions.set_view_transform_stereo;
if (CHECKS) {
checkSafe(_view, 64 >> 2);
checkSafe(_projL, 64 >> 2);
checkSafe(_projR, 64 >> 2);
}
invokePPPV(__functionAddress, (short)_id, _view, _projL, (byte)_flags, _projR);
}
/** Array version of: {@link #bgfx_set_view_order set_view_order} */
public static void bgfx_set_view_order(@NativeType("bgfx_view_id_t") int _id, @NativeType("uint16_t") int _num, @Nullable @NativeType("const bgfx_view_id_t *") short[] _order) {
long __functionAddress = Functions.set_view_order;
if (CHECKS) {
checkSafe(_order, _num);
}
invokePV(__functionAddress, (short)_id, (short)_num, _order);
}
/** Array version of: {@link #bgfx_set_transform set_transform} */
@NativeType("uint32_t")
public static int bgfx_set_transform(@NativeType("const void *") float[] _mtx) {
long __functionAddress = Functions.set_transform;
return invokePI(__functionAddress, _mtx, (short)(_mtx.length >> 4));
}
/** Array version of: {@link #bgfx_set_uniform set_uniform} */
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") short[] _value, @NativeType("uint16_t") int _num) {
long __functionAddress = Functions.set_uniform;
invokePV(__functionAddress, _handle, _value, (short)_num);
}
/** Array version of: {@link #bgfx_set_uniform set_uniform} */
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") int[] _value, @NativeType("uint16_t") int _num) {
long __functionAddress = Functions.set_uniform;
invokePV(__functionAddress, _handle, _value, (short)_num);
}
/** Array version of: {@link #bgfx_set_uniform set_uniform} */
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") long[] _value, @NativeType("uint16_t") int _num) {
long __functionAddress = Functions.set_uniform;
invokePV(__functionAddress, _handle, _value, (short)_num);
}
/** Array version of: {@link #bgfx_set_uniform set_uniform} */
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") float[] _value, @NativeType("uint16_t") int _num) {
long __functionAddress = Functions.set_uniform;
invokePV(__functionAddress, _handle, _value, (short)_num);
}
/** Array version of: {@link #bgfx_set_uniform set_uniform} */
public static void bgfx_set_uniform(@NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") double[] _value, @NativeType("uint16_t") int _num) {
long __functionAddress = Functions.set_uniform;
invokePV(__functionAddress, _handle, _value, (short)_num);
}
/** Array version of: {@link #bgfx_encoder_set_transform encoder_set_transform} */
@NativeType("uint32_t")
public static int bgfx_encoder_set_transform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("const void *") float[] _mtx) {
long __functionAddress = Functions.encoder_set_transform;
if (CHECKS) {
check(_encoder);
}
return invokePPI(__functionAddress, _encoder, _mtx, (short)(_mtx.length >> 4));
}
/** Array version of: {@link #bgfx_encoder_set_uniform encoder_set_uniform} */
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") short[] _value, @NativeType("uint16_t") int _num) {
long __functionAddress = Functions.encoder_set_uniform;
if (CHECKS) {
check(_encoder);
}
invokePPV(__functionAddress, _encoder, _handle, _value, (short)_num);
}
/** Array version of: {@link #bgfx_encoder_set_uniform encoder_set_uniform} */
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") int[] _value, @NativeType("uint16_t") int _num) {
long __functionAddress = Functions.encoder_set_uniform;
if (CHECKS) {
check(_encoder);
}
invokePPV(__functionAddress, _encoder, _handle, _value, (short)_num);
}
/** Array version of: {@link #bgfx_encoder_set_uniform encoder_set_uniform} */
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") long[] _value, @NativeType("uint16_t") int _num) {
long __functionAddress = Functions.encoder_set_uniform;
if (CHECKS) {
check(_encoder);
}
invokePPV(__functionAddress, _encoder, _handle, _value, (short)_num);
}
/** Array version of: {@link #bgfx_encoder_set_uniform encoder_set_uniform} */
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") float[] _value, @NativeType("uint16_t") int _num) {
long __functionAddress = Functions.encoder_set_uniform;
if (CHECKS) {
check(_encoder);
}
invokePPV(__functionAddress, _encoder, _handle, _value, (short)_num);
}
/** Array version of: {@link #bgfx_encoder_set_uniform encoder_set_uniform} */
public static void bgfx_encoder_set_uniform(@NativeType("struct bgfx_encoder *") long _encoder, @NativeType("bgfx_uniform_handle_t") short _handle, @NativeType("const void *") double[] _value, @NativeType("uint16_t") int _num) {
long __functionAddress = Functions.encoder_set_uniform;
if (CHECKS) {
check(_encoder);
}
invokePPV(__functionAddress, _encoder, _handle, _value, (short)_num);
}
}