Class BGFX
- java.lang.Object
-
- org.lwjgl.bgfx.BGFX
-
public class BGFX extends java.lang.ObjectNative bindings to the C API of the bgfx library.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBGFX.FunctionsContains the function pointers loaded from the bgfxSharedLibrary.
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BGFXMemorybgfx_alloc(int _size)Allocates buffer to pass to bgfx calls.static voidbgfx_alloc_instance_data_buffer(BGFXInstanceDataBuffer _idb, int _num, int _stride)Allocates instance data buffer.static intbgfx_alloc_transform(BGFXTransform _transform, int _num)Reserves_nummatrices in internal matrix cache.static booleanbgfx_alloc_transient_buffers(BGFXTransientVertexBuffer _tvb, BGFXVertexLayout _layout, int _numVertices, BGFXTransientIndexBuffer _tib, int _numIndices, boolean _index32)Checks for required space and allocates transient vertex and index buffers.static voidbgfx_alloc_transient_index_buffer(BGFXTransientIndexBuffer _tib, int _num, boolean _index32)Allocates transient index buffer.static voidbgfx_alloc_transient_vertex_buffer(BGFXTransientVertexBuffer _tvb, int _num, BGFXVertexLayout _layout)Allocates transient vertex buffer.static voidbgfx_attachment_init(BGFXAttachment _this, short _handle, int _access, int _layer, int _numLayers, int _mip, int _resolve)Init attachment.static voidbgfx_blit(int _id, short _dst, int _dstMip, int _dstX, int _dstY, int _dstZ, short _src, int _srcMip, int _srcX, int _srcY, int _srcZ, int _width, int _height, int _depth)Blits texture region between two textures.static voidbgfx_calc_texture_size(BGFXTextureInfo _info, int _width, int _height, int _depth, boolean _cubeMap, boolean _hasMips, int _numLayers, int _format)Calculates amount of memory required for texture.static BGFXMemorybgfx_copy(double[] _data)Array version of:copystatic BGFXMemorybgfx_copy(float[] _data)Array version of:copystatic BGFXMemorybgfx_copy(int[] _data)Array version of:copystatic BGFXMemorybgfx_copy(long[] _data)Array version of:copystatic BGFXMemorybgfx_copy(short[] _data)Array version of:copystatic BGFXMemorybgfx_copy(java.nio.ByteBuffer _data)Allocates buffer and copies data into it.static BGFXMemorybgfx_copy(java.nio.DoubleBuffer _data)Allocates buffer and copies data into it.static BGFXMemorybgfx_copy(java.nio.FloatBuffer _data)Allocates buffer and copies data into it.static BGFXMemorybgfx_copy(java.nio.IntBuffer _data)Allocates buffer and copies data into it.static BGFXMemorybgfx_copy(java.nio.LongBuffer _data)Allocates buffer and copies data into it.static BGFXMemorybgfx_copy(java.nio.ShortBuffer _data)Allocates buffer and copies data into it.static BGFXMemorybgfx_copy(org.lwjgl.PointerBuffer _data)Allocates buffer and copies data into it.static shortbgfx_create_compute_program(short _csh, boolean _destroyShaders)Creates program with compute shader.static shortbgfx_create_dynamic_index_buffer(int _num, int _flags)Creates empty dynamic index buffer.static shortbgfx_create_dynamic_index_buffer_mem(BGFXMemory _mem, int _flags)Creates dynamic index buffer and initializes it.static shortbgfx_create_dynamic_vertex_buffer(int _num, BGFXVertexLayout _layout, int _flags)Creates empty dynamic vertex buffer.static shortbgfx_create_dynamic_vertex_buffer_mem(BGFXMemory _mem, BGFXVertexLayout _layout, int _flags)Creates dynamic vertex buffer and initializes it.static shortbgfx_create_frame_buffer(int _width, int _height, int _format, long _textureFlags)Creates frame buffer (simple).static shortbgfx_create_frame_buffer_from_attachment(BGFXAttachment.Buffer _attachment, boolean _destroyTextures)Create MRT frame buffer from texture handles with specific layer and mip level.static shortbgfx_create_frame_buffer_from_handles(short[] _handles, boolean _destroyTextures)Array version of:create_frame_buffer_from_handlesstatic shortbgfx_create_frame_buffer_from_handles(java.nio.ShortBuffer _handles, boolean _destroyTextures)Creates MRT frame buffer from texture handles (simple).static shortbgfx_create_frame_buffer_from_nwh(long _nwh, int _width, int _height, int _format, int _depthFormat)Creates frame buffer for multiple window rendering.static shortbgfx_create_frame_buffer_scaled(int _ratio, int _format, long _textureFlags)Creates frame buffer with size based on backbuffer ratio.static shortbgfx_create_index_buffer(BGFXMemory _mem, int _flags)Creates static index buffer.static shortbgfx_create_indirect_buffer(int _num)Creates draw indirect buffer.static shortbgfx_create_occlusion_query()Creates occlusion query.static shortbgfx_create_program(short _vsh, short _fsh, boolean _destroyShaders)Creates program with vertex and fragment shaders.static shortbgfx_create_shader(BGFXMemory _mem)Creates shader from memory buffer.static shortbgfx_create_texture(BGFXMemory _mem, long _flags, int _skip, BGFXTextureInfo _info)Creates texture from memory buffer.static shortbgfx_create_texture_2d(int _width, int _height, boolean _hasMips, int _numLayers, int _format, long _flags, BGFXMemory _mem)Creates 2D texture.static shortbgfx_create_texture_2d_scaled(int _ratio, boolean _hasMips, int _numLayers, int _format, long _flags)Creates texture with size based on backbuffer ratio.static shortbgfx_create_texture_3d(int _width, int _height, int _depth, boolean _hasMips, int _format, long _flags, BGFXMemory _mem)Creates 3D texture.static shortbgfx_create_texture_cube(int _size, boolean _hasMips, int _numLayers, int _format, long _flags, BGFXMemory _mem)Creates Cube texture.static shortbgfx_create_uniform(java.lang.CharSequence _name, int _type, int _num)Creates shader uniform parameter.static shortbgfx_create_uniform(java.nio.ByteBuffer _name, int _type, int _num)Creates shader uniform parameter.static shortbgfx_create_vertex_buffer(BGFXMemory _mem, BGFXVertexLayout _layout, int _flags)Creates static vertex buffer.static shortbgfx_create_vertex_layout(BGFXVertexLayout _layout)Creates a vertex layout.static voidbgfx_dbg_text_clear(int _attr, boolean _small)Clears internal debug text buffer.static voidbgfx_dbg_text_image(int _x, int _y, int _width, int _height, java.nio.ByteBuffer _data, int _pitch)Draws image into internal debug text buffer.static voidbgfx_dbg_text_printf(int _x, int _y, int _attr, java.lang.CharSequence _format)Prints into internal debug text character-buffer (VGA-compatible text mode).static voidbgfx_dbg_text_printf(int _x, int _y, int _attr, java.nio.ByteBuffer _format)Prints into internal debug text character-buffer (VGA-compatible text mode).static voidbgfx_dbg_text_vprintf(int _x, int _y, int _attr, java.lang.CharSequence _format, long _argList)Print into internal debug text character-buffer (VGA-compatible text mode).static voidbgfx_dbg_text_vprintf(int _x, int _y, int _attr, java.nio.ByteBuffer _format, long _argList)Print into internal debug text character-buffer (VGA-compatible text mode).static voidbgfx_destroy_dynamic_index_buffer(short _handle)Destroys dynamic index buffer.static voidbgfx_destroy_dynamic_vertex_buffer(short _handle)Destroys dynamic vertex buffer.static voidbgfx_destroy_frame_buffer(short _handle)Destroys frame buffer.static voidbgfx_destroy_index_buffer(short _handle)Destroys static index buffer.static voidbgfx_destroy_indirect_buffer(short _handle)Destroys draw indirect buffer.static voidbgfx_destroy_occlusion_query(short _handle)Destroys occlusion query.static voidbgfx_destroy_program(short _handle)Destroy program.static voidbgfx_destroy_shader(short _handle)Destroys shader.static voidbgfx_destroy_texture(short _handle)Destroys texture.static voidbgfx_destroy_uniform(short _handle)Destroys shader uniform parameter.static voidbgfx_destroy_vertex_buffer(short _handle)Destroys static vertex buffer.static voidbgfx_destroy_vertex_layout(short _handle)Destroys a vertex layout.static voidbgfx_discard(int _flags)Discards all previously set state for draw or compute call.static voidbgfx_dispatch(int _id, short _program, int _numX, int _numY, int _numZ, int _flags)Dispatches compute.static voidbgfx_dispatch_indirect(int _id, short _program, short _indirectHandle, int _start, int _num, int _flags)Dispatches compute indirect.static intbgfx_encoder_alloc_transform(long _this, BGFXTransform _transform, int _num)Reserves_nummatrices in internal matrix cache.static longbgfx_encoder_begin(boolean _forThread)Begin submitting draw calls from thread.static voidbgfx_encoder_blit(long _this, int _id, short _dst, int _dstMip, int _dstX, int _dstY, int _dstZ, short _src, int _srcMip, int _srcX, int _srcY, int _srcZ, int _width, int _height, int _depth)Blits texture region between two textures.static voidbgfx_encoder_discard(long _this, int _flags)Discards all previously set state for draw or compute call.static voidbgfx_encoder_dispatch(long _this, int _id, short _handle, int _numX, int _numY, int _numZ, int _flags)Dispatches compute.static voidbgfx_encoder_dispatch_indirect(long _this, int _id, short _handle, short _indirectHandle, int _start, int _num, int _flags)Dispatches compute indirect.static voidbgfx_encoder_end(long _encoder)End submitting draw calls from thread.static voidbgfx_encoder_set_compute_dynamic_index_buffer(long _this, int _stage, short _handle, int _access)Sets compute dynamic index buffer.static voidbgfx_encoder_set_compute_dynamic_vertex_buffer(long _this, int _stage, short _handle, int _access)Sets compute dynamic vertex buffer.static voidbgfx_encoder_set_compute_index_buffer(long _this, int _stage, short _handle, int _access)Sets compute index buffer.static voidbgfx_encoder_set_compute_indirect_buffer(long _this, int _stage, short _handle, int _access)Sets compute indirect buffer.static voidbgfx_encoder_set_compute_vertex_buffer(long _this, int _stage, short _handle, int _access)Sets compute vertex buffer.static voidbgfx_encoder_set_condition(long _this, short _handle, boolean _visible)Sets condition for rendering.static voidbgfx_encoder_set_dynamic_index_buffer(long _this, short _handle, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.static voidbgfx_encoder_set_dynamic_vertex_buffer(long _this, int _stream, short _handle, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.static voidbgfx_encoder_set_dynamic_vertex_buffer_with_layout(long _this, int _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.static voidbgfx_encoder_set_image(long _this, int _stage, short _handle, int _mip, int _access, int _format)Sets compute image from texture.static voidbgfx_encoder_set_index_buffer(long _this, short _handle, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.static voidbgfx_encoder_set_instance_count(long _this, int _numInstances)Sets number of instances for auto generated instances use in conjuction withgl_InstanceID.static voidbgfx_encoder_set_instance_data_buffer(long _this, BGFXInstanceDataBuffer _idb, int _start, int _num)Sets instance data buffer for draw primitive.static voidbgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(long _this, short _handle, int _start, int _num)Set instance data buffer for draw primitive.static voidbgfx_encoder_set_instance_data_from_vertex_buffer(long _this, short _handle, int _start, int _num)Set instance data buffer for draw primitive.static voidbgfx_encoder_set_marker(long _this, java.lang.CharSequence _marker)Sets debug marker.static voidbgfx_encoder_set_marker(long _this, java.nio.ByteBuffer _marker)Sets debug marker.static shortbgfx_encoder_set_scissor(long _this, int _x, int _y, int _width, int _height)Sets scissor for draw primitive.static voidbgfx_encoder_set_scissor_cached(long _this, int _cache)Sets scissor from cache for draw primitive.static voidbgfx_encoder_set_state(long _this, long _state, int _rgba)Sets render states for draw primitive.static voidbgfx_encoder_set_stencil(long _this, int _fstencil, int _bstencil)Sets stencil test state.static voidbgfx_encoder_set_texture(long _this, int _stage, short _sampler, short _handle, int _flags)Sets texture stage for draw primitive.static intbgfx_encoder_set_transform(long _this, float[] _mtx)Array version of:encoder_set_transformstatic intbgfx_encoder_set_transform(long _this, java.nio.ByteBuffer _mtx)Sets model matrix for draw primitive.static intbgfx_encoder_set_transform(long _this, java.nio.FloatBuffer _mtx)Sets model matrix for draw primitive.static voidbgfx_encoder_set_transform_cached(long _this, int _cache, int _num)Sets model matrix from matrix cache for draw primitive.static voidbgfx_encoder_set_transient_index_buffer(long _this, BGFXTransientIndexBuffer _tib, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.static voidbgfx_encoder_set_transient_vertex_buffer(long _this, int _stream, BGFXTransientVertexBuffer _tvb, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.static voidbgfx_encoder_set_transient_vertex_buffer_with_layout(long _this, int _stream, BGFXTransientVertexBuffer _tvb, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.static voidbgfx_encoder_set_uniform(long _this, short _handle, double[] _value, int _num)Array version of:encoder_set_uniformstatic voidbgfx_encoder_set_uniform(long _this, short _handle, float[] _value, int _num)Array version of:encoder_set_uniformstatic voidbgfx_encoder_set_uniform(long _this, short _handle, int[] _value, int _num)Array version of:encoder_set_uniformstatic voidbgfx_encoder_set_uniform(long _this, short _handle, long[] _value, int _num)Array version of:encoder_set_uniformstatic voidbgfx_encoder_set_uniform(long _this, short _handle, short[] _value, int _num)Array version of:encoder_set_uniformstatic voidbgfx_encoder_set_uniform(long _this, short _handle, java.nio.ByteBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_encoder_set_uniform(long _this, short _handle, java.nio.DoubleBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_encoder_set_uniform(long _this, short _handle, java.nio.FloatBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_encoder_set_uniform(long _this, short _handle, java.nio.IntBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_encoder_set_uniform(long _this, short _handle, java.nio.LongBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_encoder_set_uniform(long _this, short _handle, java.nio.ShortBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_encoder_set_vertex_buffer(long _this, int _stream, short _handle, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.static voidbgfx_encoder_set_vertex_buffer_with_layout(long _this, int _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.static voidbgfx_encoder_set_vertex_count(long _this, int _numVertices)Set number of vertices for auto generated vertices use in conjunction withgl_VertexID.static voidbgfx_encoder_submit(long _this, int _id, short _handle, int _depth, int _flags)Submits primitive for rendering.static voidbgfx_encoder_submit_indirect(long _this, int _id, short _handle, short _indirectHandle, int _start, int _num, int _depth, int _flags)Submits primitive for rendering with index and instance data info from indirect buffer.static voidbgfx_encoder_submit_occlusion_query(long _this, int _id, short _program, short _occlusionQuery, int _depth, int _flags)Submits primitive with occlusion query for rendering.static voidbgfx_encoder_touch(long _this, int _id)Submits an empty primitive for rendering.static intbgfx_frame(boolean _capture)Advances to next frame.static intbgfx_get_avail_instance_data_buffer(int _num, int _stride)Returns number of requested or maximum available instance buffer slots.static intbgfx_get_avail_transient_index_buffer(int _num, boolean _index32)Returns number of requested or maximum available indices.static intbgfx_get_avail_transient_vertex_buffer(int _num, BGFXVertexLayout _layout)Returns number of requested or maximum available vertices.static BGFXCapsbgfx_get_caps()Returns renderer capabilities.static longbgfx_get_direct_access_ptr(short _handle)Returns texture direct access pointer.static java.lang.Stringbgfx_get_renderer_name(int _type)Returns name of renderer.static intbgfx_get_renderer_type()Returns current renderer backend API type.static intbgfx_get_result(short _handle, int[] _result)Array version of:get_resultstatic intbgfx_get_result(short _handle, java.nio.IntBuffer _result)Retrieves occlusion query result from previous frame.static shortbgfx_get_shader_uniforms(short _handle, short[] _uniforms)Array version of:get_shader_uniformsstatic shortbgfx_get_shader_uniforms(short _handle, java.nio.ShortBuffer _uniforms)Returns the number of uniforms and uniform handles used inside shader.static BGFXStatsbgfx_get_stats()Returns performance counters.static bytebgfx_get_supported_renderers(int[] _enum)Array version of:get_supported_renderersstatic bytebgfx_get_supported_renderers(java.nio.IntBuffer _enum)Returns supported backend API renderers.static shortbgfx_get_texture(short _handle, int _attachment)Obtains texture handle of frame buffer attachment.static voidbgfx_get_uniform_info(short _handle, BGFXUniformInfo _info)Retrieves uniform info.static booleanBGFX_HANDLE_IS_VALID(short h)static booleanbgfx_init(BGFXInit _init)Initializes bgfx library.static voidbgfx_init_ctor(BGFXInit _init)Updates the specified initialization parameters with default values.static booleanbgfx_is_frame_buffer_valid(int _num, BGFXAttachment _attachment)Validate frame buffer parameters.static booleanbgfx_is_texture_valid(int _depth, boolean _cubeMap, int _numLayers, int _format, long _flags)Validate texture parameters.static BGFXMemorybgfx_make_ref(java.nio.ByteBuffer _data)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref(java.nio.DoubleBuffer _data)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref(java.nio.FloatBuffer _data)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref(java.nio.IntBuffer _data)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref(java.nio.LongBuffer _data)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref(java.nio.ShortBuffer _data)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref(org.lwjgl.PointerBuffer _data)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref_release(java.nio.ByteBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref_release(java.nio.DoubleBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref_release(java.nio.FloatBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref_release(java.nio.IntBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref_release(java.nio.LongBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref_release(java.nio.ShortBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData)Makes reference to data to pass to bgfx.static BGFXMemorybgfx_make_ref_release(org.lwjgl.PointerBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData)Makes reference to data to pass to bgfx.static intbgfx_read_texture(short _handle, float[] _data, int _mip)Array version of:read_texturestatic intbgfx_read_texture(short _handle, int[] _data, int _mip)Array version of:read_texturestatic intbgfx_read_texture(short _handle, short[] _data, int _mip)Array version of:read_texturestatic intbgfx_read_texture(short _handle, java.nio.ByteBuffer _data, int _mip)Reads back texture content.static intbgfx_read_texture(short _handle, java.nio.FloatBuffer _data, int _mip)Reads back texture content.static intbgfx_read_texture(short _handle, java.nio.IntBuffer _data, int _mip)Reads back texture content.static intbgfx_read_texture(short _handle, java.nio.ShortBuffer _data, int _mip)Reads back texture content.static voidbgfx_request_screen_shot(short _handle, java.lang.CharSequence _filePath)Requests screen shot.static voidbgfx_request_screen_shot(short _handle, java.nio.ByteBuffer _filePath)Requests screen shot.static voidbgfx_reset(int _width, int _height, int _flags, int _format)Resets graphic settings and back-buffer size.static voidbgfx_reset_view(int _id)Reset all view settings to default.static intBGFX_SAMPLER_BORDER_COLOR(int _index)static voidbgfx_set_compute_dynamic_index_buffer(int _stage, short _handle, int _access)Sets compute dynamic index buffer.static voidbgfx_set_compute_dynamic_vertex_buffer(int _stage, short _handle, int _access)Sets compute dynamic vertex buffer.static voidbgfx_set_compute_index_buffer(int _stage, short _handle, int _access)Sets compute index buffer.static voidbgfx_set_compute_indirect_buffer(int _stage, short _handle, int _access)Sets compute indirect buffer.static voidbgfx_set_compute_vertex_buffer(int _stage, short _handle, int _access)Sets compute vertex buffer.static voidbgfx_set_condition(short _handle, boolean _visible)Sets condition for rendering.static voidbgfx_set_debug(int _debug)Sets debug flags.static voidbgfx_set_dynamic_index_buffer(short _handle, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.static voidbgfx_set_dynamic_vertex_buffer(int _stream, short _handle, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.static voidbgfx_set_dynamic_vertex_buffer_with_layout(int _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.static voidbgfx_set_frame_buffer_name(short _handle, java.lang.CharSequence _name)Set frame buffer debug name.static voidbgfx_set_frame_buffer_name(short _handle, java.nio.ByteBuffer _name)Set frame buffer debug name.static voidbgfx_set_image(int _stage, short _handle, int _mip, int _access, int _format)Sets compute image from texture.static voidbgfx_set_index_buffer(short _handle, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.static voidbgfx_set_index_buffer_name(short _handle, java.lang.CharSequence _name)Set static index buffer debug name.static voidbgfx_set_index_buffer_name(short _handle, java.nio.ByteBuffer _name)Set static index buffer debug name.static voidbgfx_set_instance_count(int _numInstances)Sets number of instances for auto generated instances use in conjunction withgl_InstanceID.static voidbgfx_set_instance_data_buffer(BGFXInstanceDataBuffer _idb, int _start, int _num)Sets instance data buffer for draw primitive.static voidbgfx_set_instance_data_from_dynamic_vertex_buffer(short _handle, int _start, int _num)Set instance data buffer for draw primitive.static voidbgfx_set_instance_data_from_vertex_buffer(short _handle, int _start, int _num)Set instance data buffer for draw primitive.static voidbgfx_set_marker(java.lang.CharSequence _marker)Sets debug marker.static voidbgfx_set_marker(java.nio.ByteBuffer _marker)Sets debug marker.static voidbgfx_set_palette_color(int _index, float[] _rgba)Array version of:set_palette_colorstatic voidbgfx_set_palette_color(int _index, java.nio.FloatBuffer _rgba)Sets palette color value.static voidbgfx_set_palette_color_rgba8(int _index, int _rgba)Sets palette color value.static shortbgfx_set_scissor(int _x, int _y, int _width, int _height)Sets scissor for draw primitive.static voidbgfx_set_scissor_cached(int _cache)Sets scissor from cache for draw primitive.static voidbgfx_set_shader_name(short _handle, java.lang.CharSequence _name)Sets shader debug name.static voidbgfx_set_shader_name(short _handle, java.nio.ByteBuffer _name)Sets shader debug name.static voidbgfx_set_state(long _state, int _rgba)Sets render states for draw primitive.static voidbgfx_set_stencil(int _fstencil, int _bstencil)Sets stencil test state.static voidbgfx_set_texture(int _stage, short _sampler, short _handle, int _flags)Sets texture stage for draw primitive.static voidbgfx_set_texture_name(short _handle, java.lang.CharSequence _name)Sets texture debug name.static voidbgfx_set_texture_name(short _handle, java.nio.ByteBuffer _name)Sets texture debug name.static intbgfx_set_transform(float[] _mtx)Array version of:set_transformstatic intbgfx_set_transform(java.nio.ByteBuffer _mtx)Sets model matrix for draw primitive.static intbgfx_set_transform(java.nio.FloatBuffer _mtx)Sets model matrix for draw primitive.static voidbgfx_set_transform_cached(int _cache, int _num)Sets model matrix from matrix cache for draw primitive.static voidbgfx_set_transient_index_buffer(BGFXTransientIndexBuffer _tib, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.static voidbgfx_set_transient_vertex_buffer(int _stream, BGFXTransientVertexBuffer _tvb, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.static voidbgfx_set_transient_vertex_buffer_with_layout(int _stream, BGFXTransientVertexBuffer _tvb, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.static voidbgfx_set_uniform(short _handle, double[] _value, int _num)Array version of:set_uniformstatic voidbgfx_set_uniform(short _handle, float[] _value, int _num)Array version of:set_uniformstatic voidbgfx_set_uniform(short _handle, int[] _value, int _num)Array version of:set_uniformstatic voidbgfx_set_uniform(short _handle, long[] _value, int _num)Array version of:set_uniformstatic voidbgfx_set_uniform(short _handle, short[] _value, int _num)Array version of:set_uniformstatic voidbgfx_set_uniform(short _handle, java.nio.ByteBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_set_uniform(short _handle, java.nio.DoubleBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_set_uniform(short _handle, java.nio.FloatBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_set_uniform(short _handle, java.nio.IntBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_set_uniform(short _handle, java.nio.LongBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_set_uniform(short _handle, java.nio.ShortBuffer _value, int _num)Sets shader uniform parameter for draw primitive.static voidbgfx_set_vertex_buffer(int _stream, short _handle, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.static voidbgfx_set_vertex_buffer_name(short _handle, java.lang.CharSequence _name)Set static vertex buffer debug name.static voidbgfx_set_vertex_buffer_name(short _handle, java.nio.ByteBuffer _name)Set static vertex buffer debug name.static voidbgfx_set_vertex_buffer_with_layout(int _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.static voidbgfx_set_vertex_count(int _numVertices)Set number of vertices for auto generated vertices use in conjunction withgl_VertexID.static voidbgfx_set_view_clear(int _id, int _flags, int _rgba, float _depth, int _stencil)Sets view clear flags.static voidbgfx_set_view_clear_mrt(int _id, int _flags, float _depth, int _stencil, byte _0, byte _1, byte _2, byte _3, byte _4, byte _5, byte _6, byte _7)Sets view clear flags with different clear color for each frame buffer texture.static voidbgfx_set_view_frame_buffer(int _id, short _handle)Sets view frame buffer.static voidbgfx_set_view_mode(int _id, int _mode)Sets view sorting mode.static voidbgfx_set_view_name(int _id, java.lang.CharSequence _name)Sets view name.static voidbgfx_set_view_name(int _id, java.nio.ByteBuffer _name)Sets view name.static voidbgfx_set_view_order(int _id, int _num, short[] _order)Array version of:set_view_orderstatic voidbgfx_set_view_order(int _id, int _num, java.nio.ShortBuffer _order)Post submit view reordering.static voidbgfx_set_view_rect(int _id, int _x, int _y, int _width, int _height)Sets view rectangle.static voidbgfx_set_view_rect_ratio(int _id, int _x, int _y, int _ratio)Sets view rectangle.static voidbgfx_set_view_scissor(int _id, int _x, int _y, int _width, int _height)Sets view scissor.static voidbgfx_set_view_transform(int _id, float[] _view, float[] _proj)Array version of:set_view_transformstatic voidbgfx_set_view_transform(int _id, java.nio.ByteBuffer _view, java.nio.ByteBuffer _proj)Sets view view and projection matrices, all draw primitives in this view will use these matrices.static voidbgfx_set_view_transform(int _id, java.nio.FloatBuffer _view, java.nio.FloatBuffer _proj)Sets view view and projection matrices, all draw primitives in this view will use these matrices.static voidbgfx_shutdown()Shuts down bgfx library.static longBGFX_STATE_ALPHA_REF(long _ref)static longBGFX_STATE_BLEND_EQUATION(long _equation)static longBGFX_STATE_BLEND_EQUATION_SEPARATE(long _rgb, long _a)static longBGFX_STATE_BLEND_FUNC(long _src, long _dst)static longBGFX_STATE_BLEND_FUNC_RT_1(long _src, long _dst)static longBGFX_STATE_BLEND_FUNC_RT_1E(long _src, long _dst, long _equation)static longBGFX_STATE_BLEND_FUNC_RT_2(long _src, long _dst)static longBGFX_STATE_BLEND_FUNC_RT_2E(long _src, long _dst, long _equation)static longBGFX_STATE_BLEND_FUNC_RT_3(long _src, long _dst)static longBGFX_STATE_BLEND_FUNC_RT_3E(long _src, long _dst, long _equation)static longBGFX_STATE_BLEND_FUNC_RT_x(long _src, long _dst)static longBGFX_STATE_BLEND_FUNC_RT_xE(long _src, long _dst, long _equation)static longBGFX_STATE_BLEND_FUNC_SEPARATE(long _srcRGB, long _dstRGB, long _srcA, long _dstA)static longBGFX_STATE_POINT_SIZE(long _size)static intBGFX_STENCIL_FUNC_REF(int _ref)static intBGFX_STENCIL_FUNC_RMASK(int _mask)static voidbgfx_submit(int _id, short _program, int _depth, int _flags)Submits primitive for rendering.static voidbgfx_submit_indirect(int _id, short _program, short _indirectHandle, int _start, int _num, int _depth, int _flags)Submits primitive for rendering with index and instance data info from indirect buffer.static voidbgfx_submit_occlusion_query(int _id, short _program, short _occlusionQuery, int _depth, int _flags)Submits primitive with occlusion query for rendering.static intbgfx_topology_convert(int _conversion, int[] _dst, int[] _indices, boolean _index32)Array version of:topology_convertstatic intbgfx_topology_convert(int _conversion, short[] _dst, short[] _indices, boolean _index32)Array version of:topology_convertstatic intbgfx_topology_convert(int _conversion, java.nio.ByteBuffer _dst, java.nio.ByteBuffer _indices, boolean _index32)Converts index buffer for use with different primitive topologies.static intbgfx_topology_convert(int _conversion, java.nio.IntBuffer _dst, java.nio.IntBuffer _indices, boolean _index32)Converts index buffer for use with different primitive topologies.static intbgfx_topology_convert(int _conversion, java.nio.ShortBuffer _dst, java.nio.ShortBuffer _indices, boolean _index32)Converts index buffer for use with different primitive topologies.static voidbgfx_topology_sort_tri_list(int _sort, int[] _dst, float[] _dir, float[] _pos, java.nio.ByteBuffer _vertices, int _stride, int[] _indices, boolean _index32)Array version of:topology_sort_tri_liststatic voidbgfx_topology_sort_tri_list(int _sort, short[] _dst, float[] _dir, float[] _pos, java.nio.ByteBuffer _vertices, int _stride, short[] _indices, boolean _index32)Array version of:topology_sort_tri_liststatic voidbgfx_topology_sort_tri_list(int _sort, java.nio.ByteBuffer _dst, float[] _dir, float[] _pos, java.nio.ByteBuffer _vertices, int _stride, java.nio.ByteBuffer _indices, boolean _index32)Array version of:topology_sort_tri_liststatic voidbgfx_topology_sort_tri_list(int _sort, java.nio.ByteBuffer _dst, java.nio.FloatBuffer _dir, java.nio.FloatBuffer _pos, java.nio.ByteBuffer _vertices, int _stride, java.nio.ByteBuffer _indices, boolean _index32)Sorts indices.static voidbgfx_topology_sort_tri_list(int _sort, java.nio.IntBuffer _dst, java.nio.FloatBuffer _dir, java.nio.FloatBuffer _pos, java.nio.ByteBuffer _vertices, int _stride, java.nio.IntBuffer _indices, boolean _index32)Sorts indices.static voidbgfx_topology_sort_tri_list(int _sort, java.nio.ShortBuffer _dst, java.nio.FloatBuffer _dir, java.nio.FloatBuffer _pos, java.nio.ByteBuffer _vertices, int _stride, java.nio.ShortBuffer _indices, boolean _index32)Sorts indices.static voidbgfx_touch(int _id)Submits an empty primitive for rendering.static voidbgfx_update_dynamic_index_buffer(short _handle, int _startIndex, BGFXMemory _mem)Updates dynamic index buffer.static voidbgfx_update_dynamic_vertex_buffer(short _handle, int _startVertex, BGFXMemory _mem)Updates dynamic vertex buffer.static voidbgfx_update_texture_2d(short _handle, int _layer, int _mip, int _x, int _y, int _width, int _height, BGFXMemory _mem, int _pitch)Updates 2D texture.static voidbgfx_update_texture_3d(short _handle, int _mip, int _x, int _y, int _z, int _width, int _height, int _depth, BGFXMemory _mem)Updates 3D texture.static voidbgfx_update_texture_cube(short _handle, int _layer, byte _side, int _mip, int _x, int _y, int _width, int _height, BGFXMemory _mem, int _pitch)Updates Cube texture.static voidbgfx_vertex_convert(BGFXVertexLayout _dstLayout, java.nio.ByteBuffer _dstData, BGFXVertexLayout _srcLayout, java.nio.ByteBuffer _srcData, int _num)Converts vertex stream data from one vertex stream format to another.static BGFXVertexLayoutbgfx_vertex_layout_add(BGFXVertexLayout _this, int _attrib, int _num, int _type, boolean _normalized, boolean _asInt)Adds attribute to a vertex layout.static BGFXVertexLayoutbgfx_vertex_layout_begin(BGFXVertexLayout _this, int _renderer)Start a vertex layout.static voidbgfx_vertex_layout_decode(BGFXVertexLayout _this, int _attrib, java.nio.ByteBuffer _num, int[] _type, java.nio.ByteBuffer _normalized, java.nio.ByteBuffer _asInt)Array version of:vertex_layout_decodestatic voidbgfx_vertex_layout_decode(BGFXVertexLayout _this, int _attrib, java.nio.ByteBuffer _num, java.nio.IntBuffer _type, java.nio.ByteBuffer _normalized, java.nio.ByteBuffer _asInt)Decodes attribute.static voidbgfx_vertex_layout_end(BGFXVertexLayout _this)Ends a vertex layout.static booleanbgfx_vertex_layout_has(BGFXVertexLayout _this, int _attr)Returns true if_thiscontains attribute.static BGFXVertexLayoutbgfx_vertex_layout_skip(BGFXVertexLayout _this, int _num)Skips_numbytes in vertex stream.static voidbgfx_vertex_pack(float[] _input, boolean _inputNormalized, int _attr, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, int _index)Array version of:vertex_packstatic voidbgfx_vertex_pack(java.nio.FloatBuffer _input, boolean _inputNormalized, int _attr, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, int _index)Packs vertex attribute into vertex stream format.static voidbgfx_vertex_unpack(float[] _output, int _attr, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, int _index)Array version of:vertex_unpackstatic voidbgfx_vertex_unpack(java.nio.FloatBuffer _output, int _attr, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, int _index)Unpacks vertex attribute from vertex stream format.static intbgfx_weld_vertices(int[] _output, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, boolean _index32, float _epsilon)Array version of:weld_verticesstatic intbgfx_weld_vertices(short[] _output, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, boolean _index32, float _epsilon)Array version of:weld_verticesstatic intbgfx_weld_vertices(java.nio.ByteBuffer _output, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, boolean _index32, float _epsilon)Welds vertices.static intbgfx_weld_vertices(java.nio.IntBuffer _output, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, boolean _index32, float _epsilon)Welds vertices.static intbgfx_weld_vertices(java.nio.ShortBuffer _output, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, boolean _index32, float _epsilon)Welds vertices.static org.lwjgl.system.SharedLibrarygetLibrary()Returns the bgfxSharedLibrary.static longnbgfx_alloc(int _size)Unsafe version of:allocstatic voidnbgfx_alloc_instance_data_buffer(long _idb, int _num, short _stride)Unsafe version of:alloc_instance_data_bufferstatic intnbgfx_alloc_transform(long _transform, short _num)Unsafe version of:alloc_transformstatic booleannbgfx_alloc_transient_buffers(long _tvb, long _layout, int _numVertices, long _tib, int _numIndices, boolean _index32)Unsafe version of:alloc_transient_buffersstatic voidnbgfx_alloc_transient_index_buffer(long _tib, int _num, boolean _index32)Unsafe version of:alloc_transient_index_bufferstatic voidnbgfx_alloc_transient_vertex_buffer(long _tvb, int _num, long _layout)Unsafe version of:alloc_transient_vertex_bufferstatic voidnbgfx_attachment_init(long _this, short _handle, int _access, short _layer, short _numLayers, short _mip, byte _resolve)Unsafe version of:attachment_initstatic voidnbgfx_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)Unsafe version of:blitstatic voidnbgfx_calc_texture_size(long _info, short _width, short _height, short _depth, boolean _cubeMap, boolean _hasMips, short _numLayers, int _format)Unsafe version of:calc_texture_sizestatic longnbgfx_copy(long _data, int _size)Unsafe version of:copystatic shortnbgfx_create_dynamic_index_buffer(int _num, short _flags)Unsafe version of:create_dynamic_index_bufferstatic shortnbgfx_create_dynamic_index_buffer_mem(long _mem, short _flags)Unsafe version of:create_dynamic_index_buffer_memstatic shortnbgfx_create_dynamic_vertex_buffer(int _num, long _layout, short _flags)Unsafe version of:create_dynamic_vertex_bufferstatic shortnbgfx_create_dynamic_vertex_buffer_mem(long _mem, long _layout, short _flags)Unsafe version of:create_dynamic_vertex_buffer_memstatic shortnbgfx_create_frame_buffer(short _width, short _height, int _format, long _textureFlags)Unsafe version of:create_frame_bufferstatic shortnbgfx_create_frame_buffer_from_attachment(byte _num, long _attachment, boolean _destroyTextures)Unsafe version of:create_frame_buffer_from_attachmentstatic shortnbgfx_create_frame_buffer_from_handles(byte _num, long _handles, boolean _destroyTextures)Unsafe version of:create_frame_buffer_from_handlesstatic shortnbgfx_create_frame_buffer_from_nwh(long _nwh, short _width, short _height, int _format, int _depthFormat)Unsafe version of:create_frame_buffer_from_nwhstatic shortnbgfx_create_index_buffer(long _mem, short _flags)Unsafe version of:create_index_bufferstatic shortnbgfx_create_shader(long _mem)Unsafe version of:create_shaderstatic shortnbgfx_create_texture(long _mem, long _flags, byte _skip, long _info)Unsafe version of:create_texturestatic shortnbgfx_create_texture_2d(short _width, short _height, boolean _hasMips, short _numLayers, int _format, long _flags, long _mem)Unsafe version of:create_texture_2dstatic shortnbgfx_create_texture_2d_scaled(int _ratio, boolean _hasMips, short _numLayers, int _format, long _flags)Unsafe version of:create_texture_2d_scaledstatic shortnbgfx_create_texture_3d(short _width, short _height, short _depth, boolean _hasMips, int _format, long _flags, long _mem)Unsafe version of:create_texture_3dstatic shortnbgfx_create_texture_cube(short _size, boolean _hasMips, short _numLayers, int _format, long _flags, long _mem)Unsafe version of:create_texture_cubestatic shortnbgfx_create_uniform(long _name, int _type, short _num)Unsafe version of:create_uniformstatic shortnbgfx_create_vertex_buffer(long _mem, long _layout, short _flags)Unsafe version of:create_vertex_bufferstatic shortnbgfx_create_vertex_layout(long _layout)Unsafe version of:create_vertex_layoutstatic voidnbgfx_dbg_text_clear(byte _attr, boolean _small)Unsafe version of:dbg_text_clearstatic voidnbgfx_dbg_text_image(short _x, short _y, short _width, short _height, long _data, short _pitch)Unsafe version of:dbg_text_imagestatic voidnbgfx_dbg_text_printf(short _x, short _y, byte _attr, long _format)Unsafe version of:dbg_text_printfstatic voidnbgfx_dbg_text_vprintf(short _x, short _y, byte _attr, long _format, long _argList)Unsafe version of:dbg_text_vprintfstatic voidnbgfx_discard(byte _flags)Unsafe version of:discardstatic voidnbgfx_dispatch(short _id, short _program, int _numX, int _numY, int _numZ, byte _flags)Unsafe version of:dispatchstatic voidnbgfx_dispatch_indirect(short _id, short _program, short _indirectHandle, short _start, short _num, byte _flags)Unsafe version of:dispatch_indirectstatic intnbgfx_encoder_alloc_transform(long _this, long _transform, short _num)Unsafe version of:encoder_alloc_transformstatic voidnbgfx_encoder_blit(long _this, 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)Unsafe version of:encoder_blitstatic voidnbgfx_encoder_discard(long _this, byte _flags)Unsafe version of:encoder_discardstatic voidnbgfx_encoder_dispatch(long _this, short _id, short _handle, int _numX, int _numY, int _numZ, byte _flags)Unsafe version of:encoder_dispatchstatic voidnbgfx_encoder_dispatch_indirect(long _this, short _id, short _handle, short _indirectHandle, short _start, short _num, byte _flags)Unsafe version of:encoder_dispatch_indirectstatic voidnbgfx_encoder_set_compute_dynamic_index_buffer(long _this, byte _stage, short _handle, int _access)Unsafe version of:encoder_set_compute_dynamic_index_bufferstatic voidnbgfx_encoder_set_compute_dynamic_vertex_buffer(long _this, byte _stage, short _handle, int _access)Unsafe version of:encoder_set_compute_dynamic_vertex_bufferstatic voidnbgfx_encoder_set_compute_index_buffer(long _this, byte _stage, short _handle, int _access)Unsafe version of:encoder_set_compute_index_bufferstatic voidnbgfx_encoder_set_compute_indirect_buffer(long _this, byte _stage, short _handle, int _access)Unsafe version of:encoder_set_compute_indirect_bufferstatic voidnbgfx_encoder_set_compute_vertex_buffer(long _this, byte _stage, short _handle, int _access)Unsafe version of:encoder_set_compute_vertex_bufferstatic voidnbgfx_encoder_set_dynamic_vertex_buffer(long _this, byte _stream, short _handle, int _startVertex, int _numVertices)Unsafe version of:encoder_set_dynamic_vertex_bufferstatic voidnbgfx_encoder_set_dynamic_vertex_buffer_with_layout(long _this, byte _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:encoder_set_dynamic_vertex_buffer_with_layoutstatic voidnbgfx_encoder_set_image(long _this, byte _stage, short _handle, byte _mip, int _access, int _format)Unsafe version of:encoder_set_imagestatic voidnbgfx_encoder_set_instance_data_buffer(long _this, long _idb, int _start, int _num)Unsafe version of:encoder_set_instance_data_bufferstatic voidnbgfx_encoder_set_marker(long _this, long _marker)Unsafe version of:encoder_set_markerstatic shortnbgfx_encoder_set_scissor(long _this, short _x, short _y, short _width, short _height)Unsafe version of:encoder_set_scissorstatic voidnbgfx_encoder_set_scissor_cached(long _this, short _cache)Unsafe version of:encoder_set_scissor_cachedstatic voidnbgfx_encoder_set_texture(long _this, byte _stage, short _sampler, short _handle, int _flags)Unsafe version of:encoder_set_texturestatic intnbgfx_encoder_set_transform(long _this, long _mtx, short _num)Unsafe version of:encoder_set_transformstatic voidnbgfx_encoder_set_transform_cached(long _this, int _cache, short _num)Unsafe version of:encoder_set_transform_cachedstatic voidnbgfx_encoder_set_transient_index_buffer(long _this, long _tib, int _firstIndex, int _numIndices)Unsafe version of:encoder_set_transient_index_bufferstatic voidnbgfx_encoder_set_transient_vertex_buffer(long _this, byte _stream, long _tvb, int _startVertex, int _numVertices)Unsafe version of:encoder_set_transient_vertex_bufferstatic voidnbgfx_encoder_set_transient_vertex_buffer_with_layout(long _this, byte _stream, long _tvb, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:encoder_set_transient_vertex_buffer_with_layoutstatic voidnbgfx_encoder_set_uniform(long _this, short _handle, long _value, short _num)Unsafe version of:encoder_set_uniformstatic voidnbgfx_encoder_set_vertex_buffer(long _this, byte _stream, short _handle, int _startVertex, int _numVertices)Unsafe version of:encoder_set_vertex_bufferstatic voidnbgfx_encoder_set_vertex_buffer_with_layout(long _this, byte _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:encoder_set_vertex_buffer_with_layoutstatic voidnbgfx_encoder_submit(long _this, short _id, short _handle, int _depth, byte _flags)Unsafe version of:encoder_submitstatic voidnbgfx_encoder_submit_indirect(long _this, short _id, short _handle, short _indirectHandle, short _start, short _num, int _depth, byte _flags)Unsafe version of:encoder_submit_indirectstatic voidnbgfx_encoder_submit_occlusion_query(long _this, short _id, short _program, short _occlusionQuery, int _depth, byte _flags)Unsafe version of:encoder_submit_occlusion_querystatic voidnbgfx_encoder_touch(long _this, short _id)Unsafe version of:encoder_touchstatic intnbgfx_get_avail_instance_data_buffer(int _num, short _stride)Unsafe version of:get_avail_instance_data_bufferstatic intnbgfx_get_avail_transient_vertex_buffer(int _num, long _layout)Unsafe version of:get_avail_transient_vertex_bufferstatic longnbgfx_get_caps()Unsafe version of:get_capsstatic longnbgfx_get_renderer_name(int _type)Unsafe version of:get_renderer_namestatic intnbgfx_get_result(short _handle, long _result)Unsafe version of:get_resultstatic shortnbgfx_get_shader_uniforms(short _handle, long _uniforms, short _max)Unsafe version of:get_shader_uniformsstatic longnbgfx_get_stats()Unsafe version of:get_statsstatic bytenbgfx_get_supported_renderers(byte _max, long _enum)Unsafe version of:get_supported_renderersstatic shortnbgfx_get_texture(short _handle, byte _attachment)Unsafe version of:get_texturestatic voidnbgfx_get_uniform_info(short _handle, long _info)Unsafe version of:get_uniform_infostatic booleannbgfx_init(long _init)Unsafe version of:initstatic voidnbgfx_init_ctor(long _init)Unsafe version of:init_ctorstatic booleannbgfx_is_frame_buffer_valid(byte _num, long _attachment)Unsafe version of:is_frame_buffer_validstatic booleannbgfx_is_texture_valid(short _depth, boolean _cubeMap, short _numLayers, int _format, long _flags)Unsafe version of:is_texture_validstatic longnbgfx_make_ref(long _data, int _size)Unsafe version of:make_refstatic longnbgfx_make_ref_release(long _data, int _size, long _releaseFn, long _userData)Unsafe version of:make_ref_releasestatic intnbgfx_read_texture(short _handle, long _data, byte _mip)Unsafe version of:read_texturestatic voidnbgfx_request_screen_shot(short _handle, long _filePath)Unsafe version of:request_screen_shotstatic voidnbgfx_reset_view(short _id)Unsafe version of:reset_viewstatic voidnbgfx_set_compute_dynamic_index_buffer(byte _stage, short _handle, int _access)Unsafe version of:set_compute_dynamic_index_bufferstatic voidnbgfx_set_compute_dynamic_vertex_buffer(byte _stage, short _handle, int _access)Unsafe version of:set_compute_dynamic_vertex_bufferstatic voidnbgfx_set_compute_index_buffer(byte _stage, short _handle, int _access)Unsafe version of:set_compute_index_bufferstatic voidnbgfx_set_compute_indirect_buffer(byte _stage, short _handle, int _access)Unsafe version of:set_compute_indirect_bufferstatic voidnbgfx_set_compute_vertex_buffer(byte _stage, short _handle, int _access)Unsafe version of:set_compute_vertex_bufferstatic voidnbgfx_set_dynamic_vertex_buffer(byte _stream, short _handle, int _startVertex, int _numVertices)Unsafe version of:set_dynamic_vertex_bufferstatic voidnbgfx_set_dynamic_vertex_buffer_with_layout(byte _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:set_dynamic_vertex_buffer_with_layoutstatic voidnbgfx_set_frame_buffer_name(short _handle, long _name, int _len)Unsafe version of:set_frame_buffer_namestatic voidnbgfx_set_image(byte _stage, short _handle, byte _mip, int _access, int _format)Unsafe version of:set_imagestatic voidnbgfx_set_index_buffer_name(short _handle, long _name, int _len)Unsafe version of:set_index_buffer_namestatic voidnbgfx_set_instance_data_buffer(long _idb, int _start, int _num)Unsafe version of:set_instance_data_bufferstatic voidnbgfx_set_marker(long _marker)Unsafe version of:set_markerstatic voidnbgfx_set_palette_color(byte _index, long _rgba)Unsafe version of:set_palette_colorstatic voidnbgfx_set_palette_color_rgba8(byte _index, int _rgba)Unsafe version of:set_palette_color_rgba8static shortnbgfx_set_scissor(short _x, short _y, short _width, short _height)Unsafe version of:set_scissorstatic voidnbgfx_set_scissor_cached(short _cache)Unsafe version of:set_scissor_cachedstatic voidnbgfx_set_shader_name(short _handle, long _name, int _len)Unsafe version of:set_shader_namestatic voidnbgfx_set_texture(byte _stage, short _sampler, short _handle, int _flags)Unsafe version of:set_texturestatic voidnbgfx_set_texture_name(short _handle, long _name, int _len)Unsafe version of:set_texture_namestatic intnbgfx_set_transform(long _mtx, short _num)Unsafe version of:set_transformstatic voidnbgfx_set_transform_cached(int _cache, short _num)Unsafe version of:set_transform_cachedstatic voidnbgfx_set_transient_index_buffer(long _tib, int _firstIndex, int _numIndices)Unsafe version of:set_transient_index_bufferstatic voidnbgfx_set_transient_vertex_buffer(byte _stream, long _tvb, int _startVertex, int _numVertices)Unsafe version of:set_transient_vertex_bufferstatic voidnbgfx_set_transient_vertex_buffer_with_layout(byte _stream, long _tvb, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:set_transient_vertex_buffer_with_layoutstatic voidnbgfx_set_uniform(short _handle, long _value, short _num)Unsafe version of:set_uniformstatic voidnbgfx_set_vertex_buffer(byte _stream, short _handle, int _startVertex, int _numVertices)Unsafe version of:set_vertex_bufferstatic voidnbgfx_set_vertex_buffer_name(short _handle, long _name, int _len)Unsafe version of:set_vertex_buffer_namestatic voidnbgfx_set_vertex_buffer_with_layout(byte _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:set_vertex_buffer_with_layoutstatic voidnbgfx_set_view_clear(short _id, short _flags, int _rgba, float _depth, byte _stencil)Unsafe version of:set_view_clearstatic voidnbgfx_set_view_clear_mrt(short _id, short _flags, float _depth, byte _stencil, byte _0, byte _1, byte _2, byte _3, byte _4, byte _5, byte _6, byte _7)Unsafe version of:set_view_clear_mrtstatic voidnbgfx_set_view_frame_buffer(short _id, short _handle)Unsafe version of:set_view_frame_bufferstatic voidnbgfx_set_view_mode(short _id, int _mode)Unsafe version of:set_view_modestatic voidnbgfx_set_view_name(short _id, long _name)Unsafe version of:set_view_namestatic voidnbgfx_set_view_order(short _id, short _num, long _order)Unsafe version of:set_view_orderstatic voidnbgfx_set_view_rect(short _id, short _x, short _y, short _width, short _height)Unsafe version of:set_view_rectstatic voidnbgfx_set_view_rect_ratio(short _id, short _x, short _y, int _ratio)Unsafe version of:set_view_rect_ratiostatic voidnbgfx_set_view_scissor(short _id, short _x, short _y, short _width, short _height)Unsafe version of:set_view_scissorstatic voidnbgfx_set_view_transform(short _id, long _view, long _proj)Unsafe version of:set_view_transformstatic voidnbgfx_submit(short _id, short _program, int _depth, byte _flags)Unsafe version of:submitstatic voidnbgfx_submit_indirect(short _id, short _program, short _indirectHandle, short _start, short _num, int _depth, byte _flags)Unsafe version of:submit_indirectstatic voidnbgfx_submit_occlusion_query(short _id, short _program, short _occlusionQuery, int _depth, byte _flags)Unsafe version of:submit_occlusion_querystatic intnbgfx_topology_convert(int _conversion, long _dst, int _dstSize, long _indices, int _numIndices, boolean _index32)Unsafe version of:topology_convertstatic voidnbgfx_topology_sort_tri_list(int _sort, long _dst, int _dstSize, long _dir, long _pos, long _vertices, int _stride, long _indices, int _numIndices, boolean _index32)Unsafe version of:topology_sort_tri_liststatic voidnbgfx_touch(short _id)Unsafe version of:touchstatic voidnbgfx_update_dynamic_index_buffer(short _handle, int _startIndex, long _mem)Unsafe version of:update_dynamic_index_bufferstatic voidnbgfx_update_dynamic_vertex_buffer(short _handle, int _startVertex, long _mem)Unsafe version of:update_dynamic_vertex_bufferstatic voidnbgfx_update_texture_2d(short _handle, short _layer, byte _mip, short _x, short _y, short _width, short _height, long _mem, short _pitch)Unsafe version of:update_texture_2dstatic voidnbgfx_update_texture_3d(short _handle, byte _mip, short _x, short _y, short _z, short _width, short _height, short _depth, long _mem)Unsafe version of:update_texture_3dstatic voidnbgfx_update_texture_cube(short _handle, short _layer, byte _side, byte _mip, short _x, short _y, short _width, short _height, long _mem, short _pitch)Unsafe version of:update_texture_cubestatic voidnbgfx_vertex_convert(long _dstLayout, long _dstData, long _srcLayout, long _srcData, int _num)Unsafe version of:vertex_convertstatic longnbgfx_vertex_layout_add(long _this, int _attrib, byte _num, int _type, boolean _normalized, boolean _asInt)Unsafe version of:vertex_layout_addstatic longnbgfx_vertex_layout_begin(long _this, int _renderer)Unsafe version of:vertex_layout_beginstatic voidnbgfx_vertex_layout_decode(long _this, int _attrib, long _num, long _type, long _normalized, long _asInt)Unsafe version of:vertex_layout_decodestatic voidnbgfx_vertex_layout_end(long _this)Unsafe version of:vertex_layout_endstatic booleannbgfx_vertex_layout_has(long _this, int _attr)Unsafe version of:vertex_layout_hasstatic longnbgfx_vertex_layout_skip(long _this, byte _num)Unsafe version of:vertex_layout_skipstatic voidnbgfx_vertex_pack(long _input, boolean _inputNormalized, int _attr, long _layout, long _data, int _index)Unsafe version of:vertex_packstatic voidnbgfx_vertex_unpack(long _output, int _attr, long _layout, long _data, int _index)Unsafe version of:vertex_unpackstatic intnbgfx_weld_vertices(long _output, long _layout, long _data, int _num, boolean _index32, float _epsilon)Unsafe version of:weld_vertices
-
-
-
Field Detail
-
BGFX_API_VERSION
API version
-
BGFX_INVALID_HANDLE
Invalid handle
-
BGFX_STATE_WRITE_R, BGFX_STATE_WRITE_G, BGFX_STATE_WRITE_B, BGFX_STATE_WRITE_A, BGFX_STATE_WRITE_Z, BGFX_STATE_WRITE_RGB, BGFX_STATE_WRITE_MASK, BGFX_STATE_DEPTH_TEST_LESS, BGFX_STATE_DEPTH_TEST_LEQUAL, BGFX_STATE_DEPTH_TEST_EQUAL, BGFX_STATE_DEPTH_TEST_GEQUAL, BGFX_STATE_DEPTH_TEST_GREATER, BGFX_STATE_DEPTH_TEST_NOTEQUAL, BGFX_STATE_DEPTH_TEST_NEVER, BGFX_STATE_DEPTH_TEST_ALWAYS, BGFX_STATE_BLEND_ZERO, BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_SRC_COLOR, BGFX_STATE_BLEND_INV_SRC_COLOR, BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA, BGFX_STATE_BLEND_DST_ALPHA, BGFX_STATE_BLEND_INV_DST_ALPHA, BGFX_STATE_BLEND_DST_COLOR, BGFX_STATE_BLEND_INV_DST_COLOR, BGFX_STATE_BLEND_SRC_ALPHA_SAT, BGFX_STATE_BLEND_FACTOR, BGFX_STATE_BLEND_INV_FACTOR, BGFX_STATE_BLEND_EQUATION_ADD, BGFX_STATE_BLEND_EQUATION_SUB, BGFX_STATE_BLEND_EQUATION_REVSUB, BGFX_STATE_BLEND_EQUATION_MIN, BGFX_STATE_BLEND_EQUATION_MAX, BGFX_STATE_CULL_CW, BGFX_STATE_CULL_CCW, BGFX_STATE_PT_TRISTRIP, BGFX_STATE_PT_LINES, BGFX_STATE_PT_LINESTRIP, BGFX_STATE_PT_POINTS, BGFX_STATE_MSAA, BGFX_STATE_LINEAA, BGFX_STATE_CONSERVATIVE_RASTER, BGFX_STATE_NONE, BGFX_STATE_FRONT_CCW, BGFX_STATE_BLEND_INDEPENDENT, BGFX_STATE_BLEND_ALPHA_TO_COVERAGE, BGFX_STATE_DEFAULT, BGFX_STATE_DEPTH_TEST_MASK, BGFX_STATE_BLEND_MASK, BGFX_STATE_BLEND_EQUATION_MASK, BGFX_STATE_CULL_MASK, BGFX_STATE_ALPHA_REF_MASK, BGFX_STATE_PT_MASK, BGFX_STATE_POINT_SIZE_MASK, BGFX_STATE_RESERVED_MASK, BGFX_STATE_MASK, BGFX_STATE_DEPTH_TEST_SHIFT, BGFX_STATE_BLEND_SHIFT, BGFX_STATE_BLEND_EQUATION_SHIFT, BGFX_STATE_CULL_SHIFT, BGFX_STATE_ALPHA_REF_SHIFT, BGFX_STATE_PT_SHIFT, BGFX_STATE_POINT_SIZE_SHIFT, BGFX_STATE_RESERVED_SHIFT
State
-
BGFX_STENCIL_TEST_LESS, BGFX_STENCIL_TEST_LEQUAL, BGFX_STENCIL_TEST_EQUAL, BGFX_STENCIL_TEST_GEQUAL, BGFX_STENCIL_TEST_GREATER, BGFX_STENCIL_TEST_NOTEQUAL, BGFX_STENCIL_TEST_NEVER, BGFX_STENCIL_TEST_ALWAYS, BGFX_STENCIL_OP_FAIL_S_ZERO, BGFX_STENCIL_OP_FAIL_S_KEEP, BGFX_STENCIL_OP_FAIL_S_REPLACE, BGFX_STENCIL_OP_FAIL_S_INCR, BGFX_STENCIL_OP_FAIL_S_INCRSAT, BGFX_STENCIL_OP_FAIL_S_DECR, BGFX_STENCIL_OP_FAIL_S_DECRSAT, BGFX_STENCIL_OP_FAIL_S_INVERT, BGFX_STENCIL_OP_FAIL_Z_ZERO, BGFX_STENCIL_OP_FAIL_Z_KEEP, BGFX_STENCIL_OP_FAIL_Z_REPLACE, BGFX_STENCIL_OP_FAIL_Z_INCR, BGFX_STENCIL_OP_FAIL_Z_INCRSAT, BGFX_STENCIL_OP_FAIL_Z_DECR, BGFX_STENCIL_OP_FAIL_Z_DECRSAT, BGFX_STENCIL_OP_FAIL_Z_INVERT, BGFX_STENCIL_OP_PASS_Z_ZERO, BGFX_STENCIL_OP_PASS_Z_KEEP, BGFX_STENCIL_OP_PASS_Z_REPLACE, BGFX_STENCIL_OP_PASS_Z_INCR, BGFX_STENCIL_OP_PASS_Z_INCRSAT, BGFX_STENCIL_OP_PASS_Z_DECR, BGFX_STENCIL_OP_PASS_Z_DECRSAT, BGFX_STENCIL_OP_PASS_Z_INVERT, BGFX_STENCIL_NONE, BGFX_STENCIL_DEFAULT, BGFX_STENCIL_FUNC_REF_SHIFT, BGFX_STENCIL_FUNC_REF_MASK, BGFX_STENCIL_FUNC_RMASK_SHIFT, BGFX_STENCIL_FUNC_RMASK_MASK, BGFX_STENCIL_TEST_SHIFT, BGFX_STENCIL_TEST_MASK, BGFX_STENCIL_OP_FAIL_S_SHIFT, BGFX_STENCIL_OP_FAIL_S_MASK, BGFX_STENCIL_OP_FAIL_Z_SHIFT, BGFX_STENCIL_OP_FAIL_Z_MASK, BGFX_STENCIL_OP_PASS_Z_SHIFT, BGFX_STENCIL_OP_PASS_Z_MASK, BGFX_STENCIL_MASK
Stencil
-
BGFX_CLEAR_NONE, BGFX_CLEAR_COLOR, BGFX_CLEAR_DEPTH, BGFX_CLEAR_STENCIL, BGFX_CLEAR_DISCARD_COLOR_0, BGFX_CLEAR_DISCARD_COLOR_1, BGFX_CLEAR_DISCARD_COLOR_2, BGFX_CLEAR_DISCARD_COLOR_3, BGFX_CLEAR_DISCARD_COLOR_4, BGFX_CLEAR_DISCARD_COLOR_5, BGFX_CLEAR_DISCARD_COLOR_6, BGFX_CLEAR_DISCARD_COLOR_7, BGFX_CLEAR_DISCARD_DEPTH, BGFX_CLEAR_DISCARD_STENCIL, BGFX_CLEAR_DISCARD_COLOR_MASK, BGFX_CLEAR_DISCARD_MASK
Clear
-
BGFX_DISCARD_NONE, BGFX_DISCARD_BINDINGS, BGFX_DISCARD_INDEX_BUFFER, BGFX_DISCARD_INSTANCE_DATA, BGFX_DISCARD_STATE, BGFX_DISCARD_TRANSFORM, BGFX_DISCARD_VERTEX_STREAMS, BGFX_DISCARD_ALL
Rendering state discard.When state is preserved in submit, rendering states can be discarded on a finer grain.
-
BGFX_DEBUG_NONE, BGFX_DEBUG_WIREFRAME, BGFX_DEBUG_IFH, BGFX_DEBUG_STATS, BGFX_DEBUG_TEXT, BGFX_DEBUG_PROFILER
DebugEnum values:
DEBUG_NONEDEBUG_WIREFRAME- Wireframe rendering. All rendering primitives will be rendered as lines.DEBUG_IFH- Enable infinitely fast hardware test. No draw calls will be submitted to driver. It's useful when profiling to quickly assess bottleneck between CPU and GPU.DEBUG_STATS- Display internal statistics.DEBUG_TEXT- Display debug text.DEBUG_PROFILER- Enable profiler.This causes per-view statistics to be collected, available through
BGFXViewStats. This is unrelated to the profiler functions inBGFXCallbackInterface.
-
BGFX_BUFFER_NONE, BGFX_BUFFER_COMPUTE_READ, BGFX_BUFFER_COMPUTE_WRITE, BGFX_BUFFER_DRAW_INDIRECT, BGFX_BUFFER_ALLOW_RESIZE, BGFX_BUFFER_INDEX32, BGFX_BUFFER_COMPUTE_READ_WRITE
Buffer creation flags
-
BGFX_BUFFER_COMPUTE_FORMAT_8x1, BGFX_BUFFER_COMPUTE_FORMAT_8x2, BGFX_BUFFER_COMPUTE_FORMAT_8x4, BGFX_BUFFER_COMPUTE_FORMAT_16x1, BGFX_BUFFER_COMPUTE_FORMAT_16x2, BGFX_BUFFER_COMPUTE_FORMAT_16x4, BGFX_BUFFER_COMPUTE_FORMAT_32x1, BGFX_BUFFER_COMPUTE_FORMAT_32x2, BGFX_BUFFER_COMPUTE_FORMAT_32x4, BGFX_BUFFER_COMPUTE_FORMAT_SHIFT, BGFX_BUFFER_COMPUTE_FORMAT_MASK, BGFX_BUFFER_COMPUTE_TYPE_INT, BGFX_BUFFER_COMPUTE_TYPE_UINT, BGFX_BUFFER_COMPUTE_TYPE_FLOAT, BGFX_BUFFER_COMPUTE_TYPE_SHIFT, BGFX_BUFFER_COMPUTE_TYPE_MASK
Buffer
-
BGFX_TEXTURE_NONE, BGFX_TEXTURE_MSAA_SAMPLE, BGFX_TEXTURE_RT, BGFX_TEXTURE_RT_MSAA_X2, BGFX_TEXTURE_RT_MSAA_X4, BGFX_TEXTURE_RT_MSAA_X8, BGFX_TEXTURE_RT_MSAA_X16, BGFX_TEXTURE_RT_WRITE_ONLY, BGFX_TEXTURE_COMPUTE_WRITE, BGFX_TEXTURE_SRGB, BGFX_TEXTURE_BLIT_DST, BGFX_TEXTURE_READ_BACK
Texture creation flags.
-
BGFX_TEXTURE_RT_MSAA_SHIFT
Texture shifts.
-
BGFX_TEXTURE_RT_MSAA_MASK, BGFX_TEXTURE_RT_MASK
Texture masks.
-
BGFX_SAMPLER_NONE, BGFX_SAMPLER_U_MIRROR, BGFX_SAMPLER_U_CLAMP, BGFX_SAMPLER_U_BORDER, BGFX_SAMPLER_V_MIRROR, BGFX_SAMPLER_V_CLAMP, BGFX_SAMPLER_V_BORDER, BGFX_SAMPLER_W_MIRROR, BGFX_SAMPLER_W_CLAMP, BGFX_SAMPLER_W_BORDER, BGFX_SAMPLER_UVW_MIRROR, BGFX_SAMPLER_UVW_CLAMP, BGFX_SAMPLER_UVW_BORDER, BGFX_SAMPLER_MIN_POINT, BGFX_SAMPLER_MIN_ANISOTROPIC, BGFX_SAMPLER_MAG_POINT, BGFX_SAMPLER_MAG_ANISOTROPIC, BGFX_SAMPLER_MIP_POINT, BGFX_SAMPLER_POINT, BGFX_SAMPLER_COMPARE_LESS, BGFX_SAMPLER_COMPARE_LEQUAL, BGFX_SAMPLER_COMPARE_EQUAL, BGFX_SAMPLER_COMPARE_GEQUAL, BGFX_SAMPLER_COMPARE_GREATER, BGFX_SAMPLER_COMPARE_NOTEQUAL, BGFX_SAMPLER_COMPARE_NEVER, BGFX_SAMPLER_COMPARE_ALWAYS, BGFX_SAMPLER_SAMPLE_STENCIL
Sample flags.
-
BGFX_SAMPLER_U_SHIFT, BGFX_SAMPLER_U_MASK, BGFX_SAMPLER_V_SHIFT, BGFX_SAMPLER_V_MASK, BGFX_SAMPLER_W_SHIFT, BGFX_SAMPLER_W_MASK, BGFX_SAMPLER_MIN_SHIFT, BGFX_SAMPLER_MIN_MASK, BGFX_SAMPLER_MAG_SHIFT, BGFX_SAMPLER_MAG_MASK, BGFX_SAMPLER_MIP_SHIFT, BGFX_SAMPLER_MIP_MASK, BGFX_SAMPLER_COMPARE_SHIFT, BGFX_SAMPLER_COMPARE_MASK, BGFX_SAMPLER_BORDER_COLOR_SHIFT, BGFX_SAMPLER_BORDER_COLOR_MASK, BGFX_SAMPLER_RESERVED_SHIFT, BGFX_SAMPLER_RESERVED_MASK, BGFX_SAMPLER_SAMPLER_BITS_MASK
Sampler shifts/masks
-
BGFX_RESET_NONE, BGFX_RESET_FULLSCREEN, BGFX_RESET_FULLSCREEN_SHIFT, BGFX_RESET_FULLSCREEN_MASK, BGFX_RESET_MSAA_X2, BGFX_RESET_MSAA_X4, BGFX_RESET_MSAA_X8, BGFX_RESET_MSAA_X16, BGFX_RESET_MSAA_SHIFT, BGFX_RESET_MSAA_MASK, BGFX_RESET_VSYNC, BGFX_RESET_MAXANISOTROPY, BGFX_RESET_CAPTURE, BGFX_RESET_FLUSH_AFTER_RENDER, BGFX_RESET_FLIP_AFTER_RENDER, BGFX_RESET_SRGB_BACKBUFFER, BGFX_RESET_HDR10, BGFX_RESET_HIDPI, BGFX_RESET_DEPTH_CLAMP, BGFX_RESET_SUSPEND, BGFX_RESET_RESERVED_SHIFT, BGFX_RESET_RESERVED_MASK
Reset
-
BGFX_CAPS_ALPHA_TO_COVERAGE, BGFX_CAPS_BLEND_INDEPENDENT, BGFX_CAPS_COMPUTE, BGFX_CAPS_CONSERVATIVE_RASTER, BGFX_CAPS_DRAW_INDIRECT, BGFX_CAPS_FRAGMENT_DEPTH, BGFX_CAPS_FRAGMENT_ORDERING, BGFX_CAPS_GRAPHICS_DEBUGGER, BGFX_CAPS_HDR10, BGFX_CAPS_HIDPI, BGFX_CAPS_IMAGE_RW, BGFX_CAPS_INDEX32, BGFX_CAPS_INSTANCING, BGFX_CAPS_OCCLUSION_QUERY, BGFX_CAPS_RENDERER_MULTITHREADED, BGFX_CAPS_SWAP_CHAIN, BGFX_CAPS_TEXTURE_2D_ARRAY, BGFX_CAPS_TEXTURE_3D, BGFX_CAPS_TEXTURE_BLIT, BGFX_CAPS_TEXTURE_COMPARE_RESERVED, BGFX_CAPS_TEXTURE_COMPARE_LEQUAL, BGFX_CAPS_TEXTURE_COMPARE_ALL, BGFX_CAPS_TEXTURE_CUBE_ARRAY, BGFX_CAPS_TEXTURE_DIRECT_ACCESS, BGFX_CAPS_TEXTURE_READ_BACK, BGFX_CAPS_VERTEX_ATTRIB_HALF, BGFX_CAPS_VERTEX_ATTRIB_UINT10, BGFX_CAPS_VERTEX_ID, BGFX_CAPS_VIEWPORT_LAYER_ARRAY
Caps
-
BGFX_CAPS_FORMAT_TEXTURE_NONE, BGFX_CAPS_FORMAT_TEXTURE_2D, BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB, BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED, BGFX_CAPS_FORMAT_TEXTURE_3D, BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB, BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED, BGFX_CAPS_FORMAT_TEXTURE_CUBE, BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB, BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED, BGFX_CAPS_FORMAT_TEXTURE_VERTEX, BGFX_CAPS_FORMAT_TEXTURE_IMAGE_READ, BGFX_CAPS_FORMAT_TEXTURE_IMAGE_WRITE, BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER, BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA, BGFX_CAPS_FORMAT_TEXTURE_MSAA, BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN
Format caps
-
BGFX_RESOLVE_NONE, BGFX_RESOLVE_AUTO_GEN_MIPS
Resolve flags.
-
BGFX_PCI_ID_NONE, BGFX_PCI_ID_SOFTWARE_RASTERIZER, BGFX_PCI_ID_AMD, BGFX_PCI_ID_APPLE, BGFX_PCI_ID_INTEL, BGFX_PCI_ID_NVIDIA, BGFX_PCI_ID_MICROSOFT
PCI
-
BGFX_CUBE_MAP_POSITIVE_X, BGFX_CUBE_MAP_NEGATIVE_X, BGFX_CUBE_MAP_POSITIVE_Y, BGFX_CUBE_MAP_NEGATIVE_Y, BGFX_CUBE_MAP_POSITIVE_Z, BGFX_CUBE_MAP_NEGATIVE_Z
Cubemap
-
BGFX_FATAL_DEBUG_CHECK, BGFX_FATAL_INVALID_SHADER, BGFX_FATAL_UNABLE_TO_INITIALIZE, BGFX_FATAL_UNABLE_TO_CREATE_TEXTURE, BGFX_FATAL_DEVICE_LOST, BGFX_FATAL_COUNT
Fatal errors (bgfx_fatal_t).Enum values:
-
BGFX_RENDERER_TYPE_NOOP, BGFX_RENDERER_TYPE_AGC, BGFX_RENDERER_TYPE_DIRECT3D9, BGFX_RENDERER_TYPE_DIRECT3D11, BGFX_RENDERER_TYPE_DIRECT3D12, BGFX_RENDERER_TYPE_GNM, BGFX_RENDERER_TYPE_METAL, BGFX_RENDERER_TYPE_NVN, BGFX_RENDERER_TYPE_OPENGLES, BGFX_RENDERER_TYPE_OPENGL, BGFX_RENDERER_TYPE_VULKAN, BGFX_BGFX_RENDERER_TYPE_WEBGPU, BGFX_RENDERER_TYPE_COUNT
Renderer backend type. (bgfx_renderer_type_t)Enum values:
RENDERER_TYPE_NOOP- No rendering.RENDERER_TYPE_AGC- AGCRENDERER_TYPE_DIRECT3D9- Direct3D 9.0RENDERER_TYPE_DIRECT3D11- Direct3D 11.0RENDERER_TYPE_DIRECT3D12- Direct3D 12.0RENDERER_TYPE_GNM- GNMRENDERER_TYPE_METAL- MetalRENDERER_TYPE_NVN- NvnRENDERER_TYPE_OPENGLES- OpenGL ES 2.0+RENDERER_TYPE_OPENGL- OpenGL 2.1+RENDERER_TYPE_VULKAN- VulkanBGFX_RENDERER_TYPE_WEBGPU- WebGPURENDERER_TYPE_COUNT
-
BGFX_ACCESS_READ, BGFX_ACCESS_WRITE, BGFX_ACCESS_READWRITE, BGFX_ACCESS_COUNT
Access mode (bgfx_access_t)Enum values:
ACCESS_READ- ReadACCESS_WRITE- WriteACCESS_READWRITE- Read and writeACCESS_COUNT
-
BGFX_ATTRIB_POSITION, BGFX_ATTRIB_NORMAL, BGFX_ATTRIB_TANGENT, BGFX_ATTRIB_BITANGENT, BGFX_ATTRIB_COLOR0, BGFX_ATTRIB_COLOR1, BGFX_ATTRIB_COLOR2, BGFX_ATTRIB_COLOR3, BGFX_ATTRIB_INDICES, BGFX_ATTRIB_WEIGHT, BGFX_ATTRIB_TEXCOORD0, BGFX_ATTRIB_TEXCOORD1, BGFX_ATTRIB_TEXCOORD2, BGFX_ATTRIB_TEXCOORD3, BGFX_ATTRIB_TEXCOORD4, BGFX_ATTRIB_TEXCOORD5, BGFX_ATTRIB_TEXCOORD6, BGFX_ATTRIB_TEXCOORD7, BGFX_ATTRIB_COUNT
Vertex attribute (bgfx_attrib_t).Enum values:
-
BGFX_ATTRIB_TYPE_UINT8, BGFX_ATTRIB_TYPE_UINT10, BGFX_ATTRIB_TYPE_INT16, BGFX_ATTRIB_TYPE_HALF, BGFX_ATTRIB_TYPE_FLOAT, BGFX_ATTRIB_TYPE_COUNT
Vertex attribute type (bgfx_attrib_type_t).Enum values:
ATTRIB_TYPE_UINT8- Uint8ATTRIB_TYPE_UINT10- Uint10, availability depends on:CAPS_VERTEX_ATTRIB_UINT10.ATTRIB_TYPE_INT16- Int16ATTRIB_TYPE_HALF- Half, availability depends on:CAPS_VERTEX_ATTRIB_HALF`.ATTRIB_TYPE_FLOAT- FloatATTRIB_TYPE_COUNT
-
BGFX_TEXTURE_FORMAT_BC1, BGFX_TEXTURE_FORMAT_BC2, BGFX_TEXTURE_FORMAT_BC3, BGFX_TEXTURE_FORMAT_BC4, BGFX_TEXTURE_FORMAT_BC5, BGFX_TEXTURE_FORMAT_BC6H, BGFX_TEXTURE_FORMAT_BC7, BGFX_TEXTURE_FORMAT_ETC1, BGFX_TEXTURE_FORMAT_ETC2, BGFX_TEXTURE_FORMAT_ETC2A, BGFX_TEXTURE_FORMAT_ETC2A1, BGFX_TEXTURE_FORMAT_PTC12, BGFX_TEXTURE_FORMAT_PTC14, BGFX_TEXTURE_FORMAT_PTC12A, BGFX_TEXTURE_FORMAT_PTC14A, BGFX_TEXTURE_FORMAT_PTC22, BGFX_TEXTURE_FORMAT_PTC24, BGFX_TEXTURE_FORMAT_ATC, BGFX_TEXTURE_FORMAT_ATCE, BGFX_TEXTURE_FORMAT_ATCI, BGFX_TEXTURE_FORMAT_ASTC4x4, BGFX_TEXTURE_FORMAT_ASTC5x5, BGFX_TEXTURE_FORMAT_ASTC6x6, BGFX_TEXTURE_FORMAT_ASTC8x5, BGFX_TEXTURE_FORMAT_ASTC8x6, BGFX_TEXTURE_FORMAT_ASTC10x5, BGFX_TEXTURE_FORMAT_UNKNOWN, BGFX_TEXTURE_FORMAT_R1, BGFX_TEXTURE_FORMAT_A8, BGFX_TEXTURE_FORMAT_R8, BGFX_TEXTURE_FORMAT_R8I, BGFX_TEXTURE_FORMAT_R8U, BGFX_TEXTURE_FORMAT_R8S, BGFX_TEXTURE_FORMAT_R16, BGFX_TEXTURE_FORMAT_R16I, BGFX_TEXTURE_FORMAT_R16U, BGFX_TEXTURE_FORMAT_R16F, BGFX_TEXTURE_FORMAT_R16S, BGFX_TEXTURE_FORMAT_R32I, BGFX_TEXTURE_FORMAT_R32U, BGFX_TEXTURE_FORMAT_R32F, BGFX_TEXTURE_FORMAT_RG8, BGFX_TEXTURE_FORMAT_RG8I, BGFX_TEXTURE_FORMAT_RG8U, BGFX_TEXTURE_FORMAT_RG8S, BGFX_TEXTURE_FORMAT_RG16, BGFX_TEXTURE_FORMAT_RG16I, BGFX_TEXTURE_FORMAT_RG16U, BGFX_TEXTURE_FORMAT_RG16F, BGFX_TEXTURE_FORMAT_RG16S, BGFX_TEXTURE_FORMAT_RG32I, BGFX_TEXTURE_FORMAT_RG32U, BGFX_TEXTURE_FORMAT_RG32F, BGFX_TEXTURE_FORMAT_RGB8, BGFX_TEXTURE_FORMAT_RGB8I, BGFX_TEXTURE_FORMAT_RGB8U, BGFX_TEXTURE_FORMAT_RGB8S, BGFX_TEXTURE_FORMAT_RGB9E5F, BGFX_TEXTURE_FORMAT_BGRA8, BGFX_TEXTURE_FORMAT_RGBA8, BGFX_TEXTURE_FORMAT_RGBA8I, BGFX_TEXTURE_FORMAT_RGBA8U, BGFX_TEXTURE_FORMAT_RGBA8S, BGFX_TEXTURE_FORMAT_RGBA16, BGFX_TEXTURE_FORMAT_RGBA16I, BGFX_TEXTURE_FORMAT_RGBA16U, BGFX_TEXTURE_FORMAT_RGBA16F, BGFX_TEXTURE_FORMAT_RGBA16S, BGFX_TEXTURE_FORMAT_RGBA32I, BGFX_TEXTURE_FORMAT_RGBA32U, BGFX_TEXTURE_FORMAT_RGBA32F, BGFX_TEXTURE_FORMAT_R5G6B5, BGFX_TEXTURE_FORMAT_RGBA4, BGFX_TEXTURE_FORMAT_RGB5A1, BGFX_TEXTURE_FORMAT_RGB10A2, BGFX_TEXTURE_FORMAT_RG11B10F, BGFX_TEXTURE_FORMAT_UNKNOWN_DEPTH, BGFX_TEXTURE_FORMAT_D16, BGFX_TEXTURE_FORMAT_D24, BGFX_TEXTURE_FORMAT_D24S8, BGFX_TEXTURE_FORMAT_D32, BGFX_TEXTURE_FORMAT_D16F, BGFX_TEXTURE_FORMAT_D24F, BGFX_TEXTURE_FORMAT_D32F, BGFX_TEXTURE_FORMAT_D0S8, BGFX_TEXTURE_FORMAT_COUNT
Texture format (bgfx_texture_format_t). Notation:RGBA16S ^ ^ ^ | | +-- [ ]Unorm | | [F]loat | | [S]norm | | [I]nt | | [U]int | +---- Number of bits per component +-------- ComponentsAvailability depends on Caps.
Enum values:
TEXTURE_FORMAT_BC1- DXT1 R5G6B5A1TEXTURE_FORMAT_BC2- DXT3 R5G6B5A4TEXTURE_FORMAT_BC3- DXT5 R5G6B5A8TEXTURE_FORMAT_BC4- LATC1/ATI1 R8TEXTURE_FORMAT_BC5- LATC2/ATI2 RG8TEXTURE_FORMAT_BC6H- BC6H RGB16FTEXTURE_FORMAT_BC7- BC7 RGB 4-7 bits per color channel, 0-8 bits alphaTEXTURE_FORMAT_ETC1- ETC1 RGB8TEXTURE_FORMAT_ETC2- ETC2 RGB8TEXTURE_FORMAT_ETC2A- ETC2 RGBA8TEXTURE_FORMAT_ETC2A1- ETC2 RGB8A1TEXTURE_FORMAT_PTC12- PVRTC1 RGB 2BPPTEXTURE_FORMAT_PTC14- PVRTC1 RGB 4BPPTEXTURE_FORMAT_PTC12A- PVRTC1 RGBA 2BPPTEXTURE_FORMAT_PTC14A- PVRTC1 RGBA 4BPPTEXTURE_FORMAT_PTC22- PVRTC2 RGBA 2BPPTEXTURE_FORMAT_PTC24- PVRTC2 RGBA 4BPPTEXTURE_FORMAT_ATC- ATC RGB 4BPPTEXTURE_FORMAT_ATCE- ATCE RGBA 8 BPP explicit alphaTEXTURE_FORMAT_ATCI- ATCI RGBA 8 BPP interpolated alphaTEXTURE_FORMAT_ASTC4x4- ASTC 4x4 8.0 BPPTEXTURE_FORMAT_ASTC5x5- ASTC 5x5 5.12 BPPTEXTURE_FORMAT_ASTC6x6- ASTC 6x6 3.56 BPPTEXTURE_FORMAT_ASTC8x5- ASTC 8x5 3.20 BPPTEXTURE_FORMAT_ASTC8x6- ASTC 8x6 2.67 BPPTEXTURE_FORMAT_ASTC10x5- ASTC 10x5 2.56 BPPTEXTURE_FORMAT_UNKNOWNTEXTURE_FORMAT_R1TEXTURE_FORMAT_A8TEXTURE_FORMAT_R8TEXTURE_FORMAT_R8ITEXTURE_FORMAT_R8UTEXTURE_FORMAT_R8STEXTURE_FORMAT_R16TEXTURE_FORMAT_R16ITEXTURE_FORMAT_R16UTEXTURE_FORMAT_R16FTEXTURE_FORMAT_R16STEXTURE_FORMAT_R32ITEXTURE_FORMAT_R32UTEXTURE_FORMAT_R32FTEXTURE_FORMAT_RG8TEXTURE_FORMAT_RG8ITEXTURE_FORMAT_RG8UTEXTURE_FORMAT_RG8STEXTURE_FORMAT_RG16TEXTURE_FORMAT_RG16ITEXTURE_FORMAT_RG16UTEXTURE_FORMAT_RG16FTEXTURE_FORMAT_RG16STEXTURE_FORMAT_RG32ITEXTURE_FORMAT_RG32UTEXTURE_FORMAT_RG32FTEXTURE_FORMAT_RGB8TEXTURE_FORMAT_RGB8ITEXTURE_FORMAT_RGB8UTEXTURE_FORMAT_RGB8STEXTURE_FORMAT_RGB9E5FTEXTURE_FORMAT_BGRA8TEXTURE_FORMAT_RGBA8TEXTURE_FORMAT_RGBA8ITEXTURE_FORMAT_RGBA8UTEXTURE_FORMAT_RGBA8STEXTURE_FORMAT_RGBA16TEXTURE_FORMAT_RGBA16ITEXTURE_FORMAT_RGBA16UTEXTURE_FORMAT_RGBA16FTEXTURE_FORMAT_RGBA16STEXTURE_FORMAT_RGBA32ITEXTURE_FORMAT_RGBA32UTEXTURE_FORMAT_RGBA32FTEXTURE_FORMAT_R5G6B5TEXTURE_FORMAT_RGBA4TEXTURE_FORMAT_RGB5A1TEXTURE_FORMAT_RGB10A2TEXTURE_FORMAT_RG11B10FTEXTURE_FORMAT_UNKNOWN_DEPTHTEXTURE_FORMAT_D16TEXTURE_FORMAT_D24TEXTURE_FORMAT_D24S8TEXTURE_FORMAT_D32TEXTURE_FORMAT_D16FTEXTURE_FORMAT_D24FTEXTURE_FORMAT_D32FTEXTURE_FORMAT_D0S8TEXTURE_FORMAT_COUNT
-
BGFX_UNIFORM_TYPE_SAMPLER, BGFX_UNIFORM_TYPE_END, BGFX_UNIFORM_TYPE_VEC4, BGFX_UNIFORM_TYPE_MAT3, BGFX_UNIFORM_TYPE_MAT4, BGFX_UNIFORM_TYPE_COUNT
Uniform type (bgfx_uniform_type_t).Enum values:
UNIFORM_TYPE_SAMPLER- Sampler.UNIFORM_TYPE_END- Reserved, do not use.UNIFORM_TYPE_VEC4- 4 floats vector.UNIFORM_TYPE_MAT3- 3x3 matrix.UNIFORM_TYPE_MAT4- 4x4 matrix.UNIFORM_TYPE_COUNT
-
BGFX_BACKBUFFER_RATIO_EQUAL, BGFX_BACKBUFFER_RATIO_HALF, BGFX_BACKBUFFER_RATIO_QUARTER, BGFX_BACKBUFFER_RATIO_EIGHTH, BGFX_BACKBUFFER_RATIO_SIXTEENTH, BGFX_BACKBUFFER_RATIO_DOUBLE, BGFX_BACKBUFFER_RATIO_COUNT
Backbuffer ratio (bgfx_backbuffer_ratio_t).Enum values:
BACKBUFFER_RATIO_EQUAL- Equal to backbuffer.BACKBUFFER_RATIO_HALF- One half size of backbuffer.BACKBUFFER_RATIO_QUARTER- One quarter size of backbuffer.BACKBUFFER_RATIO_EIGHTH- One eighth size of backbuffer.BACKBUFFER_RATIO_SIXTEENTH- One sixteenth size of backbuffer.BACKBUFFER_RATIO_DOUBLE- Double size of backbuffer.BACKBUFFER_RATIO_COUNT
-
BGFX_OCCLUSION_QUERY_RESULT_INVISIBLE, BGFX_OCCLUSION_QUERY_RESULT_VISIBLE, BGFX_OCCLUSION_QUERY_RESULT_NORESULT, BGFX_OCCLUSION_QUERY_RESULT_COUNT
Occlusion query result (bgfx_occlusion_query_result_t).Enum values:
OCCLUSION_QUERY_RESULT_INVISIBLE- Query failed test.OCCLUSION_QUERY_RESULT_VISIBLE- Query passed test.OCCLUSION_QUERY_RESULT_NORESULT- Query result is not available yet.OCCLUSION_QUERY_RESULT_COUNT
-
BGFX_TOPOLOGY_TRI_LIST, BGFX_TOPOLOGY_TRI_STRIP, BGFX_TOPOLOGY_LINE_LIST, BGFX_TOPOLOGY_LINE_STRIP, BGFX_TOPOLOGY_POINT_LIST, BGFX_TOPOLOGY_COUNT
bgfx_topologyEnum values:
TOPOLOGY_TRI_LIST- Triangle listTOPOLOGY_TRI_STRIP- Triangle stripTOPOLOGY_LINE_LIST- Line listTOPOLOGY_LINE_STRIP- Line stripTOPOLOGY_POINT_LIST- Point listTOPOLOGY_COUNT
-
BGFX_TOPOLOGY_CONVERT_TRI_LIST_FLIP_WINDING, BGFX_TOPOLOGY_CONVERT_TRI_STRIP_FLIP_WINDING, BGFX_TOPOLOGY_CONVERT_TRI_LIST_TO_LINE_LIST, BGFX_TOPOLOGY_CONVERT_TRI_STRIP_TO_TRI_LIST, BGFX_TOPOLOGY_CONVERT_LINE_STRIP_TO_LINE_LIST, BGFX_TOPOLOGY_CONVERT_COUNT
Topology conversion function (bgfx_topology_convert_t).Enum values:
TOPOLOGY_CONVERT_TRI_LIST_FLIP_WINDING- Flip winding order of triangle list.TOPOLOGY_CONVERT_TRI_STRIP_FLIP_WINDING- Flip winding order of triangle strip.TOPOLOGY_CONVERT_TRI_LIST_TO_LINE_LIST- Convert triangle list to line list.TOPOLOGY_CONVERT_TRI_STRIP_TO_TRI_LIST- Convert triangle strip to triangle list.TOPOLOGY_CONVERT_LINE_STRIP_TO_LINE_LIST- Convert line strip to line list.TOPOLOGY_CONVERT_COUNT
-
BGFX_TOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_MIN, BGFX_TOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_AVG, BGFX_TOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_MAX, BGFX_TOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_MIN, BGFX_TOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_AVG, BGFX_TOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_MAX, BGFX_TOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_MIN, BGFX_TOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_AVG, BGFX_TOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_MAX, BGFX_TOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_MIN, BGFX_TOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_AVG, BGFX_TOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_MAX, BGFX_TOPOLOGY_SORT_COUNT
Topology sort order (bgfx_topology_sort_t).Enum values:
TOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_MINTOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_AVGTOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_MAXTOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_MINTOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_AVGTOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_MAXTOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_MINTOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_AVGTOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_MAXTOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_MINTOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_AVGTOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_MAXTOPOLOGY_SORT_COUNT
-
BGFX_VIEW_MODE_DEFAULT, BGFX_VIEW_MODE_SEQUENTIAL, BGFX_VIEW_MODE_DEPTH_ASCENDING, BGFX_VIEW_MODE_DEPTH_DESCENDING, BGFX_VIEW_MODE_COUNT
View mode sets draw call sort order (bgfx_view_mode_t).Enum values:
VIEW_MODE_DEFAULT- Default sort order.VIEW_MODE_SEQUENTIAL- Sort in the same order in which submit calls were called.VIEW_MODE_DEPTH_ASCENDING- Sort draw call depth in ascending order.VIEW_MODE_DEPTH_DESCENDING- Sort draw call depth in descending order.VIEW_MODE_COUNT
-
BGFX_STATE_BLEND_ADD, BGFX_STATE_BLEND_ALPHA, BGFX_STATE_BLEND_DARKEN, BGFX_STATE_BLEND_LIGHTEN, BGFX_STATE_BLEND_MULTIPLY, BGFX_STATE_BLEND_NORMAL, BGFX_STATE_BLEND_SCREEN, BGFX_STATE_BLEND_LINEAR_BURN
Blend state macros
-
-
Method Detail
-
getLibrary
public static org.lwjgl.system.SharedLibrary getLibrary()
Returns the bgfxSharedLibrary.
-
nbgfx_attachment_init
public static void nbgfx_attachment_init(long _this, short _handle, int _access, short _layer, short _numLayers, short _mip, byte _resolve)Unsafe version of:attachment_init
-
bgfx_attachment_init
public static void bgfx_attachment_init(BGFXAttachment _this, short _handle, int _access, int _layer, int _numLayers, int _mip, int _resolve)
Init attachment.- Parameters:
_handle- render target texture handle_access- access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE_layer- cubemap side or depth layer/slice to use_numLayers- number of texture layer/slice(s) in array to use_mip- mip level_resolve- resolve flags. One of:RESOLVE_NONERESOLVE_AUTO_GEN_MIPS
-
nbgfx_vertex_layout_begin
public static long nbgfx_vertex_layout_begin(long _this, int _renderer)Unsafe version of:vertex_layout_begin
-
bgfx_vertex_layout_begin
@Nullable public static BGFXVertexLayout bgfx_vertex_layout_begin(BGFXVertexLayout _this, int _renderer)
Start a vertex layout.- Parameters:
_this- the vertex layout_renderer- the renderer backend type. One of:- Returns:
- itself
-
nbgfx_vertex_layout_add
public static long nbgfx_vertex_layout_add(long _this, int _attrib, byte _num, int _type, boolean _normalized, boolean _asInt)Unsafe version of:vertex_layout_add
-
bgfx_vertex_layout_add
@Nullable public static BGFXVertexLayout bgfx_vertex_layout_add(BGFXVertexLayout _this, int _attrib, int _num, int _type, boolean _normalized, boolean _asInt)
Adds attribute to a vertex layout.Must be called between
vertex_layout_begin/vertex_layout_end.- Parameters:
_this- the vertex layout_attrib- attribute semantics. One of:_num- number of elements. One of:1 2 3 4 _type- element type. One of:ATTRIB_TYPE_UINT8ATTRIB_TYPE_UINT10ATTRIB_TYPE_INT16ATTRIB_TYPE_HALFATTRIB_TYPE_FLOATATTRIB_TYPE_COUNT_normalized- when using fixed point attribute type (f.e.ATTRIB_TYPE_UINT8) value will be normalized for vertex shader usage. Whennormalizedis set to true,ATTRIB_TYPE_UINT8value in range 0-255 will be in range 0.0-1.0 in vertex shader._asInt- packaging rule forvertexPack,vertexUnpack, andvertexConvertforATTRIB_TYPE_UINT8andATTRIB_TYPE_INT16. Unpacking code must be implemented inside vertex shader.- Returns:
- itself
-
nbgfx_vertex_layout_decode
public static void nbgfx_vertex_layout_decode(long _this, int _attrib, long _num, long _type, long _normalized, long _asInt)Unsafe version of:vertex_layout_decode
-
bgfx_vertex_layout_decode
public static void bgfx_vertex_layout_decode(BGFXVertexLayout _this, int _attrib, java.nio.ByteBuffer _num, java.nio.IntBuffer _type, java.nio.ByteBuffer _normalized, java.nio.ByteBuffer _asInt)
Decodes attribute.- Parameters:
_this- the vertex layout_attrib- the attribute to decode_num- number of elements_type- element type_normalized- normalized flag_asInt- packaging flag
-
nbgfx_vertex_layout_has
public static boolean nbgfx_vertex_layout_has(long _this, int _attr)Unsafe version of:vertex_layout_has
-
bgfx_vertex_layout_has
public static boolean bgfx_vertex_layout_has(BGFXVertexLayout _this, int _attr)
Returns true if_thiscontains attribute.- Parameters:
_this- the vertex layout_attr- the attribute to query. One of:- Returns:
trueifVertexLayoutcontains attribute
-
nbgfx_vertex_layout_skip
public static long nbgfx_vertex_layout_skip(long _this, byte _num)Unsafe version of:vertex_layout_skip
-
bgfx_vertex_layout_skip
@Nullable public static BGFXVertexLayout bgfx_vertex_layout_skip(BGFXVertexLayout _this, int _num)
Skips_numbytes in vertex stream.- Parameters:
_this- the vertex layout_num- the number of bytes to skip- Returns:
- itself
-
nbgfx_vertex_layout_end
public static void nbgfx_vertex_layout_end(long _this)
Unsafe version of:vertex_layout_end
-
bgfx_vertex_layout_end
public static void bgfx_vertex_layout_end(BGFXVertexLayout _this)
Ends a vertex layout.- Parameters:
_this- the vertex layout
-
nbgfx_vertex_pack
public static void nbgfx_vertex_pack(long _input, boolean _inputNormalized, int _attr, long _layout, long _data, int _index)Unsafe version of:vertex_pack
-
bgfx_vertex_pack
public static void bgfx_vertex_pack(java.nio.FloatBuffer _input, boolean _inputNormalized, int _attr, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, int _index)Packs vertex attribute into vertex stream format.- Parameters:
_input- value to be packed into vertex stream_inputNormalized- true if input value is already normalized_attr- attribute to pack. One of:_layout- vertex stream layout_data- destination vertex stream where data will be packed_index- vertex index that will be modified
-
nbgfx_vertex_unpack
public static void nbgfx_vertex_unpack(long _output, int _attr, long _layout, long _data, int _index)Unsafe version of:vertex_unpack
-
bgfx_vertex_unpack
public static void bgfx_vertex_unpack(java.nio.FloatBuffer _output, int _attr, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, int _index)Unpacks vertex attribute from vertex stream format.- Parameters:
_output- result of unpacking_attr- attribute to unpack. One of:_layout- vertex stream layout_data- source vertex stream from where data will be unpacked_index- vertex index that will be unpacked
-
nbgfx_vertex_convert
public static void nbgfx_vertex_convert(long _dstLayout, long _dstData, long _srcLayout, long _srcData, int _num)Unsafe version of:vertex_convert
-
bgfx_vertex_convert
public static void bgfx_vertex_convert(BGFXVertexLayout _dstLayout, java.nio.ByteBuffer _dstData, BGFXVertexLayout _srcLayout, java.nio.ByteBuffer _srcData, int _num)
Converts vertex stream data from one vertex stream format to another.- Parameters:
_dstLayout- destination vertex stream layout_dstData- destination vertex stream_srcLayout- source vertex stream layout_srcData- source vertex stream data_num- number of vertices to convert from source to destination
-
nbgfx_weld_vertices
public static int nbgfx_weld_vertices(long _output, long _layout, long _data, int _num, boolean _index32, float _epsilon)Unsafe version of:weld_vertices- Parameters:
_num- number of vertices in vertex stream
-
bgfx_weld_vertices
public static int bgfx_weld_vertices(java.nio.ByteBuffer _output, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, boolean _index32, float _epsilon) public static int bgfx_weld_vertices(java.nio.ShortBuffer _output, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, boolean _index32, float _epsilon) public static int bgfx_weld_vertices(java.nio.IntBuffer _output, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, boolean _index32, float _epsilon)Welds vertices.- Parameters:
_output- welded vertices remapping table. The size of buffer must be the same as number of vertices._layout- vertex stream layout_data- vertex stream_index32- set totrueif input indices are 32-bit_epsilon- error tolerance for vertex position comparison- Returns:
- number of unique vertices after vertex welding
-
nbgfx_topology_convert
public static int nbgfx_topology_convert(int _conversion, long _dst, int _dstSize, long _indices, int _numIndices, boolean _index32)Unsafe version of:topology_convert- Parameters:
_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._numIndices- number of input indices
-
bgfx_topology_convert
public static int bgfx_topology_convert(int _conversion, @Nullable java.nio.ByteBuffer _dst, java.nio.ByteBuffer _indices, boolean _index32) public static int bgfx_topology_convert(int _conversion, @Nullable java.nio.ShortBuffer _dst, java.nio.ShortBuffer _indices, boolean _index32) public static int bgfx_topology_convert(int _conversion, @Nullable java.nio.IntBuffer _dst, java.nio.IntBuffer _indices, boolean _index32)Converts index buffer for use with different primitive topologies.- Parameters:
_conversion- conversion type. One of:TOPOLOGY_CONVERT_TRI_LIST_FLIP_WINDINGTOPOLOGY_CONVERT_TRI_STRIP_FLIP_WINDINGTOPOLOGY_CONVERT_TRI_LIST_TO_LINE_LISTTOPOLOGY_CONVERT_TRI_STRIP_TO_TRI_LISTTOPOLOGY_CONVERT_LINE_STRIP_TO_LINE_LIST_dst- destination index buffer. If this argument isNULLfunction will return number of indices after conversion_indices- source indices_index32- set totrueif input indices are 32-bit- Returns:
- number of output indices after conversion
-
nbgfx_topology_sort_tri_list
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)Unsafe version of:topology_sort_tri_list- Parameters:
_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._numIndices- number of input indices
-
bgfx_topology_sort_tri_list
public static void bgfx_topology_sort_tri_list(int _sort, java.nio.ByteBuffer _dst, java.nio.FloatBuffer _dir, java.nio.FloatBuffer _pos, java.nio.ByteBuffer _vertices, int _stride, java.nio.ByteBuffer _indices, boolean _index32) public static void bgfx_topology_sort_tri_list(int _sort, java.nio.ShortBuffer _dst, java.nio.FloatBuffer _dir, java.nio.FloatBuffer _pos, java.nio.ByteBuffer _vertices, int _stride, java.nio.ShortBuffer _indices, boolean _index32) public static void bgfx_topology_sort_tri_list(int _sort, java.nio.IntBuffer _dst, java.nio.FloatBuffer _dir, java.nio.FloatBuffer _pos, java.nio.ByteBuffer _vertices, int _stride, java.nio.IntBuffer _indices, boolean _index32)Sorts indices.- Parameters:
_sort- sort order. One of:_dst- destination index buffer_dir- direction (vector must be normalized)_pos- position_vertices- pointer to first vertex represented as float x, y, z. Must contain at least number of vertices referenced by index buffer._stride- vertex stride_indices- source indices_index32- set totrueif input indices are 32-bit
-
nbgfx_get_supported_renderers
public static byte nbgfx_get_supported_renderers(byte _max, long _enum)Unsafe version of:get_supported_renderers- Parameters:
_max- maximum number of elements in_enumarray
-
bgfx_get_supported_renderers
public static byte bgfx_get_supported_renderers(java.nio.IntBuffer _enum)
Returns supported backend API renderers.- Parameters:
_enum- array where supported renderers will be written- Returns:
- the number of renderers written to
_enum
-
nbgfx_get_renderer_name
public static long nbgfx_get_renderer_name(int _type)
Unsafe version of:get_renderer_name
-
bgfx_get_renderer_name
@Nullable public static java.lang.String bgfx_get_renderer_name(int _type)
Returns name of renderer.- Parameters:
_type- the renderer type. One of:
-
nbgfx_init_ctor
public static void nbgfx_init_ctor(long _init)
Unsafe version of:init_ctor
-
bgfx_init_ctor
public static void bgfx_init_ctor(BGFXInit _init)
Updates the specified initialization parameters with default values.- Parameters:
_init- initialization parameters
-
nbgfx_init
public static boolean nbgfx_init(long _init)
Unsafe version of:init
-
bgfx_init
public static boolean bgfx_init(BGFXInit _init)
Initializes bgfx library.- Parameters:
_init- initialization parameters- Returns:
- true if initialization was successful
-
bgfx_shutdown
public static void bgfx_shutdown()
Shuts down bgfx library.
-
bgfx_reset
public static void bgfx_reset(int _width, int _height, int _flags, int _format)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.
- Parameters:
_width- back-buffer width_height- back-buffer height_flags- reset flags. One or more of:_format- texture format. One of:
-
bgfx_frame
public static int bgfx_frame(boolean _capture)
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.- Parameters:
_capture- capture frame with graphics debugger- Returns:
- current frame number. This might be used in conjunction with double/multi buffering data outside the library and passing it to library
make_refcalls.
-
bgfx_get_renderer_type
public static int bgfx_get_renderer_type()
Returns current renderer backend API type.
-
nbgfx_get_caps
public static long nbgfx_get_caps()
Unsafe version of:get_caps
-
bgfx_get_caps
@Nullable public static BGFXCaps bgfx_get_caps()
Returns renderer capabilities.
-
nbgfx_get_stats
public static long nbgfx_get_stats()
Unsafe version of:get_stats
-
bgfx_get_stats
@Nullable public static BGFXStats bgfx_get_stats()
Returns performance counters.The pointer returned is valid until
frameis called.
-
nbgfx_alloc
public static long nbgfx_alloc(int _size)
Unsafe version of:alloc
-
bgfx_alloc
@Nullable public static BGFXMemory bgfx_alloc(int _size)
Allocates buffer to pass to bgfx calls. Data will be freed inside bgfx.- Parameters:
_size- the number of bytes to allocate
-
nbgfx_copy
public static long nbgfx_copy(long _data, int _size)Unsafe version of:copy- Parameters:
_size- size of data to be copied
-
bgfx_copy
@Nullable public static BGFXMemory bgfx_copy(java.nio.ByteBuffer _data) @Nullable public static BGFXMemory bgfx_copy(java.nio.ShortBuffer _data) @Nullable public static BGFXMemory bgfx_copy(java.nio.IntBuffer _data) @Nullable public static BGFXMemory bgfx_copy(java.nio.LongBuffer _data) @Nullable public static BGFXMemory bgfx_copy(java.nio.FloatBuffer _data) @Nullable public static BGFXMemory bgfx_copy(java.nio.DoubleBuffer _data) @Nullable public static BGFXMemory bgfx_copy(org.lwjgl.PointerBuffer _data)
Allocates buffer and copies data into it. Data will be freed inside bgfx.- Parameters:
_data- pointer to data to be copied
-
nbgfx_make_ref
public static long nbgfx_make_ref(long _data, int _size)Unsafe version of:make_ref- Parameters:
_size- the number of bytes to reference
-
bgfx_make_ref
@Nullable public static BGFXMemory bgfx_make_ref(java.nio.ByteBuffer _data) @Nullable public static BGFXMemory bgfx_make_ref(java.nio.ShortBuffer _data) @Nullable public static BGFXMemory bgfx_make_ref(java.nio.IntBuffer _data) @Nullable public static BGFXMemory bgfx_make_ref(java.nio.LongBuffer _data) @Nullable public static BGFXMemory bgfx_make_ref(java.nio.FloatBuffer _data) @Nullable public static BGFXMemory bgfx_make_ref(java.nio.DoubleBuffer _data) @Nullable public static BGFXMemory bgfx_make_ref(org.lwjgl.PointerBuffer _data)
Makes reference to data to pass to bgfx. Unlikealloc, this call doesn't allocate memory for data. It just copies the_datapointer.Data passed must be available for at least 2
framecalls.- Parameters:
_data- the data to reference
-
nbgfx_make_ref_release
public static long nbgfx_make_ref_release(long _data, int _size, long _releaseFn, long _userData)Unsafe version of:make_ref_release- Parameters:
_size- the number of bytes to reference
-
bgfx_make_ref_release
@Nullable public static BGFXMemory bgfx_make_ref_release(java.nio.ByteBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData) @Nullable public static BGFXMemory bgfx_make_ref_release(java.nio.ShortBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData) @Nullable public static BGFXMemory bgfx_make_ref_release(java.nio.IntBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData) @Nullable public static BGFXMemory bgfx_make_ref_release(java.nio.LongBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData) @Nullable public static BGFXMemory bgfx_make_ref_release(java.nio.FloatBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData) @Nullable public static BGFXMemory bgfx_make_ref_release(java.nio.DoubleBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData) @Nullable public static BGFXMemory bgfx_make_ref_release(org.lwjgl.PointerBuffer _data, BGFXReleaseFunctionCallbackI _releaseFn, long _userData)
Makes reference to data to pass to bgfx. Unlikealloc, this call doesn't allocate memory for data. It just copies the_datapointer.The
bgfx_release_fn_tfunction pointer will release this memory after it's consumed. Thebgfx_release_fn_tfunction must be able to be called from any thread.- Parameters:
_data- the data to reference_releaseFn- callback function to release memory after use_userData- user data to be passed to callback function
-
bgfx_set_debug
public static void bgfx_set_debug(int _debug)
Sets debug flags.- Parameters:
_debug- the debug flags. One or more of:DEBUG_NONEDEBUG_WIREFRAMEDEBUG_IFHDEBUG_STATSDEBUG_TEXTDEBUG_PROFILER
-
nbgfx_dbg_text_clear
public static void nbgfx_dbg_text_clear(byte _attr, boolean _small)Unsafe version of:dbg_text_clear
-
bgfx_dbg_text_clear
public static void bgfx_dbg_text_clear(int _attr, boolean _small)Clears internal debug text buffer.- Parameters:
_attr- background color_small- default 8x16 or 8x8 font
-
nbgfx_dbg_text_printf
public static void nbgfx_dbg_text_printf(short _x, short _y, byte _attr, long _format)Unsafe version of:dbg_text_printf
-
bgfx_dbg_text_printf
public static void bgfx_dbg_text_printf(int _x, int _y, int _attr, java.nio.ByteBuffer _format) public static void bgfx_dbg_text_printf(int _x, int _y, int _attr, java.lang.CharSequence _format)Prints into internal debug text character-buffer (VGA-compatible text mode).LWJGL note: This is a vararg function that should be called with
dbg_text_printfvia the libffi bindings.- Parameters:
_x- x coordinate_y- y coordinate_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)._format-printfstyle format
-
nbgfx_dbg_text_vprintf
public static void nbgfx_dbg_text_vprintf(short _x, short _y, byte _attr, long _format, long _argList)Unsafe version of:dbg_text_vprintf
-
bgfx_dbg_text_vprintf
public static void bgfx_dbg_text_vprintf(int _x, int _y, int _attr, java.nio.ByteBuffer _format, long _argList) public static void bgfx_dbg_text_vprintf(int _x, int _y, int _attr, java.lang.CharSequence _format, long _argList)Print into internal debug text character-buffer (VGA-compatible text mode).- Parameters:
_x- x coordinate_y- y coordinate_attr- color palette. Where top 4-bits represent index of background, and bottom 4-bits represent foreground color from standard VGA text palette._format-printfstyle format_argList- additional arguments for format string
-
nbgfx_dbg_text_image
public static void nbgfx_dbg_text_image(short _x, short _y, short _width, short _height, long _data, short _pitch)Unsafe version of:dbg_text_image
-
bgfx_dbg_text_image
public static void bgfx_dbg_text_image(int _x, int _y, int _width, int _height, java.nio.ByteBuffer _data, int _pitch)Draws image into internal debug text buffer.- Parameters:
_x- x coordinate_y- y coordinate_width- image width_height- image height_data- raw image data (character/attribute raw encoding)_pitch- image pitch in bytes
-
nbgfx_create_index_buffer
public static short nbgfx_create_index_buffer(long _mem, short _flags)Unsafe version of:create_index_buffer
-
bgfx_create_index_buffer
public static short bgfx_create_index_buffer(BGFXMemory _mem, int _flags)
Creates static index buffer.- Parameters:
_mem- index buffer data_flags- buffer creation flags. One or more of:BUFFER_NONEBUFFER_COMPUTE_READBUFFER_COMPUTE_WRITEBUFFER_DRAW_INDIRECTBUFFER_ALLOW_RESIZEBUFFER_INDEX32BUFFER_COMPUTE_READ_WRITE
-
nbgfx_set_index_buffer_name
public static void nbgfx_set_index_buffer_name(short _handle, long _name, int _len)Unsafe version of:set_index_buffer_name- Parameters:
_len- static index buffer name length (if length isINT32_MAX, it's expected that_nameis zero terminated string)
-
bgfx_set_index_buffer_name
public static void bgfx_set_index_buffer_name(short _handle, java.nio.ByteBuffer _name) public static void bgfx_set_index_buffer_name(short _handle, java.lang.CharSequence _name)Set static index buffer debug name.- Parameters:
_handle- static index buffer handle_name- static index buffer name
-
bgfx_destroy_index_buffer
public static void bgfx_destroy_index_buffer(short _handle)
Destroys static index buffer.- Parameters:
_handle- the static index buffer to destroy
-
nbgfx_create_vertex_layout
public static short nbgfx_create_vertex_layout(long _layout)
Unsafe version of:create_vertex_layout
-
bgfx_create_vertex_layout
public static short bgfx_create_vertex_layout(BGFXVertexLayout _layout)
Creates a vertex layout.- Parameters:
_layout- vertex layout
-
bgfx_destroy_vertex_layout
public static void bgfx_destroy_vertex_layout(short _handle)
Destroys a vertex layout.- Parameters:
_handle- vertex layout handle
-
nbgfx_create_vertex_buffer
public static short nbgfx_create_vertex_buffer(long _mem, long _layout, short _flags)Unsafe version of:create_vertex_buffer
-
bgfx_create_vertex_buffer
public static short bgfx_create_vertex_buffer(BGFXMemory _mem, BGFXVertexLayout _layout, int _flags)
Creates static vertex buffer.- Parameters:
_mem- vertex buffer data_layout- vertex layout_flags- buffer creation flags. One or more of:BUFFER_NONEBUFFER_COMPUTE_READBUFFER_COMPUTE_WRITEBUFFER_DRAW_INDIRECTBUFFER_ALLOW_RESIZEBUFFER_INDEX32BUFFER_COMPUTE_READ_WRITE
-
nbgfx_set_vertex_buffer_name
public static void nbgfx_set_vertex_buffer_name(short _handle, long _name, int _len)Unsafe version of:set_vertex_buffer_name- Parameters:
_len- static vertex buffer name length (if length isINT32_MAX, it's expected that_nameis zero terminated string)
-
bgfx_set_vertex_buffer_name
public static void bgfx_set_vertex_buffer_name(short _handle, java.nio.ByteBuffer _name) public static void bgfx_set_vertex_buffer_name(short _handle, java.lang.CharSequence _name)Set static vertex buffer debug name.- Parameters:
_handle- static vertex buffer handle_name- static vertex buffer name
-
bgfx_destroy_vertex_buffer
public static void bgfx_destroy_vertex_buffer(short _handle)
Destroys static vertex buffer.- Parameters:
_handle- the static vertex buffer to destroy
-
nbgfx_create_dynamic_index_buffer
public static short nbgfx_create_dynamic_index_buffer(int _num, short _flags)Unsafe version of:create_dynamic_index_buffer
-
bgfx_create_dynamic_index_buffer
public static short bgfx_create_dynamic_index_buffer(int _num, int _flags)Creates empty dynamic index buffer.- Parameters:
_num- number of indices_flags- buffer creation flags. One or more of:BUFFER_NONEBUFFER_COMPUTE_READBUFFER_COMPUTE_WRITEBUFFER_DRAW_INDIRECTBUFFER_ALLOW_RESIZEBUFFER_INDEX32BUFFER_COMPUTE_READ_WRITE
-
nbgfx_create_dynamic_index_buffer_mem
public static short nbgfx_create_dynamic_index_buffer_mem(long _mem, short _flags)Unsafe version of:create_dynamic_index_buffer_mem
-
bgfx_create_dynamic_index_buffer_mem
public static short bgfx_create_dynamic_index_buffer_mem(BGFXMemory _mem, int _flags)
Creates dynamic index buffer and initializes it.- Parameters:
_mem- index buffer data_flags- buffer creation flags. One or more of:BUFFER_NONEBUFFER_COMPUTE_READBUFFER_COMPUTE_WRITEBUFFER_DRAW_INDIRECTBUFFER_ALLOW_RESIZEBUFFER_INDEX32BUFFER_COMPUTE_READ_WRITE
-
nbgfx_update_dynamic_index_buffer
public static void nbgfx_update_dynamic_index_buffer(short _handle, int _startIndex, long _mem)Unsafe version of:update_dynamic_index_buffer
-
bgfx_update_dynamic_index_buffer
public static void bgfx_update_dynamic_index_buffer(short _handle, int _startIndex, BGFXMemory _mem)Updates dynamic index buffer.- Parameters:
_handle- dynamic index buffer handle_startIndex- start index_mem- index buffer data
-
bgfx_destroy_dynamic_index_buffer
public static void bgfx_destroy_dynamic_index_buffer(short _handle)
Destroys dynamic index buffer.- Parameters:
_handle- the dynamic index buffer to destroy
-
nbgfx_create_dynamic_vertex_buffer
public static short nbgfx_create_dynamic_vertex_buffer(int _num, long _layout, short _flags)Unsafe version of:create_dynamic_vertex_buffer
-
bgfx_create_dynamic_vertex_buffer
public static short bgfx_create_dynamic_vertex_buffer(int _num, BGFXVertexLayout _layout, int _flags)Creates empty dynamic vertex buffer.- Parameters:
_num- number of vertices_layout- vertex layout_flags- buffer creation flags. One or more of:BUFFER_NONEBUFFER_COMPUTE_READBUFFER_COMPUTE_WRITEBUFFER_DRAW_INDIRECTBUFFER_ALLOW_RESIZEBUFFER_INDEX32BUFFER_COMPUTE_READ_WRITE
-
nbgfx_create_dynamic_vertex_buffer_mem
public static short nbgfx_create_dynamic_vertex_buffer_mem(long _mem, long _layout, short _flags)Unsafe version of:create_dynamic_vertex_buffer_mem
-
bgfx_create_dynamic_vertex_buffer_mem
public static short bgfx_create_dynamic_vertex_buffer_mem(BGFXMemory _mem, BGFXVertexLayout _layout, int _flags)
Creates dynamic vertex buffer and initializes it.- Parameters:
_mem- vertex buffer data_layout- vertex layout_flags- buffer creation flags. One or more of:BUFFER_NONEBUFFER_COMPUTE_READBUFFER_COMPUTE_WRITEBUFFER_DRAW_INDIRECTBUFFER_ALLOW_RESIZEBUFFER_INDEX32BUFFER_COMPUTE_READ_WRITE
-
nbgfx_update_dynamic_vertex_buffer
public static void nbgfx_update_dynamic_vertex_buffer(short _handle, int _startVertex, long _mem)Unsafe version of:update_dynamic_vertex_buffer
-
bgfx_update_dynamic_vertex_buffer
public static void bgfx_update_dynamic_vertex_buffer(short _handle, int _startVertex, BGFXMemory _mem)Updates dynamic vertex buffer.- Parameters:
_handle- dynamic vertex buffer handle_startVertex- start vertex_mem- vertex buffer data
-
bgfx_destroy_dynamic_vertex_buffer
public static void bgfx_destroy_dynamic_vertex_buffer(short _handle)
Destroys dynamic vertex buffer.- Parameters:
_handle- the dynamic vertex buffer to destroy
-
bgfx_get_avail_transient_index_buffer
public static int bgfx_get_avail_transient_index_buffer(int _num, boolean _index32)Returns number of requested or maximum available indices.- Parameters:
_num- number of required indices_index32- set totrueif input indices will be 32-bit
-
nbgfx_get_avail_transient_vertex_buffer
public static int nbgfx_get_avail_transient_vertex_buffer(int _num, long _layout)Unsafe version of:get_avail_transient_vertex_buffer
-
bgfx_get_avail_transient_vertex_buffer
public static int bgfx_get_avail_transient_vertex_buffer(int _num, BGFXVertexLayout _layout)Returns number of requested or maximum available vertices.- Parameters:
_num- number of required vertices_layout- vertex layout
-
nbgfx_get_avail_instance_data_buffer
public static int nbgfx_get_avail_instance_data_buffer(int _num, short _stride)Unsafe version of:get_avail_instance_data_buffer
-
bgfx_get_avail_instance_data_buffer
public static int bgfx_get_avail_instance_data_buffer(int _num, int _stride)Returns number of requested or maximum available instance buffer slots.- Parameters:
_num- number of required instances_stride- stride per instance
-
nbgfx_alloc_transient_index_buffer
public static void nbgfx_alloc_transient_index_buffer(long _tib, int _num, boolean _index32)Unsafe version of:alloc_transient_index_buffer
-
bgfx_alloc_transient_index_buffer
public static void bgfx_alloc_transient_index_buffer(BGFXTransientIndexBuffer _tib, int _num, boolean _index32)
Allocates transient index buffer.- Parameters:
_tib-BGFXTransientIndexBufferstructure is filled and is valid for the duration of frame, and it can be reused for multiple draw calls_num- number of indices to allocate_index32- set totrueif input indices will be 32-bit
-
nbgfx_alloc_transient_vertex_buffer
public static void nbgfx_alloc_transient_vertex_buffer(long _tvb, int _num, long _layout)Unsafe version of:alloc_transient_vertex_buffer
-
bgfx_alloc_transient_vertex_buffer
public static void bgfx_alloc_transient_vertex_buffer(BGFXTransientVertexBuffer _tvb, int _num, BGFXVertexLayout _layout)
Allocates transient vertex buffer.- Parameters:
_tvb-BGFXTransientVertexBufferstructure is filled and is valid for the duration of frame, and it can be reused for multiple draw calls_num- number of vertices to allocate_layout- vertex layout
-
nbgfx_alloc_transient_buffers
public static boolean nbgfx_alloc_transient_buffers(long _tvb, long _layout, int _numVertices, long _tib, int _numIndices, boolean _index32)Unsafe version of:alloc_transient_buffers
-
bgfx_alloc_transient_buffers
public static boolean bgfx_alloc_transient_buffers(BGFXTransientVertexBuffer _tvb, BGFXVertexLayout _layout, int _numVertices, BGFXTransientIndexBuffer _tib, int _numIndices, boolean _index32)
Checks for required space and allocates transient vertex and index buffers. If both space requirements are satisfied function returns true.- Parameters:
_tvb-BGFXTransientVertexBufferstructure is filled and is valid for the duration of frame, and it can be reused for multiple draw calls_layout- vertex layout_numVertices- number of vertices to allocate_tib-BGFXTransientIndexBufferstructure is filled and is valid for the duration of frame, and it can be reused for multiple draw calls_numIndices- number of indices to allocate_index32- set totrueif input indices will be 32-bit
-
nbgfx_alloc_instance_data_buffer
public static void nbgfx_alloc_instance_data_buffer(long _idb, int _num, short _stride)Unsafe version of:alloc_instance_data_buffer
-
bgfx_alloc_instance_data_buffer
public static void bgfx_alloc_instance_data_buffer(BGFXInstanceDataBuffer _idb, int _num, int _stride)
Allocates instance data buffer.- Parameters:
_idb-BGFXInstanceDataBufferstructure is filled and is valid for duration of frame, and it can be reused for multiple draw calls_num- number of instances_stride- instance stride. Must be multiple of 16
-
bgfx_create_indirect_buffer
public static short bgfx_create_indirect_buffer(int _num)
Creates draw indirect buffer.- Parameters:
_num- number of indirect calls
-
bgfx_destroy_indirect_buffer
public static void bgfx_destroy_indirect_buffer(short _handle)
Destroys draw indirect buffer.- Parameters:
_handle- the draw indirect buffer to destroy
-
nbgfx_create_shader
public static short nbgfx_create_shader(long _mem)
Unsafe version of:create_shader
-
bgfx_create_shader
public static short bgfx_create_shader(BGFXMemory _mem)
Creates shader from memory buffer.- Returns:
- shader handle
-
nbgfx_get_shader_uniforms
public static short nbgfx_get_shader_uniforms(short _handle, long _uniforms, short _max)Unsafe version of:get_shader_uniforms- Parameters:
_max- maximum capacity of_uniforms
-
bgfx_get_shader_uniforms
public static short bgfx_get_shader_uniforms(short _handle, java.nio.ShortBuffer _uniforms)Returns the number of uniforms and uniform handles used inside shader.Only non-predefined uniforms are returned.
- Parameters:
_handle- shader handle_uniforms-bgfx_uniform_handle_tarray where data will be stored- Returns:
- number of uniforms used by shader
-
nbgfx_set_shader_name
public static void nbgfx_set_shader_name(short _handle, long _name, int _len)Unsafe version of:set_shader_name- Parameters:
_len- shader name length (if length isINT32_MAX, it's expected that_nameis zero terminated string)
-
bgfx_set_shader_name
public static void bgfx_set_shader_name(short _handle, java.nio.ByteBuffer _name) public static void bgfx_set_shader_name(short _handle, java.lang.CharSequence _name)Sets shader debug name.- Parameters:
_handle- shader handle_name- shader name
-
bgfx_destroy_shader
public static void bgfx_destroy_shader(short _handle)
Destroys shader. Once a shader program is created with_handle, it is safe to destroy that shader.- Parameters:
_handle- the shader to destroy
-
bgfx_create_program
public static short bgfx_create_program(short _vsh, short _fsh, boolean _destroyShaders)Creates program with vertex and fragment shaders.- Parameters:
_vsh- vertex shader_fsh- fragment shader_destroyShaders- if true, shaders will be destroyed when program is destroyed- Returns:
- program handle if vertex shader output and fragment shader input are matching, otherwise returns invalid program handle.
-
bgfx_create_compute_program
public static short bgfx_create_compute_program(short _csh, boolean _destroyShaders)Creates program with compute shader.- Parameters:
_csh- compute shader_destroyShaders- if true, shader will be destroyed when program is destroyed
-
bgfx_destroy_program
public static void bgfx_destroy_program(short _handle)
Destroy program.- Parameters:
_handle- the program to destroy
-
nbgfx_is_texture_valid
public static boolean nbgfx_is_texture_valid(short _depth, boolean _cubeMap, short _numLayers, int _format, long _flags)Unsafe version of:is_texture_valid
-
bgfx_is_texture_valid
public static boolean bgfx_is_texture_valid(int _depth, boolean _cubeMap, int _numLayers, int _format, long _flags)Validate texture parameters.- Parameters:
_depth- depth dimension of volume texture_cubeMap- indicates that texture contains cubemap_numLayers- number of layers in texture array_format- texture format. One of:_flags- texture flags. One or more of:- Returns:
- true if texture can be successfully created
-
nbgfx_is_frame_buffer_valid
public static boolean nbgfx_is_frame_buffer_valid(byte _num, long _attachment)Unsafe version of:is_frame_buffer_valid
-
bgfx_is_frame_buffer_valid
public static boolean bgfx_is_frame_buffer_valid(int _num, BGFXAttachment _attachment)Validate frame buffer parameters.- Parameters:
_num- number of attachments_attachment- attachment texture info- Returns:
- true if frame buffer can be successfully created
-
nbgfx_calc_texture_size
public static void nbgfx_calc_texture_size(long _info, short _width, short _height, short _depth, boolean _cubeMap, boolean _hasMips, short _numLayers, int _format)Unsafe version of:calc_texture_size
-
bgfx_calc_texture_size
public static void bgfx_calc_texture_size(BGFXTextureInfo _info, int _width, int _height, int _depth, boolean _cubeMap, boolean _hasMips, int _numLayers, int _format)
Calculates amount of memory required for texture.- Parameters:
_info- resulting texture info structure_width- width_height- height_depth- depth dimension of volume texture_cubeMap- indicates that texture contains cubemap_hasMips- indicates that texture contains full mip-map chain_numLayers- number of layers in texture array_format- texture format. One of:
-
nbgfx_create_texture
public static short nbgfx_create_texture(long _mem, long _flags, byte _skip, long _info)Unsafe version of:create_texture
-
bgfx_create_texture
public static short bgfx_create_texture(BGFXMemory _mem, long _flags, int _skip, @Nullable BGFXTextureInfo _info)
Creates texture from memory buffer.- Parameters:
_mem- DDS, KTX or PVR texture data_flags- texture creation and sampler flags. Default texture sampling mode is linear, and wrap mode is repeat. One or more of:_skip- skip top level mips when parsing texture_info- when non-NULLis specified it returns parsed texture information
-
nbgfx_create_texture_2d
public static short nbgfx_create_texture_2d(short _width, short _height, boolean _hasMips, short _numLayers, int _format, long _flags, long _mem)Unsafe version of:create_texture_2d
-
bgfx_create_texture_2d
public static short bgfx_create_texture_2d(int _width, int _height, boolean _hasMips, int _numLayers, int _format, long _flags, @Nullable BGFXMemory _mem)Creates 2D texture.- Parameters:
_width- width_height- height_hasMips- indicates that texture contains full mip-map chain_numLayers- number of layers in texture array. Must be 1 if capsCAPS_TEXTURE_2D_ARRAYflag is not set._format- texture format. One of:_flags- texture creation and sampler flags. Default texture sampling mode is linear, and wrap mode is repeat. One or more of:_mem- texture data. If_memis non-NULL, created texture will be immutable. When_numLayersis more than 1, expected memory layout is texture and all mips together for each array element.
-
nbgfx_create_texture_2d_scaled
public static short nbgfx_create_texture_2d_scaled(int _ratio, boolean _hasMips, short _numLayers, int _format, long _flags)Unsafe version of:create_texture_2d_scaled
-
bgfx_create_texture_2d_scaled
public static short bgfx_create_texture_2d_scaled(int _ratio, boolean _hasMips, int _numLayers, int _format, long _flags)Creates texture with size based on backbuffer ratio. Texture will maintain ratio if back buffer resolution changes.- Parameters:
_ratio- frame buffer size in respect to back-buffer size. One of:BACKBUFFER_RATIO_EQUALBACKBUFFER_RATIO_HALFBACKBUFFER_RATIO_QUARTERBACKBUFFER_RATIO_EIGHTHBACKBUFFER_RATIO_SIXTEENTHBACKBUFFER_RATIO_DOUBLE_hasMips- indicates that texture contains full mip-map chain_numLayers- number of layers in texture array. Must be 1 if capsCAPS_TEXTURE_2D_ARRAYflag is not set._format- texture format. One of:_flags- texture creation and sampler flags. Default texture sampling mode is linear, and wrap mode is repeat. One or more of:
-
nbgfx_create_texture_3d
public static short nbgfx_create_texture_3d(short _width, short _height, short _depth, boolean _hasMips, int _format, long _flags, long _mem)Unsafe version of:create_texture_3d
-
bgfx_create_texture_3d
public static short bgfx_create_texture_3d(int _width, int _height, int _depth, boolean _hasMips, int _format, long _flags, @Nullable BGFXMemory _mem)Creates 3D texture.- Parameters:
_width- width_height- height_depth- depth_hasMips- indicates that texture contains full mip-map chain_format- texture format. One of:_flags- texture creation and sampler flags. Default texture sampling mode is linear, and wrap mode is repeat. One or more of:_mem- texture data. If_memis non-NULL, created texture will be immutable.
-
nbgfx_create_texture_cube
public static short nbgfx_create_texture_cube(short _size, boolean _hasMips, short _numLayers, int _format, long _flags, long _mem)Unsafe version of:create_texture_cube
-
bgfx_create_texture_cube
public static short bgfx_create_texture_cube(int _size, boolean _hasMips, int _numLayers, int _format, long _flags, @Nullable BGFXMemory _mem)Creates Cube texture.- Parameters:
_size- cube side size_hasMips- indicates that texture contains full mip-map chain_numLayers- number of layers in texture array. Must be 1 if capsCAPS_TEXTURE_CUBE_ARRAYflag is not set._format- one of:_flags- texture creation and sampler flags. Default texture sampling mode is linear, and wrap mode is repeat. One or more of:_mem- texture data. If_memis non-NULL, created texture will be immutable. When_numLayersis more than 1, expected memory layout is cubemap texture and all mips together for each array element.
-
nbgfx_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)Unsafe version of:update_texture_2d
-
bgfx_update_texture_2d
public static void bgfx_update_texture_2d(short _handle, int _layer, int _mip, int _x, int _y, int _width, int _height, BGFXMemory _mem, int _pitch)Updates 2D texture.It's valid to update only mutable texture. See
create_texture_2dfor more info.- Parameters:
_handle- texture handle_layer- layers in texture array_mip- mip level_x- x offset in texture_y- y offset in texture_width- width of texture block_height- height of texture block_mem- texture update data_pitch- pitch of input image (bytes). When_pitchis set toUINT16_MAX, it will be calculated internally based on_width.
-
nbgfx_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)Unsafe version of:update_texture_3d
-
bgfx_update_texture_3d
public static void bgfx_update_texture_3d(short _handle, int _mip, int _x, int _y, int _z, int _width, int _height, int _depth, BGFXMemory _mem)Updates 3D texture.It's valid to update only mutable texture. See
create_texture_3dfor more info.- Parameters:
_handle- texture handle_mip- mip level_x- x offset in texture_y- y offset in texture_z- z offset in texture_width- width of texture block_height- height of texture block_depth- depth of texture block_mem- texture update data
-
nbgfx_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)Unsafe version of:update_texture_cube
-
bgfx_update_texture_cube
public static void bgfx_update_texture_cube(short _handle, int _layer, byte _side, int _mip, int _x, int _y, int _width, int _height, BGFXMemory _mem, int _pitch)Updates Cube texture.It's valid to update only mutable texture. See
create_texture_cubefor more info.- Parameters:
_handle- texture handle_layer- layers in texture array_side- cubemap side, where 0 is +X, 1 is -X, 2 is +Y, 3 is -Y, 4 is +Z, and 5 is -Z.+----------+ |-z 2| | ^ +y | | | | Unfolded cube: | +---->+x | +----------+----------+----------+----------+ |+y 1|+y 4|+y 0|+y 5| | ^ -x | ^ +z | ^ +x | ^ -z | | | | | | | | | | | +---->+z | +---->+x | +---->-z | +---->-x | +----------+----------+----------+----------+ |+z 3| | ^ -y | | | | | +---->+x | +----------+. One of:
CUBE_MAP_POSITIVE_XCUBE_MAP_NEGATIVE_XCUBE_MAP_POSITIVE_YCUBE_MAP_NEGATIVE_YCUBE_MAP_POSITIVE_ZCUBE_MAP_NEGATIVE_Z_mip- mip level_x- x offset in texture_y- y offset in texture_width- width of texture block_height- height of texture block_mem- texture update data_pitch- pitch of input image (bytes). When_pitchis set toUINT16_MAX, it will be calculated internally based on_width.
-
nbgfx_read_texture
public static int nbgfx_read_texture(short _handle, long _data, byte _mip)Unsafe version of:read_texture
-
bgfx_read_texture
public static int bgfx_read_texture(short _handle, java.nio.ByteBuffer _data, int _mip) public static int bgfx_read_texture(short _handle, java.nio.ShortBuffer _data, int _mip) public static int bgfx_read_texture(short _handle, java.nio.IntBuffer _data, int _mip) public static int bgfx_read_texture(short _handle, java.nio.FloatBuffer _data, int _mip)Reads back texture content.Texture must be created with
TEXTURE_READ_BACKflag. Availability depends onCAPS_TEXTURE_READ_BACK.- Parameters:
_handle- texture handle_data- destination buffer_mip- mip level- Returns:
- frame number when the result will be available
-
nbgfx_set_texture_name
public static void nbgfx_set_texture_name(short _handle, long _name, int _len)Unsafe version of:set_texture_name- Parameters:
_len- texture name length (if length isINT32_MAX, it's expected that_nameis zero terminated string)
-
bgfx_set_texture_name
public static void bgfx_set_texture_name(short _handle, java.nio.ByteBuffer _name) public static void bgfx_set_texture_name(short _handle, java.lang.CharSequence _name)Sets texture debug name.- Parameters:
_handle- texture handle_name- texture name
-
bgfx_get_direct_access_ptr
public static long bgfx_get_direct_access_ptr(short _handle)
Returns texture direct access pointer.Returns pointer to texture memory. If returned pointer is
NULLdirect access is not available for this texture. If pointer isUINTPTR_MAXsentinel 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:
CAPS_TEXTURE_DIRECT_ACCESS. This feature is available on GPUs that have unified memory architecture (UMA) support.
-
bgfx_destroy_texture
public static void bgfx_destroy_texture(short _handle)
Destroys texture.- Parameters:
_handle- texture handle
-
nbgfx_create_frame_buffer
public static short nbgfx_create_frame_buffer(short _width, short _height, int _format, long _textureFlags)Unsafe version of:create_frame_buffer
-
bgfx_create_frame_buffer
public static short bgfx_create_frame_buffer(int _width, int _height, int _format, long _textureFlags)Creates frame buffer (simple).- Parameters:
_width- texture width_height- texture height_format- texture format. One of:_textureFlags- default texture sampling mode is linear, and wrap mode is repeat. One of:- Returns:
- handle to frame buffer object
-
bgfx_create_frame_buffer_scaled
public static short bgfx_create_frame_buffer_scaled(int _ratio, int _format, long _textureFlags)Creates frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio if back buffer resolution changes.- Parameters:
_ratio- frame buffer size in respect to back-buffer size. One of:BACKBUFFER_RATIO_EQUALBACKBUFFER_RATIO_HALFBACKBUFFER_RATIO_QUARTERBACKBUFFER_RATIO_EIGHTHBACKBUFFER_RATIO_SIXTEENTHBACKBUFFER_RATIO_DOUBLE_format- texture format. One of:_textureFlags- default texture sampling mode is linear, and wrap mode is repeat. One of:- Returns:
- handle to frame buffer object
-
nbgfx_create_frame_buffer_from_handles
public static short nbgfx_create_frame_buffer_from_handles(byte _num, long _handles, boolean _destroyTextures)Unsafe version of:create_frame_buffer_from_handles- Parameters:
_num- number of texture attachments
-
bgfx_create_frame_buffer_from_handles
public static short bgfx_create_frame_buffer_from_handles(java.nio.ShortBuffer _handles, boolean _destroyTextures)Creates MRT frame buffer from texture handles (simple).- Parameters:
_handles- texture attachments_destroyTextures- if true, textures will be destroyed when frame buffer is destroyed- Returns:
- handle to frame buffer object
-
nbgfx_create_frame_buffer_from_attachment
public static short nbgfx_create_frame_buffer_from_attachment(byte _num, long _attachment, boolean _destroyTextures)Unsafe version of:create_frame_buffer_from_attachment- Parameters:
_num- number of attachments
-
bgfx_create_frame_buffer_from_attachment
public static short bgfx_create_frame_buffer_from_attachment(BGFXAttachment.Buffer _attachment, boolean _destroyTextures)
Create MRT frame buffer from texture handles with specific layer and mip level.- Parameters:
_attachment- attachment texture info_destroyTextures- if true, textures will be destroyed when frame buffer is destroyed- Returns:
- handle to frame buffer object
-
nbgfx_create_frame_buffer_from_nwh
public static short nbgfx_create_frame_buffer_from_nwh(long _nwh, short _width, short _height, int _format, int _depthFormat)Unsafe version of:create_frame_buffer_from_nwh
-
bgfx_create_frame_buffer_from_nwh
public static short bgfx_create_frame_buffer_from_nwh(long _nwh, int _width, int _height, int _format, int _depthFormat)Creates frame buffer for multiple window rendering.Frame buffer cannot be used for sampling.
- Parameters:
_nwh- OS' target native window handle_width- window back buffer width_height- window back buffer height_format- window back buffer color format. One of:_depthFormat- window back buffer depth format. One of:- Returns:
- handle to frame buffer object
-
nbgfx_set_frame_buffer_name
public static void nbgfx_set_frame_buffer_name(short _handle, long _name, int _len)Unsafe version of:set_frame_buffer_name- Parameters:
_len- frame buffer name length (if length isINT32_MAX, it's expected that_nameis zero terminated string)
-
bgfx_set_frame_buffer_name
public static void bgfx_set_frame_buffer_name(short _handle, java.nio.ByteBuffer _name) public static void bgfx_set_frame_buffer_name(short _handle, java.lang.CharSequence _name)Set frame buffer debug name.- Parameters:
_handle- frame buffer handle_name- frame buffer name
-
nbgfx_get_texture
public static short nbgfx_get_texture(short _handle, byte _attachment)Unsafe version of:get_texture
-
bgfx_get_texture
public static short bgfx_get_texture(short _handle, int _attachment)Obtains texture handle of frame buffer attachment.- Parameters:
_handle- frame buffer handle_attachment- frame buffer attachment index- Returns:
- invalid texture handle if attachment index is not correct, or frame buffer is created with native window handle
-
bgfx_destroy_frame_buffer
public static void bgfx_destroy_frame_buffer(short _handle)
Destroys frame buffer.- Parameters:
_handle- the frame buffer to destroy
-
nbgfx_create_uniform
public static short nbgfx_create_uniform(long _name, int _type, short _num)Unsafe version of:create_uniform
-
bgfx_create_uniform
public static short bgfx_create_uniform(java.nio.ByteBuffer _name, int _type, int _num) public static short bgfx_create_uniform(java.lang.CharSequence _name, int _type, int _num)Creates shader uniform parameter.Uniform names are unique. It's valid to call
bgfx_create_uniformmultiple 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 ofdestroy_uniformmust be called to properly destroy the uniform.Predefined uniforms (declared in
bgfx_shader.sh):u_viewRect vec4(x, y, width, height)- view rectangle for current view, in pixels.u_viewTexel vec4(1.0/width, 1.0/height, undef, undef)- inverse width and heightu_view mat4- view matrixu_invView mat4- inverted view matrixu_proj mat4- projection matrixu_invProj mat4- inverted projection matrixu_viewProj mat4- concatenated view projection matrixu_invViewProj mat4- concatenated inverted view projection matrixu_model mat4[BGFX_CONFIG_MAX_BONES]- array of model matrices.u_modelView mat4- concatenated model view matrix, only first model matrix from array is used.u_modelViewProj mat4- concatenated model view projection matrix.u_alphaRef float- alpha reference value for alpha test.
- Parameters:
_name- uniform name in shader_type- type of uniform. One of:UNIFORM_TYPE_SAMPLERUNIFORM_TYPE_ENDUNIFORM_TYPE_VEC4UNIFORM_TYPE_MAT3UNIFORM_TYPE_MAT4_num- number of elements in array- Returns:
- handle to uniform object
-
nbgfx_get_uniform_info
public static void nbgfx_get_uniform_info(short _handle, long _info)Unsafe version of:get_uniform_info
-
bgfx_get_uniform_info
public static void bgfx_get_uniform_info(short _handle, BGFXUniformInfo _info)Retrieves uniform info.- Parameters:
_handle- handle to uniform object_info- uniform info
-
bgfx_destroy_uniform
public static void bgfx_destroy_uniform(short _handle)
Destroys shader uniform parameter.- Parameters:
_handle- handle to uniform object
-
bgfx_create_occlusion_query
public static short bgfx_create_occlusion_query()
Creates occlusion query.- Returns:
- handle to occlusion query object
-
nbgfx_get_result
public static int nbgfx_get_result(short _handle, long _result)Unsafe version of:get_result
-
bgfx_get_result
public static int bgfx_get_result(short _handle, @Nullable java.nio.IntBuffer _result)Retrieves occlusion query result from previous frame.- Parameters:
_handle- handle to occlusion query object_result- number of pixels that passed test. This argument can beNULLif result of occlusion query is not needed.- Returns:
- occlusion query result
-
bgfx_destroy_occlusion_query
public static void bgfx_destroy_occlusion_query(short _handle)
Destroys occlusion query.- Parameters:
_handle- handle to occlusion query object
-
nbgfx_set_palette_color
public static void nbgfx_set_palette_color(byte _index, long _rgba)Unsafe version of:set_palette_color
-
bgfx_set_palette_color
public static void bgfx_set_palette_color(int _index, java.nio.FloatBuffer _rgba)Sets palette color value.- Parameters:
_index- index into palette_rgba- RGBA floating point values
-
nbgfx_set_palette_color_rgba8
public static void nbgfx_set_palette_color_rgba8(byte _index, int _rgba)Unsafe version of:set_palette_color_rgba8
-
bgfx_set_palette_color_rgba8
public static void bgfx_set_palette_color_rgba8(int _index, int _rgba)Sets palette color value.- Parameters:
_index- index into palette_rgba- packed 32-bit RGBA value
-
nbgfx_set_view_name
public static void nbgfx_set_view_name(short _id, long _name)Unsafe version of:set_view_name
-
bgfx_set_view_name
public static void bgfx_set_view_name(int _id, java.nio.ByteBuffer _name) public static void bgfx_set_view_name(int _id, java.lang.CharSequence _name)Sets view name.This is debug only feature. In graphics debugger view name will appear as:
"nnnce <view name>" ^ ^^ ^ | |+-- eye (L/R) | +--- compute (C) +------ view id- Parameters:
_id- view id_name- view name
-
nbgfx_set_view_rect
public static void nbgfx_set_view_rect(short _id, short _x, short _y, short _width, short _height)Unsafe version of:set_view_rect
-
bgfx_set_view_rect
public static void bgfx_set_view_rect(int _id, int _x, int _y, int _width, int _height)Sets view rectangle. Draw primitive outside view will be clipped.- Parameters:
_id- view id_x- position x from the left corner of the window_y- position y from the top corner of the window_width- width of view port region_height- height of view port region
-
nbgfx_set_view_rect_ratio
public static void nbgfx_set_view_rect_ratio(short _id, short _x, short _y, int _ratio)Unsafe version of:set_view_rect_ratio
-
bgfx_set_view_rect_ratio
public static void bgfx_set_view_rect_ratio(int _id, int _x, int _y, int _ratio)Sets view rectangle. Draw primitive outside view will be clipped.- Parameters:
_id- view id_x- position x from the left corner of the window_y- position y from the top corner of the window_ratio- width and height will be set in respect to back-buffer size. One of:BACKBUFFER_RATIO_EQUALBACKBUFFER_RATIO_HALFBACKBUFFER_RATIO_QUARTERBACKBUFFER_RATIO_EIGHTHBACKBUFFER_RATIO_SIXTEENTHBACKBUFFER_RATIO_DOUBLE
-
nbgfx_set_view_scissor
public static void nbgfx_set_view_scissor(short _id, short _x, short _y, short _width, short _height)Unsafe version of:set_view_scissor
-
bgfx_set_view_scissor
public static void bgfx_set_view_scissor(int _id, int _x, int _y, int _width, int _height)Sets view scissor. Draw primitive outside view will be clipped. When_x,_y,_widthand_heightare set to 0, scissor will be disabled.- Parameters:
_id- view id_x- position x from the left corner of the window_y- position y from the top corner of the window_width- width of scissor region_height- height of scissor region
-
nbgfx_set_view_clear
public static void nbgfx_set_view_clear(short _id, short _flags, int _rgba, float _depth, byte _stencil)Unsafe version of:set_view_clear
-
bgfx_set_view_clear
public static void bgfx_set_view_clear(int _id, int _flags, int _rgba, float _depth, int _stencil)Sets view clear flags.- Parameters:
_id- view id_flags- clear flags. UseCLEAR_NONEto remove any clear operation. One or more of:_rgba- color clear value_depth- depth clear value_stencil- stencil clear value
-
nbgfx_set_view_clear_mrt
public static void nbgfx_set_view_clear_mrt(short _id, short _flags, float _depth, byte _stencil, byte _0, byte _1, byte _2, byte _3, byte _4, byte _5, byte _6, byte _7)Unsafe version of:set_view_clear_mrt
-
bgfx_set_view_clear_mrt
public static void bgfx_set_view_clear_mrt(int _id, int _flags, float _depth, int _stencil, byte _0, byte _1, byte _2, byte _3, byte _4, byte _5, byte _6, byte _7)Sets view clear flags with different clear color for each frame buffer texture. Must useset_palette_colorto setup clear color palette.- Parameters:
_id- view id_flags- clear flags. UseCLEAR_NONEto remove any clear operation. One or more of:_depth- depth clear value_stencil- stencil clear value_0- palette index for frame buffer attachment 0_1- palette index for frame buffer attachment 1_2- palette index for frame buffer attachment 2_3- palette index for frame buffer attachment 3_4- palette index for frame buffer attachment 4_5- palette index for frame buffer attachment 5_6- palette index for frame buffer attachment 6_7- palette index for frame buffer attachment 7
-
nbgfx_set_view_mode
public static void nbgfx_set_view_mode(short _id, int _mode)Unsafe version of:set_view_mode
-
bgfx_set_view_mode
public static void bgfx_set_view_mode(int _id, int _mode)Sets view sorting mode.- Parameters:
_id- view id_mode- view sort mode. One of:VIEW_MODE_DEFAULTVIEW_MODE_SEQUENTIALVIEW_MODE_DEPTH_ASCENDINGVIEW_MODE_DEPTH_DESCENDING
-
nbgfx_set_view_frame_buffer
public static void nbgfx_set_view_frame_buffer(short _id, short _handle)Unsafe version of:set_view_frame_buffer
-
bgfx_set_view_frame_buffer
public static void bgfx_set_view_frame_buffer(int _id, short _handle)Sets view frame buffer.Not persistent after
resetcall.- Parameters:
_id- view id_handle- frame buffer handle. PassingINVALID_HANDLEas frame buffer handle will draw primitives from this view into default back buffer.
-
nbgfx_set_view_transform
public static void nbgfx_set_view_transform(short _id, long _view, long _proj)Unsafe version of:set_view_transform
-
bgfx_set_view_transform
public static void bgfx_set_view_transform(int _id, @Nullable java.nio.ByteBuffer _view, @Nullable java.nio.ByteBuffer _proj) public static void bgfx_set_view_transform(int _id, @Nullable java.nio.FloatBuffer _view, @Nullable java.nio.FloatBuffer _proj)Sets view view and projection matrices, all draw primitives in this view will use these matrices.- Parameters:
_id- view id_view- view matrix_proj- projection matrix
-
nbgfx_set_view_order
public static void nbgfx_set_view_order(short _id, short _num, long _order)Unsafe version of:set_view_order
-
bgfx_set_view_order
public static void bgfx_set_view_order(int _id, int _num, @Nullable java.nio.ShortBuffer _order)Post submit view reordering.- Parameters:
_id- view id_num- number of views to remap_order- view remap id table. PassingNULLwill reset view ids to default state
-
nbgfx_reset_view
public static void nbgfx_reset_view(short _id)
Unsafe version of:reset_view
-
bgfx_reset_view
public static void bgfx_reset_view(int _id)
Reset all view settings to default.- Parameters:
_id- view id
-
bgfx_encoder_begin
public static long bgfx_encoder_begin(boolean _forThread)
Begin submitting draw calls from thread.- Parameters:
_forThread- explicitly request an encoder for a worker thread- Returns:
- an encoder for submitting draw calls from multiple threads
-
bgfx_encoder_end
public static void bgfx_encoder_end(long _encoder)
End submitting draw calls from thread.- Parameters:
_encoder- the encoder
-
nbgfx_encoder_set_marker
public static void nbgfx_encoder_set_marker(long _this, long _marker)Unsafe version of:encoder_set_marker
-
bgfx_encoder_set_marker
public static void bgfx_encoder_set_marker(long _this, java.nio.ByteBuffer _marker) public static void bgfx_encoder_set_marker(long _this, java.lang.CharSequence _marker)Sets debug marker.- Parameters:
_this- the encoder_marker- debug marker
-
bgfx_encoder_set_state
public static void bgfx_encoder_set_state(long _this, long _state, int _rgba)Sets render states for draw primitive.Remarks:
- To setup more complex states use:
BGFX_STATE_ALPHA_REF(_ref), BGFX_STATE_POINT_SIZE(_size), BGFX_STATE_BLEND_FUNC(_src, _dst), BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA) BGFX_STATE_BLEND_EQUATION(_equation) BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA) STATE_BLEND_EQUATION_ADDis set when no other blend equation is specified.
- Parameters:
_this- the encoder_state- state flags. One or more of:_rgba- blend factor used bySTATE_BLEND_FACTORandSTATE_BLEND_INV_FACTORblend modes
- To setup more complex states use:
-
bgfx_encoder_set_condition
public static void bgfx_encoder_set_condition(long _this, short _handle, boolean _visible)Sets condition for rendering.- Parameters:
_this- the encoder_handle- occlusion query handle_visible- render if occlusion query is visible
-
bgfx_encoder_set_stencil
public static void bgfx_encoder_set_stencil(long _this, int _fstencil, int _bstencil)Sets stencil test state.- Parameters:
_this- the encoder_fstencil- front stencil state. One or more of:_bstencil- back stencil state. If back is set toSTENCIL_NONE_fstencilis applied to both front and back facing primitives. One or more of:
-
nbgfx_encoder_set_scissor
public static short nbgfx_encoder_set_scissor(long _this, short _x, short _y, short _width, short _height)Unsafe version of:encoder_set_scissor
-
bgfx_encoder_set_scissor
public static short bgfx_encoder_set_scissor(long _this, int _x, int _y, int _width, int _height)Sets scissor for draw primitive. To scissor for all primitives in view seeset_view_scissor.- Parameters:
_this- the encoder_x- position x from the left side of the window_y- position y from the top side of the window_width- width of scissor region_height- height of scissor region- Returns:
- scissor cache index
-
nbgfx_encoder_set_scissor_cached
public static void nbgfx_encoder_set_scissor_cached(long _this, short _cache)Unsafe version of:encoder_set_scissor_cached
-
bgfx_encoder_set_scissor_cached
public static void bgfx_encoder_set_scissor_cached(long _this, int _cache)Sets scissor from cache for draw primitive.- Parameters:
_this- the encoder_cache- index in scissor cache. PassUINT16_MAXto have primitive use view scissor instead.
-
nbgfx_encoder_set_transform
public static int nbgfx_encoder_set_transform(long _this, long _mtx, short _num)Unsafe version of:encoder_set_transform- Parameters:
_num- number of matrices in array
-
bgfx_encoder_set_transform
public static int bgfx_encoder_set_transform(long _this, java.nio.ByteBuffer _mtx) public static int bgfx_encoder_set_transform(long _this, java.nio.FloatBuffer _mtx)Sets model matrix for draw primitive. If it is not called, the model will be rendered with identity model matrix.- Parameters:
_this- the encoder_mtx- pointer to first matrix in array- Returns:
- index into matrix cache in case the same model matrix has to be used for other draw primitive call
-
nbgfx_encoder_set_transform_cached
public static void nbgfx_encoder_set_transform_cached(long _this, int _cache, short _num)Unsafe version of:encoder_set_transform_cached
-
bgfx_encoder_set_transform_cached
public static void bgfx_encoder_set_transform_cached(long _this, int _cache, int _num)Sets model matrix from matrix cache for draw primitive.- Parameters:
_this- the encoder_cache- index in matrix cache_num- number of matrices from cache
-
nbgfx_encoder_alloc_transform
public static int nbgfx_encoder_alloc_transform(long _this, long _transform, short _num)Unsafe version of:encoder_alloc_transform
-
bgfx_encoder_alloc_transform
public static int bgfx_encoder_alloc_transform(long _this, BGFXTransform _transform, int _num)Reserves_nummatrices in internal matrix cache.Pointer returned can be modified until
frameis called.- Parameters:
_this- the encoder_transform- pointer toBGFXTransformstructure_num- number of matrices- Returns:
- index into matrix cache
-
nbgfx_encoder_set_uniform
public static void nbgfx_encoder_set_uniform(long _this, short _handle, long _value, short _num)Unsafe version of:encoder_set_uniform
-
bgfx_encoder_set_uniform
public static void bgfx_encoder_set_uniform(long _this, short _handle, java.nio.ByteBuffer _value, int _num) public static void bgfx_encoder_set_uniform(long _this, short _handle, java.nio.ShortBuffer _value, int _num) public static void bgfx_encoder_set_uniform(long _this, short _handle, java.nio.IntBuffer _value, int _num) public static void bgfx_encoder_set_uniform(long _this, short _handle, java.nio.LongBuffer _value, int _num) public static void bgfx_encoder_set_uniform(long _this, short _handle, java.nio.FloatBuffer _value, int _num) public static void bgfx_encoder_set_uniform(long _this, short _handle, java.nio.DoubleBuffer _value, int _num)Sets shader uniform parameter for draw primitive.- Parameters:
_this- the encoder_handle- uniform_value- pointer to uniform data_num- number of elements. PassingUINT16_MAXwill use the_numpassed on uniform creation.
-
bgfx_encoder_set_index_buffer
public static void bgfx_encoder_set_index_buffer(long _this, short _handle, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.- Parameters:
_this- the encoder_handle- index buffer_firstIndex- first index to render_numIndices- number of indices to render
-
bgfx_encoder_set_dynamic_index_buffer
public static void bgfx_encoder_set_dynamic_index_buffer(long _this, short _handle, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.- Parameters:
_this- the encoder_handle- dynamic index buffer_firstIndex- first index to render_numIndices- number of indices to render
-
nbgfx_encoder_set_transient_index_buffer
public static void nbgfx_encoder_set_transient_index_buffer(long _this, long _tib, int _firstIndex, int _numIndices)Unsafe version of:encoder_set_transient_index_buffer
-
bgfx_encoder_set_transient_index_buffer
public static void bgfx_encoder_set_transient_index_buffer(long _this, BGFXTransientIndexBuffer _tib, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.- Parameters:
_this- the encoder_tib- transient index buffer_firstIndex- first index to render_numIndices- number of indices to render
-
nbgfx_encoder_set_vertex_buffer
public static void nbgfx_encoder_set_vertex_buffer(long _this, byte _stream, short _handle, int _startVertex, int _numVertices)Unsafe version of:encoder_set_vertex_buffer
-
bgfx_encoder_set_vertex_buffer
public static void bgfx_encoder_set_vertex_buffer(long _this, int _stream, short _handle, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.- Parameters:
_this- the encoder_stream- vertex stream_handle- vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render
-
nbgfx_encoder_set_vertex_buffer_with_layout
public static void nbgfx_encoder_set_vertex_buffer_with_layout(long _this, byte _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:encoder_set_vertex_buffer_with_layout
-
bgfx_encoder_set_vertex_buffer_with_layout
public static void bgfx_encoder_set_vertex_buffer_with_layout(long _this, int _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.- Parameters:
_this- the encoder_stream- vertex stream_handle- vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render_layoutHandle- vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.
-
nbgfx_encoder_set_dynamic_vertex_buffer
public static void nbgfx_encoder_set_dynamic_vertex_buffer(long _this, byte _stream, short _handle, int _startVertex, int _numVertices)Unsafe version of:encoder_set_dynamic_vertex_buffer
-
bgfx_encoder_set_dynamic_vertex_buffer
public static void bgfx_encoder_set_dynamic_vertex_buffer(long _this, int _stream, short _handle, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.- Parameters:
_this- the encoder_stream- vertex stream_handle- dynamic vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render
-
nbgfx_encoder_set_dynamic_vertex_buffer_with_layout
public static void nbgfx_encoder_set_dynamic_vertex_buffer_with_layout(long _this, byte _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:encoder_set_dynamic_vertex_buffer_with_layout
-
bgfx_encoder_set_dynamic_vertex_buffer_with_layout
public static void bgfx_encoder_set_dynamic_vertex_buffer_with_layout(long _this, int _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.- Parameters:
_this- the encoder_stream- vertex stream_handle- dynamic vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render_layoutHandle- vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.
-
nbgfx_encoder_set_transient_vertex_buffer
public static void nbgfx_encoder_set_transient_vertex_buffer(long _this, byte _stream, long _tvb, int _startVertex, int _numVertices)Unsafe version of:encoder_set_transient_vertex_buffer
-
bgfx_encoder_set_transient_vertex_buffer
public static void bgfx_encoder_set_transient_vertex_buffer(long _this, int _stream, BGFXTransientVertexBuffer _tvb, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.- Parameters:
_this- the encoder_stream- vertex stream_tvb- transient vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render
-
nbgfx_encoder_set_transient_vertex_buffer_with_layout
public static void nbgfx_encoder_set_transient_vertex_buffer_with_layout(long _this, byte _stream, long _tvb, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:encoder_set_transient_vertex_buffer_with_layout
-
bgfx_encoder_set_transient_vertex_buffer_with_layout
public static void bgfx_encoder_set_transient_vertex_buffer_with_layout(long _this, int _stream, BGFXTransientVertexBuffer _tvb, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.- Parameters:
_this- the encoder_stream- vertex stream_tvb- transient vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render_layoutHandle- vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.
-
bgfx_encoder_set_vertex_count
public static void bgfx_encoder_set_vertex_count(long _this, int _numVertices)Set number of vertices for auto generated vertices use in conjunction withgl_VertexID.Availability depends on:
CAPS_VERTEX_ID.- Parameters:
_this- the encoder_numVertices- number of vertices
-
nbgfx_encoder_set_instance_data_buffer
public static void nbgfx_encoder_set_instance_data_buffer(long _this, long _idb, int _start, int _num)Unsafe version of:encoder_set_instance_data_buffer
-
bgfx_encoder_set_instance_data_buffer
public static void bgfx_encoder_set_instance_data_buffer(long _this, BGFXInstanceDataBuffer _idb, int _start, int _num)Sets instance data buffer for draw primitive.- Parameters:
_this- the encoder_idb- transient instance data buffer_start- first instance data_num- number of data instances
-
bgfx_encoder_set_instance_data_from_vertex_buffer
public static void bgfx_encoder_set_instance_data_from_vertex_buffer(long _this, short _handle, int _start, int _num)Set instance data buffer for draw primitive.- Parameters:
_this- the encoder_handle- vertex buffer_start- first instance data_num- number of data instances
-
bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer
public static void bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(long _this, short _handle, int _start, int _num)Set instance data buffer for draw primitive.- Parameters:
_this- the encoder_handle- dynamic vertex buffer_start- first instance data_num- number of data instances
-
bgfx_encoder_set_instance_count
public static void bgfx_encoder_set_instance_count(long _this, int _numInstances)Sets number of instances for auto generated instances use in conjuction withgl_InstanceID.Availability depends on:
CAPS_VERTEX_ID.- Parameters:
_this- the encoder_numInstances- number of instances
-
nbgfx_encoder_set_texture
public static void nbgfx_encoder_set_texture(long _this, byte _stage, short _sampler, short _handle, int _flags)Unsafe version of:encoder_set_texture
-
bgfx_encoder_set_texture
public static void bgfx_encoder_set_texture(long _this, int _stage, short _sampler, short _handle, int _flags)Sets texture stage for draw primitive.- Parameters:
_this- the encoder_stage- texture unit_sampler- program sampler_handle- texture handle_flags- texture sampling mode.UINT32_MAXuses texture sampling settings from the texture. One of:
-
nbgfx_encoder_touch
public static void nbgfx_encoder_touch(long _this, short _id)Unsafe version of:encoder_touch
-
bgfx_encoder_touch
public static void bgfx_encoder_touch(long _this, int _id)Submits an empty primitive for rendering.Uniforms and draw state will be applied but no geometry will be submitted. Useful in cases when no other draw/compute primitive is submitted to view, but it's desired to execute clear view.
These empty draw calls will sort before ordinary draw calls.
- Parameters:
_this- the encoder_id- view id
-
nbgfx_encoder_submit
public static void nbgfx_encoder_submit(long _this, short _id, short _handle, int _depth, byte _flags)Unsafe version of:encoder_submit
-
bgfx_encoder_submit
public static void bgfx_encoder_submit(long _this, int _id, short _handle, int _depth, int _flags)Submits primitive for rendering.- Parameters:
_this- the encoder_id- view id_handle- program_depth- depth for sorting_flags- discard or preserve states. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_encoder_submit_occlusion_query
public static void nbgfx_encoder_submit_occlusion_query(long _this, short _id, short _program, short _occlusionQuery, int _depth, byte _flags)Unsafe version of:encoder_submit_occlusion_query
-
bgfx_encoder_submit_occlusion_query
public static void bgfx_encoder_submit_occlusion_query(long _this, int _id, short _program, short _occlusionQuery, int _depth, int _flags)Submits primitive with occlusion query for rendering.- Parameters:
_this- the encoder_id- view id_program- program_occlusionQuery- occlusion query_depth- depth for sorting_flags- discard or preserve states. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_encoder_submit_indirect
public static void nbgfx_encoder_submit_indirect(long _this, short _id, short _handle, short _indirectHandle, short _start, short _num, int _depth, byte _flags)Unsafe version of:encoder_submit_indirect
-
bgfx_encoder_submit_indirect
public static void bgfx_encoder_submit_indirect(long _this, int _id, short _handle, short _indirectHandle, int _start, int _num, int _depth, int _flags)Submits primitive for rendering with index and instance data info from indirect buffer.- Parameters:
_this- the encoder_id- view id_handle- program_indirectHandle- indirect buffer_start- first element in indirect buffer_num- number of dispatches_depth- depth for sorting_flags- discard or preserve states. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_encoder_set_compute_index_buffer
public static void nbgfx_encoder_set_compute_index_buffer(long _this, byte _stage, short _handle, int _access)Unsafe version of:encoder_set_compute_index_buffer
-
bgfx_encoder_set_compute_index_buffer
public static void bgfx_encoder_set_compute_index_buffer(long _this, int _stage, short _handle, int _access)Sets compute index buffer.- Parameters:
_this- the encoder_stage- compute stage_handle- index buffer handle_access- buffer access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE
-
nbgfx_encoder_set_compute_vertex_buffer
public static void nbgfx_encoder_set_compute_vertex_buffer(long _this, byte _stage, short _handle, int _access)Unsafe version of:encoder_set_compute_vertex_buffer
-
bgfx_encoder_set_compute_vertex_buffer
public static void bgfx_encoder_set_compute_vertex_buffer(long _this, int _stage, short _handle, int _access)Sets compute vertex buffer.- Parameters:
_this- the encoder_stage- compute stage_handle- vertex buffer handle_access- buffer access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE
-
nbgfx_encoder_set_compute_dynamic_index_buffer
public static void nbgfx_encoder_set_compute_dynamic_index_buffer(long _this, byte _stage, short _handle, int _access)Unsafe version of:encoder_set_compute_dynamic_index_buffer
-
bgfx_encoder_set_compute_dynamic_index_buffer
public static void bgfx_encoder_set_compute_dynamic_index_buffer(long _this, int _stage, short _handle, int _access)Sets compute dynamic index buffer.- Parameters:
_this- the encoder_stage- compute stage_handle- dynamic index buffer handle_access- buffer access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE
-
nbgfx_encoder_set_compute_dynamic_vertex_buffer
public static void nbgfx_encoder_set_compute_dynamic_vertex_buffer(long _this, byte _stage, short _handle, int _access)Unsafe version of:encoder_set_compute_dynamic_vertex_buffer
-
bgfx_encoder_set_compute_dynamic_vertex_buffer
public static void bgfx_encoder_set_compute_dynamic_vertex_buffer(long _this, int _stage, short _handle, int _access)Sets compute dynamic vertex buffer.- Parameters:
_this- the encoder_stage- compute stage_handle- dynamic vertex buffer handle_access- buffer access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE
-
nbgfx_encoder_set_compute_indirect_buffer
public static void nbgfx_encoder_set_compute_indirect_buffer(long _this, byte _stage, short _handle, int _access)Unsafe version of:encoder_set_compute_indirect_buffer
-
bgfx_encoder_set_compute_indirect_buffer
public static void bgfx_encoder_set_compute_indirect_buffer(long _this, int _stage, short _handle, int _access)Sets compute indirect buffer.- Parameters:
_this- the encoder_stage- compute stage_handle- indirect buffer handle_access- buffer access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE
-
nbgfx_encoder_set_image
public static void nbgfx_encoder_set_image(long _this, byte _stage, short _handle, byte _mip, int _access, int _format)Unsafe version of:encoder_set_image
-
bgfx_encoder_set_image
public static void bgfx_encoder_set_image(long _this, int _stage, short _handle, int _mip, int _access, int _format)Sets compute image from texture.- Parameters:
_this- the encoder_stage- texture unit_handle- texture handle_mip- mip level_access- texture access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE_format- texture format. One of:
-
nbgfx_encoder_dispatch
public static void nbgfx_encoder_dispatch(long _this, short _id, short _handle, int _numX, int _numY, int _numZ, byte _flags)Unsafe version of:encoder_dispatch
-
bgfx_encoder_dispatch
public static void bgfx_encoder_dispatch(long _this, int _id, short _handle, int _numX, int _numY, int _numZ, int _flags)Dispatches compute.- Parameters:
_this- the encoder_id- view id_handle- compute program_numX- number of groups X_numY- number of groups Y_numZ- number of groups Z_flags- discard or preserve states. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_encoder_dispatch_indirect
public static void nbgfx_encoder_dispatch_indirect(long _this, short _id, short _handle, short _indirectHandle, short _start, short _num, byte _flags)Unsafe version of:encoder_dispatch_indirect
-
bgfx_encoder_dispatch_indirect
public static void bgfx_encoder_dispatch_indirect(long _this, int _id, short _handle, short _indirectHandle, int _start, int _num, int _flags)Dispatches compute indirect.- Parameters:
_this- the encoder_id- view id_handle- compute program_indirectHandle- indirect buffer_start- first element in indirect buffer_num- number of dispatches_flags- discard or preserve states. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_encoder_discard
public static void nbgfx_encoder_discard(long _this, byte _flags)Unsafe version of:encoder_discard
-
bgfx_encoder_discard
public static void bgfx_encoder_discard(long _this, int _flags)Discards all previously set state for draw or compute call.- Parameters:
_this- the encoder_flags- discard or preserve states. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_encoder_blit
public static void nbgfx_encoder_blit(long _this, 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)Unsafe version of:encoder_blit
-
bgfx_encoder_blit
public static void bgfx_encoder_blit(long _this, int _id, short _dst, int _dstMip, int _dstX, int _dstY, int _dstZ, short _src, int _srcMip, int _srcX, int _srcY, int _srcZ, int _width, int _height, int _depth)Blits texture region between two textures.Destination texture must be created with
TEXTURE_BLIT_DSTflag. Availability depends onCAPS_TEXTURE_BLIT.- Parameters:
_this- the encoder_id- view id_dst- destination texture handle_dstMip- destination texture mip level_dstX- destination texture X position_dstY- destination texture Y position_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._src- source texture handle_srcMip- source texture mip level_srcX- source texture X position_srcY- source texture Y position_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._width- width of region_height- height of region_depth- if texture is 3D this argument represents depth of region, otherwise it's unused
-
nbgfx_request_screen_shot
public static void nbgfx_request_screen_shot(short _handle, long _filePath)Unsafe version of:request_screen_shot
-
bgfx_request_screen_shot
public static void bgfx_request_screen_shot(short _handle, java.nio.ByteBuffer _filePath) public static void bgfx_request_screen_shot(short _handle, java.lang.CharSequence _filePath)Requests screen shot.- Parameters:
_handle- frame buffer handle_filePath- will be passed toBGFXScreenShotCallback
-
nbgfx_set_marker
public static void nbgfx_set_marker(long _marker)
Unsafe version of:set_marker
-
bgfx_set_marker
public static void bgfx_set_marker(java.nio.ByteBuffer _marker) public static void bgfx_set_marker(java.lang.CharSequence _marker)
Sets debug marker.- Parameters:
_marker- debug marker
-
bgfx_set_state
public static void bgfx_set_state(long _state, int _rgba)Sets render states for draw primitive.Remarks:
- To setup more complex states use:
BGFX_STATE_ALPHA_REF(_ref), BGFX_STATE_POINT_SIZE(_size), BGFX_STATE_BLEND_FUNC(_src, _dst), BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA) BGFX_STATE_BLEND_EQUATION(_equation) BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA) STATE_BLEND_EQUATION_ADDis set when no other blend equation is specified.
- Parameters:
_state- state flags. One or more of:_rgba- blend factor used bySTATE_BLEND_FACTORandSTATE_BLEND_INV_FACTORblend modes
- To setup more complex states use:
-
bgfx_set_condition
public static void bgfx_set_condition(short _handle, boolean _visible)Sets condition for rendering.- Parameters:
_handle- occlusion query handle_visible- render if occlusion query is visible
-
bgfx_set_stencil
public static void bgfx_set_stencil(int _fstencil, int _bstencil)Sets stencil test state.- Parameters:
_fstencil- front stencil state. One or more of:_bstencil- back stencil state. If back is set toSTENCIL_NONE_fstencilis applied to both front and back facing primitives. One or more of:
-
nbgfx_set_scissor
public static short nbgfx_set_scissor(short _x, short _y, short _width, short _height)Unsafe version of:set_scissor
-
bgfx_set_scissor
public static short bgfx_set_scissor(int _x, int _y, int _width, int _height)Sets scissor for draw primitive. For scissor for all primitives in view seeset_view_scissor.- Parameters:
_x- position x from the left corner of the window_y- position y from the top corner of the window_width- width of scissor region_height- height of scissor region- Returns:
- scissor cache index
-
nbgfx_set_scissor_cached
public static void nbgfx_set_scissor_cached(short _cache)
Unsafe version of:set_scissor_cached
-
bgfx_set_scissor_cached
public static void bgfx_set_scissor_cached(int _cache)
Sets scissor from cache for draw primitive.- Parameters:
_cache- index in scissor cache. PassingUINT16_MAXunsets primitive scissor and primitive will use view scissor instead.
-
nbgfx_set_transform
public static int nbgfx_set_transform(long _mtx, short _num)Unsafe version of:set_transform- Parameters:
_num- number of matrices in array
-
bgfx_set_transform
public static int bgfx_set_transform(java.nio.ByteBuffer _mtx) public static int bgfx_set_transform(java.nio.FloatBuffer _mtx)
Sets model matrix for draw primitive. If it is not called model will be rendered with identity model matrix.- Parameters:
_mtx- pointer to first matrix in array- Returns:
- index into matrix cache in case the same model matrix has to be used for other draw primitive call
-
nbgfx_set_transform_cached
public static void nbgfx_set_transform_cached(int _cache, short _num)Unsafe version of:set_transform_cached
-
bgfx_set_transform_cached
public static void bgfx_set_transform_cached(int _cache, int _num)Sets model matrix from matrix cache for draw primitive.- Parameters:
_cache- index in matrix cache_num- number of matrices from cache
-
nbgfx_alloc_transform
public static int nbgfx_alloc_transform(long _transform, short _num)Unsafe version of:alloc_transform
-
bgfx_alloc_transform
public static int bgfx_alloc_transform(BGFXTransform _transform, int _num)
Reserves_nummatrices in internal matrix cache.Pointer returned can be modified until
frameis called.- Parameters:
_transform- pointer toBGFXTransformstructure_num- number of matrices- Returns:
- index into matrix cache
-
nbgfx_set_uniform
public static void nbgfx_set_uniform(short _handle, long _value, short _num)Unsafe version of:set_uniform
-
bgfx_set_uniform
public static void bgfx_set_uniform(short _handle, java.nio.ByteBuffer _value, int _num) public static void bgfx_set_uniform(short _handle, java.nio.ShortBuffer _value, int _num) public static void bgfx_set_uniform(short _handle, java.nio.IntBuffer _value, int _num) public static void bgfx_set_uniform(short _handle, java.nio.LongBuffer _value, int _num) public static void bgfx_set_uniform(short _handle, java.nio.FloatBuffer _value, int _num) public static void bgfx_set_uniform(short _handle, java.nio.DoubleBuffer _value, int _num)Sets shader uniform parameter for draw primitive.- Parameters:
_handle- uniform_value- pointer to uniform data_num- number of elements. PassingUINT16_MAXwill use the_numpassed on uniform creation.
-
bgfx_set_index_buffer
public static void bgfx_set_index_buffer(short _handle, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.- Parameters:
_handle- index buffer_firstIndex- first index to render_numIndices- number of indices to render
-
bgfx_set_dynamic_index_buffer
public static void bgfx_set_dynamic_index_buffer(short _handle, int _firstIndex, int _numIndices)Sets index buffer for draw primitive.- Parameters:
_handle- dynamic index buffer_firstIndex- first index to render_numIndices- number of indices to render
-
nbgfx_set_transient_index_buffer
public static void nbgfx_set_transient_index_buffer(long _tib, int _firstIndex, int _numIndices)Unsafe version of:set_transient_index_buffer
-
bgfx_set_transient_index_buffer
public static void bgfx_set_transient_index_buffer(BGFXTransientIndexBuffer _tib, int _firstIndex, int _numIndices)
Sets index buffer for draw primitive.- Parameters:
_tib- transient index buffer_firstIndex- first index to render_numIndices- number of indices to render
-
nbgfx_set_vertex_buffer
public static void nbgfx_set_vertex_buffer(byte _stream, short _handle, int _startVertex, int _numVertices)Unsafe version of:set_vertex_buffer
-
bgfx_set_vertex_buffer
public static void bgfx_set_vertex_buffer(int _stream, short _handle, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.- Parameters:
_stream- vertex stream_handle- vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render
-
nbgfx_set_vertex_buffer_with_layout
public static void nbgfx_set_vertex_buffer_with_layout(byte _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:set_vertex_buffer_with_layout
-
bgfx_set_vertex_buffer_with_layout
public static void bgfx_set_vertex_buffer_with_layout(int _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.- Parameters:
_stream- vertex stream_handle- vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render_layoutHandle- vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.
-
nbgfx_set_dynamic_vertex_buffer
public static void nbgfx_set_dynamic_vertex_buffer(byte _stream, short _handle, int _startVertex, int _numVertices)Unsafe version of:set_dynamic_vertex_buffer
-
bgfx_set_dynamic_vertex_buffer
public static void bgfx_set_dynamic_vertex_buffer(int _stream, short _handle, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.- Parameters:
_stream- vertex stream_handle- dynamic vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render
-
nbgfx_set_dynamic_vertex_buffer_with_layout
public static void nbgfx_set_dynamic_vertex_buffer_with_layout(byte _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:set_dynamic_vertex_buffer_with_layout
-
bgfx_set_dynamic_vertex_buffer_with_layout
public static void bgfx_set_dynamic_vertex_buffer_with_layout(int _stream, short _handle, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.- Parameters:
_stream- vertex stream_handle- dynamic vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render_layoutHandle- vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.
-
nbgfx_set_transient_vertex_buffer
public static void nbgfx_set_transient_vertex_buffer(byte _stream, long _tvb, int _startVertex, int _numVertices)Unsafe version of:set_transient_vertex_buffer
-
bgfx_set_transient_vertex_buffer
public static void bgfx_set_transient_vertex_buffer(int _stream, BGFXTransientVertexBuffer _tvb, int _startVertex, int _numVertices)Sets vertex buffer for draw primitive.- Parameters:
_stream- vertex stream_tvb- transient vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render
-
nbgfx_set_transient_vertex_buffer_with_layout
public static void nbgfx_set_transient_vertex_buffer_with_layout(byte _stream, long _tvb, int _startVertex, int _numVertices, short _layoutHandle)Unsafe version of:set_transient_vertex_buffer_with_layout
-
bgfx_set_transient_vertex_buffer_with_layout
public static void bgfx_set_transient_vertex_buffer_with_layout(int _stream, BGFXTransientVertexBuffer _tvb, int _startVertex, int _numVertices, short _layoutHandle)Sets vertex buffer for draw primitive.- Parameters:
_stream- vertex stream_tvb- transient vertex buffer_startVertex- first vertex to render_numVertices- number of vertices to render_layoutHandle- vertex layout for aliasing vertex buffer. If invalid handle is used, vertex layout used for creation of vertex buffer will be used.
-
bgfx_set_vertex_count
public static void bgfx_set_vertex_count(int _numVertices)
Set number of vertices for auto generated vertices use in conjunction withgl_VertexID.Availability depends on:
CAPS_VERTEX_ID.- Parameters:
_numVertices- number of vertices
-
nbgfx_set_instance_data_buffer
public static void nbgfx_set_instance_data_buffer(long _idb, int _start, int _num)Unsafe version of:set_instance_data_buffer
-
bgfx_set_instance_data_buffer
public static void bgfx_set_instance_data_buffer(BGFXInstanceDataBuffer _idb, int _start, int _num)
Sets instance data buffer for draw primitive.- Parameters:
_idb- transient instance data buffer_start- first instance data_num- number of data instances
-
bgfx_set_instance_data_from_vertex_buffer
public static void bgfx_set_instance_data_from_vertex_buffer(short _handle, int _start, int _num)Set instance data buffer for draw primitive.- Parameters:
_handle- vertex buffer_start- first instance data_num- number of data instances
-
bgfx_set_instance_data_from_dynamic_vertex_buffer
public static void bgfx_set_instance_data_from_dynamic_vertex_buffer(short _handle, int _start, int _num)Set instance data buffer for draw primitive.- Parameters:
_handle- dynamic vertex buffer_start- first instance data_num- number of data instances
-
bgfx_set_instance_count
public static void bgfx_set_instance_count(int _numInstances)
Sets number of instances for auto generated instances use in conjunction withgl_InstanceID.Availability depends on:
CAPS_VERTEX_ID.- Parameters:
_numInstances- number of instances
-
nbgfx_set_texture
public static void nbgfx_set_texture(byte _stage, short _sampler, short _handle, int _flags)Unsafe version of:set_texture
-
bgfx_set_texture
public static void bgfx_set_texture(int _stage, short _sampler, short _handle, int _flags)Sets texture stage for draw primitive.- Parameters:
_stage- texture unit_sampler- program sampler_handle- texture handle_flags- texture sampling mode.UINT32_MAXuses texture sampling settings from the texture. One of:
-
nbgfx_touch
public static void nbgfx_touch(short _id)
Unsafe version of:touch
-
bgfx_touch
public static void bgfx_touch(int _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.
- Parameters:
_id- view id
-
nbgfx_submit
public static void nbgfx_submit(short _id, short _program, int _depth, byte _flags)Unsafe version of:submit
-
bgfx_submit
public static void bgfx_submit(int _id, short _program, int _depth, int _flags)Submits primitive for rendering.- Parameters:
_id- view id_program- program_depth- depth for sorting_flags- which states to discard for next draw. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_submit_occlusion_query
public static void nbgfx_submit_occlusion_query(short _id, short _program, short _occlusionQuery, int _depth, byte _flags)Unsafe version of:submit_occlusion_query
-
bgfx_submit_occlusion_query
public static void bgfx_submit_occlusion_query(int _id, short _program, short _occlusionQuery, int _depth, int _flags)Submits primitive with occlusion query for rendering.- Parameters:
_id- view id_program- program_occlusionQuery- occlusion query_depth- depth for sorting_flags- which states to discard for next draw. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_submit_indirect
public static void nbgfx_submit_indirect(short _id, short _program, short _indirectHandle, short _start, short _num, int _depth, byte _flags)Unsafe version of:submit_indirect
-
bgfx_submit_indirect
public static void bgfx_submit_indirect(int _id, short _program, short _indirectHandle, int _start, int _num, int _depth, int _flags)Submits primitive for rendering with index and instance data info from indirect buffer.- Parameters:
_id- view id_program- program_indirectHandle- indirect buffer_start- first element in indirect buffer_num- number of dispatches_depth- depth for sorting_flags- which states to discard for next draw. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_set_compute_index_buffer
public static void nbgfx_set_compute_index_buffer(byte _stage, short _handle, int _access)Unsafe version of:set_compute_index_buffer
-
bgfx_set_compute_index_buffer
public static void bgfx_set_compute_index_buffer(int _stage, short _handle, int _access)Sets compute index buffer.- Parameters:
_stage- compute stage_handle- index buffer handle_access- buffer access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE
-
nbgfx_set_compute_vertex_buffer
public static void nbgfx_set_compute_vertex_buffer(byte _stage, short _handle, int _access)Unsafe version of:set_compute_vertex_buffer
-
bgfx_set_compute_vertex_buffer
public static void bgfx_set_compute_vertex_buffer(int _stage, short _handle, int _access)Sets compute vertex buffer.- Parameters:
_stage- compute stage_handle- vertex buffer handle_access- buffer access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE
-
nbgfx_set_compute_dynamic_index_buffer
public static void nbgfx_set_compute_dynamic_index_buffer(byte _stage, short _handle, int _access)Unsafe version of:set_compute_dynamic_index_buffer
-
bgfx_set_compute_dynamic_index_buffer
public static void bgfx_set_compute_dynamic_index_buffer(int _stage, short _handle, int _access)Sets compute dynamic index buffer.- Parameters:
_stage- compute stage_handle- dynamic index buffer handle_access- buffer access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE
-
nbgfx_set_compute_dynamic_vertex_buffer
public static void nbgfx_set_compute_dynamic_vertex_buffer(byte _stage, short _handle, int _access)Unsafe version of:set_compute_dynamic_vertex_buffer
-
bgfx_set_compute_dynamic_vertex_buffer
public static void bgfx_set_compute_dynamic_vertex_buffer(int _stage, short _handle, int _access)Sets compute dynamic vertex buffer.- Parameters:
_stage- compute stage_handle- dynamic vertex buffer handle_access- buffer access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE
-
nbgfx_set_compute_indirect_buffer
public static void nbgfx_set_compute_indirect_buffer(byte _stage, short _handle, int _access)Unsafe version of:set_compute_indirect_buffer
-
bgfx_set_compute_indirect_buffer
public static void bgfx_set_compute_indirect_buffer(int _stage, short _handle, int _access)Sets compute indirect buffer.- Parameters:
_stage- compute stage_handle- indirect buffer handle_access- buffer access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE
-
nbgfx_set_image
public static void nbgfx_set_image(byte _stage, short _handle, byte _mip, int _access, int _format)Unsafe version of:set_image
-
bgfx_set_image
public static void bgfx_set_image(int _stage, short _handle, int _mip, int _access, int _format)Sets compute image from texture.- Parameters:
_stage- texture unit_handle- texture handle_mip- mip level_access- texture access. One of:ACCESS_READACCESS_WRITEACCESS_READWRITE_format- texture format. One of:
-
nbgfx_dispatch
public static void nbgfx_dispatch(short _id, short _program, int _numX, int _numY, int _numZ, byte _flags)Unsafe version of:dispatch
-
bgfx_dispatch
public static void bgfx_dispatch(int _id, short _program, int _numX, int _numY, int _numZ, int _flags)Dispatches compute.- Parameters:
_id- view id_program- compute program_numX- number of groups X_numY- number of groups Y_numZ- number of groups Z_flags- discard or preserve states. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_dispatch_indirect
public static void nbgfx_dispatch_indirect(short _id, short _program, short _indirectHandle, short _start, short _num, byte _flags)Unsafe version of:dispatch_indirect
-
bgfx_dispatch_indirect
public static void bgfx_dispatch_indirect(int _id, short _program, short _indirectHandle, int _start, int _num, int _flags)Dispatches compute indirect.- Parameters:
_id- view id_program- compute program_indirectHandle- indirect buffer_start- first element in indirect buffer_num- number of dispatches_flags- discard or preserve states. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_discard
public static void nbgfx_discard(byte _flags)
Unsafe version of:discard
-
bgfx_discard
public static void bgfx_discard(int _flags)
Discards all previously set state for draw or compute call.- Parameters:
_flags- draw/compute states to discard. One or more of:DISCARD_NONEDISCARD_BINDINGSDISCARD_INDEX_BUFFERDISCARD_INSTANCE_DATADISCARD_STATEDISCARD_TRANSFORMDISCARD_VERTEX_STREAMSDISCARD_ALL
-
nbgfx_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)Unsafe version of:blit
-
bgfx_blit
public static void bgfx_blit(int _id, short _dst, int _dstMip, int _dstX, int _dstY, int _dstZ, short _src, int _srcMip, int _srcX, int _srcY, int _srcZ, int _width, int _height, int _depth)Blits texture region between two textures.Destination texture must be created with
TEXTURE_BLIT_DSTflag. Availability depends onCAPS_TEXTURE_BLIT.- Parameters:
_id- view id_dst- destination texture handle_dstMip- destination texture mip level_dstX- destination texture X position_dstY- destination texture Y position_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._src- source texture handle_srcMip- source texture mip level_srcX- source texture X position_srcY- source texture Y position_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._width- width of region_height- height of region_depth- if texture is 3D this argument represents depth of region, otherwise it's unused
-
BGFX_STATE_ALPHA_REF
public static long BGFX_STATE_ALPHA_REF(long _ref)
-
BGFX_STATE_POINT_SIZE
public static long BGFX_STATE_POINT_SIZE(long _size)
-
BGFX_STATE_BLEND_FUNC_SEPARATE
public static long BGFX_STATE_BLEND_FUNC_SEPARATE(long _srcRGB, long _dstRGB, long _srcA, long _dstA)
-
BGFX_STATE_BLEND_EQUATION_SEPARATE
public static long BGFX_STATE_BLEND_EQUATION_SEPARATE(long _rgb, long _a)
-
BGFX_STATE_BLEND_FUNC
public static long BGFX_STATE_BLEND_FUNC(long _src, long _dst)
-
BGFX_STATE_BLEND_EQUATION
public static long BGFX_STATE_BLEND_EQUATION(long _equation)
-
BGFX_STATE_BLEND_FUNC_RT_x
public static long BGFX_STATE_BLEND_FUNC_RT_x(long _src, long _dst)
-
BGFX_STATE_BLEND_FUNC_RT_xE
public static long BGFX_STATE_BLEND_FUNC_RT_xE(long _src, long _dst, long _equation)
-
BGFX_STATE_BLEND_FUNC_RT_1
public static long BGFX_STATE_BLEND_FUNC_RT_1(long _src, long _dst)
-
BGFX_STATE_BLEND_FUNC_RT_2
public static long BGFX_STATE_BLEND_FUNC_RT_2(long _src, long _dst)
-
BGFX_STATE_BLEND_FUNC_RT_3
public static long BGFX_STATE_BLEND_FUNC_RT_3(long _src, long _dst)
-
BGFX_STATE_BLEND_FUNC_RT_1E
public static long BGFX_STATE_BLEND_FUNC_RT_1E(long _src, long _dst, long _equation)
-
BGFX_STATE_BLEND_FUNC_RT_2E
public static long BGFX_STATE_BLEND_FUNC_RT_2E(long _src, long _dst, long _equation)
-
BGFX_STATE_BLEND_FUNC_RT_3E
public static long BGFX_STATE_BLEND_FUNC_RT_3E(long _src, long _dst, long _equation)
-
BGFX_STENCIL_FUNC_REF
public static int BGFX_STENCIL_FUNC_REF(int _ref)
-
BGFX_STENCIL_FUNC_RMASK
public static int BGFX_STENCIL_FUNC_RMASK(int _mask)
-
BGFX_SAMPLER_BORDER_COLOR
public static int BGFX_SAMPLER_BORDER_COLOR(int _index)
-
BGFX_HANDLE_IS_VALID
public static boolean BGFX_HANDLE_IS_VALID(short h)
-
bgfx_vertex_layout_decode
public static void bgfx_vertex_layout_decode(BGFXVertexLayout _this, int _attrib, java.nio.ByteBuffer _num, int[] _type, java.nio.ByteBuffer _normalized, java.nio.ByteBuffer _asInt)
Array version of:vertex_layout_decode
-
bgfx_vertex_pack
public static void bgfx_vertex_pack(float[] _input, boolean _inputNormalized, int _attr, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, int _index)Array version of:vertex_pack
-
bgfx_vertex_unpack
public static void bgfx_vertex_unpack(float[] _output, int _attr, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, int _index)Array version of:vertex_unpack
-
bgfx_weld_vertices
public static int bgfx_weld_vertices(short[] _output, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, boolean _index32, float _epsilon) public static int bgfx_weld_vertices(int[] _output, BGFXVertexLayout _layout, java.nio.ByteBuffer _data, boolean _index32, float _epsilon)Array version of:weld_vertices
-
bgfx_topology_convert
public static int bgfx_topology_convert(int _conversion, @Nullable short[] _dst, short[] _indices, boolean _index32) public static int bgfx_topology_convert(int _conversion, @Nullable int[] _dst, int[] _indices, boolean _index32)Array version of:topology_convert
-
bgfx_topology_sort_tri_list
public static void bgfx_topology_sort_tri_list(int _sort, java.nio.ByteBuffer _dst, float[] _dir, float[] _pos, java.nio.ByteBuffer _vertices, int _stride, java.nio.ByteBuffer _indices, boolean _index32) public static void bgfx_topology_sort_tri_list(int _sort, short[] _dst, float[] _dir, float[] _pos, java.nio.ByteBuffer _vertices, int _stride, short[] _indices, boolean _index32) public static void bgfx_topology_sort_tri_list(int _sort, int[] _dst, float[] _dir, float[] _pos, java.nio.ByteBuffer _vertices, int _stride, int[] _indices, boolean _index32)Array version of:topology_sort_tri_list
-
bgfx_get_supported_renderers
public static byte bgfx_get_supported_renderers(int[] _enum)
Array version of:get_supported_renderers
-
bgfx_copy
@Nullable public static BGFXMemory bgfx_copy(short[] _data) @Nullable public static BGFXMemory bgfx_copy(int[] _data) @Nullable public static BGFXMemory bgfx_copy(long[] _data) @Nullable public static BGFXMemory bgfx_copy(float[] _data) @Nullable public static BGFXMemory bgfx_copy(double[] _data)
Array version of:copy
-
bgfx_get_shader_uniforms
public static short bgfx_get_shader_uniforms(short _handle, short[] _uniforms)Array version of:get_shader_uniforms
-
bgfx_read_texture
public static int bgfx_read_texture(short _handle, short[] _data, int _mip) public static int bgfx_read_texture(short _handle, int[] _data, int _mip) public static int bgfx_read_texture(short _handle, float[] _data, int _mip)Array version of:read_texture
-
bgfx_create_frame_buffer_from_handles
public static short bgfx_create_frame_buffer_from_handles(short[] _handles, boolean _destroyTextures)Array version of:create_frame_buffer_from_handles
-
bgfx_get_result
public static int bgfx_get_result(short _handle, @Nullable int[] _result)Array version of:get_result
-
bgfx_set_palette_color
public static void bgfx_set_palette_color(int _index, float[] _rgba)Array version of:set_palette_color
-
bgfx_set_view_transform
public static void bgfx_set_view_transform(int _id, @Nullable float[] _view, @Nullable float[] _proj)Array version of:set_view_transform
-
bgfx_set_view_order
public static void bgfx_set_view_order(int _id, int _num, @Nullable short[] _order)Array version of:set_view_order
-
bgfx_encoder_set_transform
public static int bgfx_encoder_set_transform(long _this, float[] _mtx)Array version of:encoder_set_transform
-
bgfx_encoder_set_uniform
public static void bgfx_encoder_set_uniform(long _this, short _handle, short[] _value, int _num) public static void bgfx_encoder_set_uniform(long _this, short _handle, int[] _value, int _num) public static void bgfx_encoder_set_uniform(long _this, short _handle, long[] _value, int _num) public static void bgfx_encoder_set_uniform(long _this, short _handle, float[] _value, int _num) public static void bgfx_encoder_set_uniform(long _this, short _handle, double[] _value, int _num)Array version of:encoder_set_uniform
-
bgfx_set_transform
public static int bgfx_set_transform(float[] _mtx)
Array version of:set_transform
-
bgfx_set_uniform
public static void bgfx_set_uniform(short _handle, short[] _value, int _num) public static void bgfx_set_uniform(short _handle, int[] _value, int _num) public static void bgfx_set_uniform(short _handle, long[] _value, int _num) public static void bgfx_set_uniform(short _handle, float[] _value, int _num) public static void bgfx_set_uniform(short _handle, double[] _value, int _num)Array version of:set_uniform
-
-