Package org.lwjgl.bgfx
@NullMarked
package org.lwjgl.bgfx
Contains bindings to the bgfx library.
Starting with LWJGL 3.2.1, builds of the bgfx tools are available for download via the LWJGL site's file browser. These tools are:
- Geometry Compiler (geometryc)
- Shader Compiler (shaderc)
- Texture Compiler (texturec)
- Texture Viewer (texturev)
The binaries are built from source, at the corresponding commit that was used to build the bgfx library. For example, the latest Windows x64 version of
shaderc can be found under nightly/windows/x64/bgfx-tools/
.
Resources
-
ClassDescriptionContains the function pointers loaded from the bgfx
SharedLibrary
.struct bgfx_allocator_interface_t { {@link BGFXAllocatorVtbl bgfx_allocator_vtbl_t} const * vtbl; }
struct bgfx_allocator_vtbl_t { void * (* realloc) (bgfx_allocator_interface_t * _this, void * _ptr, size_t _size, size_t _align, char * _file, uint32_t _line); }
An array ofBGFXAllocatorVtbl
structs.struct bgfx_attachment_t { bgfx_access_t access; bgfx_texture_handle_t handle; uint16_t mip; uint16_t layer; uint16_t numLayers; uint8_t resolve; }
An array ofBGFXAttachment
structs.Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
struct bgfx_callback_interface_t { {@link BGFXCallbackVtbl bgfx_callback_vtbl_t} const * vtbl; }
struct bgfx_callback_vtbl_t { void (* fatal) (bgfx_callback_interface_t * _this, char const * _filePath, uint16_t _line, bgfx_fatal_t _code, char const * _str); void (* trace_vargs) (bgfx_callback_interface_t * _this, char const * _filePath, uint16_t _line, char const * _format, va_list _argList); void (* profiler_begin) (bgfx_callback_interface_t * _this, char const * _name, uint32_t _abgr, char const * _filePath, uint16_t _line); void (* profiler_begin_literal) (bgfx_callback_interface_t * _this, char const * _name, uint32_t _abgr, char const * _filePath, uint16_t _line); void (* profiler_end) (bgfx_callback_interface_t * _this); uint32_t (* cache_read_size) (bgfx_callback_interface_t * _this, uint64_t _id); bool (* cache_read) (bgfx_callback_interface_t * _this, uint64_t _id, void * _data, uint32_t _size); void (* cache_write) (bgfx_callback_interface_t * _this, uint64_t _id, void const * _data, uint32_t _size); void (* screen_shot) (bgfx_callback_interface_t * _this, char const * _filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, void const * _data, uint32_t _size, bool _yflip); void (* capture_begin) (bgfx_callback_interface_t * _this, uint32_t _width, uint32_t _height, uint32_t _pitch, bgfx_texture_format_t _format, bool _yflip); void (* capture_end) (bgfx_callback_interface_t * _this); void (* capture_frame) (bgfx_callback_interface_t * _this, void const * _data, uint32_t _size); }
struct bgfx_caps_t { bgfx_renderer_type_t rendererType; uint64_t supported; uint16_t vendorId; uint16_t deviceId; bool homogeneousDepth; bool originBottomLeft; uint8_t numGPUs; {@link BGFXCapsGPU bgfx_caps_gpu_t} gpu[4]; {@link BGFXCapsLimits bgfx_caps_limits_t} limits; uint16_t formats[BGFX_TEXTURE_FORMAT_COUNT]; }
struct bgfx_caps_gpu_t { uint16_t vendorId; uint16_t deviceId; }
An array ofBGFXCapsGPU
structs.struct bgfx_caps_limits_t { uint32_t maxDrawCalls; uint32_t maxBlits; uint32_t maxTextureSize; uint32_t maxTextureLayers; uint32_t maxViews; uint32_t maxFrameBuffers; uint32_t maxFBAttachments; uint32_t maxPrograms; uint32_t maxShaders; uint32_t maxTextures; uint32_t maxTextureSamplers; uint32_t maxComputeBindings; uint32_t maxVertexLayouts; uint32_t maxVertexStreams; uint32_t maxIndexBuffers; uint32_t maxVertexBuffers; uint32_t maxDynamicIndexBuffers; uint32_t maxDynamicVertexBuffers; uint32_t maxUniforms; uint32_t maxOcclusionQueries; uint32_t maxEncoders; uint32_t minResourceCbSize; uint32_t transientVbSize; uint32_t transientIbSize; }
An array ofBGFXCapsLimits
structs.Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
struct bgfx_encoder_stats_t { int64_t cpuTimeBegin; int64_t cpuTimeEnd; }
An array ofBGFXEncoderStats
structs.Callback function:(* anonymous)
Callback function:(* anonymous)
struct bgfx_init_t { bgfx_renderer_type_t type; uint16_t vendorId; uint16_t deviceId; uint64_t capabilities; bool debug; bool profile; {@link BGFXPlatformData bgfx_platform_data_t} platformData; {@link BGFXResolution bgfx_resolution_t} resolution; {@link BGFXInitLimits bgfx_init_limits_t} limits; {@link BGFXCallbackInterface bgfx_callback_interface_t} * callback; {@link BGFXAllocatorInterface bgfx_allocator_interface_t} * allocator; }
struct bgfx_init_limits_t { uint16_t maxEncoders; uint32_t minResourceCbSize; uint32_t transientVbSize; uint32_t transientIbSize; }
struct bgfx_instance_data_buffer_t { uint8_t * data; uint32_t size; uint32_t offset; uint32_t num; uint16_t stride; bgfx_vertex_buffer_handle_t handle; }
An array ofBGFXInstanceDataBuffer
structs.struct bgfx_internal_data_t { {@link BGFXCaps bgfx_caps_t} * caps; void * context; }
struct bgfx_memory_t { uint8_t * data; uint32_t size; }
An array ofBGFXMemory
structs.Contains the function pointers loaded fromBGFX.getLibrary()
.struct bgfx_platform_data_t { void * ndt; void * nwh; void * context; void * backBuffer; void * backBufferDS; bgfx_native_window_handle_type_t type; }
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:(* anonymous)
Callback function:bgfx_release_fn_t
Callback function:bgfx_release_fn_t
struct bgfx_resolution_t { bgfx_texture_format_t format; uint32_t width; uint32_t height; uint32_t reset; uint8_t numBackBuffers; uint8_t maxFrameLatency; uint8_t debugTextScale; }
Callback function:(* anonymous)
Callback function:(* anonymous)
struct bgfx_stats_t { int64_t cpuTimeFrame; int64_t cpuTimeBegin; int64_t cpuTimeEnd; int64_t cpuTimerFreq; int64_t gpuTimeBegin; int64_t gpuTimeEnd; int64_t gpuTimerFreq; int64_t waitRender; int64_t waitSubmit; uint32_t numDraw; uint32_t numCompute; uint32_t numBlit; uint32_t maxGpuLatency; uint32_t gpuFrameNum; uint16_t numDynamicIndexBuffers; uint16_t numDynamicVertexBuffers; uint16_t numFrameBuffers; uint16_t numIndexBuffers; uint16_t numOcclusionQueries; uint16_t numPrograms; uint16_t numShaders; uint16_t numTextures; uint16_t numUniforms; uint16_t numVertexBuffers; uint16_t numVertexLayouts; int64_t textureMemoryUsed; int64_t rtMemoryUsed; int32_t transientVbUsed; int32_t transientIbUsed; uint32_t numPrims[BGFX_TOPOLOGY_COUNT]; int64_t gpuMemoryMax; int64_t gpuMemoryUsed; uint16_t width; uint16_t height; uint16_t textWidth; uint16_t textHeight; uint16_t numViews; {@link BGFXViewStats bgfx_view_stats_t} * viewStats; uint16_t numEncoders; {@link BGFXEncoderStats bgfx_encoder_stats_t} * encoderStats; }
An array ofBGFXStats
structs.struct bgfx_texture_info_t { bgfx_texture_format_t format; uint32_t storageSize; uint16_t width; uint16_t height; uint16_t depth; uint16_t numLayers; uint8_t numMips; uint8_t bitsPerPixel; bool cubeMap; }
An array ofBGFXTextureInfo
structs.Callback function:(* anonymous)
Callback function:(* anonymous)
struct bgfx_transform_t { float * data; uint16_t num; }
An array ofBGFXTransform
structs.struct bgfx_transient_index_buffer_t { uint8_t * data; uint32_t size; uint32_t startIndex; bgfx_index_buffer_handle_t handle; bool isIndex16; }
An array ofBGFXTransientIndexBuffer
structs.struct bgfx_transient_vertex_buffer_t { uint8_t * data; uint32_t size; uint32_t startVertex; uint16_t stride; bgfx_vertex_buffer_handle_t handle; bgfx_vertex_layout_handle_t layoutHandle; }
An array ofBGFXTransientVertexBuffer
structs.struct bgfx_uniform_info_t { char name[256]; bgfx_uniform_type_t type; uint16_t num; }
An array ofBGFXUniformInfo
structs.struct bgfx_vertex_layout_t { uint32_t hash; uint16_t stride; uint16_t offset[BGFX_ATTRIB_COUNT]; uint16_t attributes[BGFX_ATTRIB_COUNT]; }
An array ofBGFXVertexLayout
structs.struct bgfx_view_stats_t { char name[256]; bgfx_view_id_t view; int64_t cpuTimeBegin; int64_t cpuTimeEnd; int64_t gpuTimeBegin; int64_t gpuTimeEnd; uint32_t gpuFrameNum; }
An array ofBGFXViewStats
structs.