diff --git a/_static/basic.css b/_static/basic.css index ea6972d55..01192852b 100644 --- a/_static/basic.css +++ b/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -672,6 +672,10 @@ div.code-block-caption + div > div.highlight > pre { margin-top: 0; } +div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; +} + div.code-block-caption span.caption-number { padding: 0.1em 0.3em; font-style: italic; diff --git a/_static/doctools.js b/_static/doctools.js index b33f87fcb..daccd209d 100644 --- a/_static/doctools.js +++ b/_static/doctools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for all documentation. * - * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -283,10 +283,11 @@ var Documentation = { }, initOnKeyListeners: function() { - $(document).keyup(function(event) { + $(document).keydown(function(event) { var activeElementType = document.activeElement.tagName; // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { + if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' + && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) { switch (event.keyCode) { case 37: // left var prevHref = $('link[rel="prev"]').prop('href'); diff --git a/_static/documentation_options.js b/_static/documentation_options.js index 6768d1bf5..8cd5b3d7d 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -3,7 +3,9 @@ var DOCUMENTATION_OPTIONS = { VERSION: '1.0', LANGUAGE: 'None', COLLAPSE_INDEX: false, + BUILDER: 'html', FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', HAS_SOURCE: false, SOURCELINK_SUFFIX: '.txt', NAVIGATION_WITH_KEYS: false diff --git a/_static/language_data.js b/_static/language_data.js index 5266fb19e..d2b4ee91b 100644 --- a/_static/language_data.js +++ b/_static/language_data.js @@ -5,7 +5,7 @@ * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * - * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/_static/searchtools.js b/_static/searchtools.js index 6031f9913..ab5649965 100644 --- a/_static/searchtools.js +++ b/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -63,6 +63,11 @@ var Search = { htmlElement.innerHTML = htmlString; $(htmlElement).find('.headerlink').remove(); docContent = $(htmlElement).find('[role=main]')[0]; + if(docContent === undefined) { + console.warn("Content block not found. Sphinx search tries to obtain it " + + "via '[role=main]'. Could you check your theme or template."); + return ""; + } return docContent.textContent || docContent.innerText; }, @@ -245,7 +250,9 @@ var Search = { if (results.length) { var item = results.pop(); var listItem = $('
'); - if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') { + var requestUrl = ""; + var linkUrl = ""; + if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') { // dirhtml builder var dirname = item[0] + '/'; if (dirname.match(/\/index\/$/)) { @@ -253,15 +260,17 @@ var Search = { } else if (dirname == 'index/') { dirname = ''; } - listItem.append($('').attr('href', - DOCUMENTATION_OPTIONS.URL_ROOT + dirname + - highlightstring + item[2]).html(item[1])); + requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname; + linkUrl = requestUrl; + } else { // normal html builders - listItem.append($('').attr('href', - item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX + - highlightstring + item[2]).html(item[1])); + requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX; + linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX; } + listItem.append($('').attr('href', + linkUrl + + highlightstring + item[2]).html(item[1])); if (item[3]) { listItem.append($(' (' + item[3] + ')')); Search.output.append(listItem); @@ -269,7 +278,7 @@ var Search = { displayNextItem(); }); } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { - $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX, + $.ajax({url: requestUrl, dataType: "text", complete: function(jqxhr, textstatus) { var data = jqxhr.responseText; @@ -424,7 +433,7 @@ var Search = { for (j = 0; j < _files.length; j++) { file = _files[j]; if (!(file in scoreMap)) - scoreMap[file] = {} + scoreMap[file] = {}; scoreMap[file][word] = o.score; } }); @@ -432,7 +441,7 @@ var Search = { // create the mapping for (j = 0; j < files.length; j++) { file = files[j]; - if (file in fileMap) + if (file in fileMap && fileMap[file].indexOf(word) === -1) fileMap[file].push(word); else fileMap[file] = [word]; diff --git a/bgfx.html b/bgfx.html index 3e234a779..e3ba2690a 100644 --- a/bgfx.html +++ b/bgfx.html @@ -21,10 +21,10 @@ - - - - + + + + @@ -229,9 +229,9 @@Init¶bgfx::Init¶Initialization parameters used by bgfx::init.
C99 equivalent is bgfx_init_t.
Public Members
-type¶Select rendering backend. When set to RendererType::Count a default rendering backend will be selected appropriate to the platform. See: bgfx::RendererType
vendorId¶Vendor PCI id. If set to BGFX_PCI_ID_NONE it will select the first device.
deviceId¶Device id. If set to 0 it will select first device, or device with matching id.
debug¶Enable device for debuging.
profile¶Enable device for profiling.
platformData¶Platform data.
resolution¶Backbuffer resolution and reset parameters. See: bgfx::Resolution.
callback¶Provide application specific callback interface. See: bgfx::CallbackI
allocator¶Custom allocator. When a custom allocator is not specified, bgfx uses the CRT allocator. Bgfx assumes custom allocator is thread safe.
Limits¶Configurable runtime limits parameters.
@@ -314,19 +314,19 @@Public Members
-maxEncoders¶Maximum number of encoder threads.
transientVbSize¶Maximum transient vertex buffer size.
transientIbSize¶Maximum transient index buffer size.
@@ -337,9 +337,9 @@Resolution¶bgfx::Resolution¶Backbuffer resolution and reset parameters.
C99 equivalent is bgfx_resolution_t.
Public Members
-CallbackI¶bgfx::CallbackI¶Callback interface to implement application specific behavior. Cached items are currently used for OpenGL and Direct3D 12 binary shaders.
’fatal’ and ‘trace’ callbacks can be called from any thread. Other callbacks are called from the render thread.
@@ -447,9 +447,9 @@Public Functions
-fatal(const char *_filePath, uint16_t _line, Fatal::Enum _code, const char *_str) = 0¶fatal(const char *_filePath, uint16_t _line, Fatal::Enum _code, const char *_str) = 0¶This callback is called on unrecoverable errors. It’s not safe to continue (Exluding _code Fatal::DebugCheck), inform the user and terminate the application.
Not thread safe and it can be called from any thread.
@@ -467,9 +467,9 @@traceVargs(const char *_filePath, uint16_t _line, const char *_format, va_list _argList) = 0¶traceVargs(const char *_filePath, uint16_t _line, const char *_format, va_list _argList) = 0¶Print debug message.
Not thread safe and it can be called from any thread.
@@ -487,9 +487,9 @@profilerBegin(const char *_name, uint32_t _abgr, const char *_filePath, uint16_t _line) = 0¶profilerBegin(const char *_name, uint32_t _abgr, const char *_filePath, uint16_t _line) = 0¶Profiler region begin.
Not thread safe and it can be called from any thread.
@@ -507,9 +507,9 @@profilerBeginLiteral(const char *_name, uint32_t _abgr, const char *_filePath, uint16_t _line) = 0¶profilerBeginLiteral(const char *_name, uint32_t _abgr, const char *_filePath, uint16_t _line) = 0¶Profiler region begin with string literal name.
Not thread safe and it can be called from any thread.
@@ -527,9 +527,9 @@profilerEnd() = 0¶profilerEnd() = 0¶Profiler region end.
Not thread safe and it can be called from any thread.
@@ -540,9 +540,9 @@cacheReadSize(uint64_t _id) = 0¶cacheReadSize(uint64_t _id) = 0¶Returns the size of a cached item. Returns 0 if no cached item was found.
Number of bytes to read.
@@ -557,9 +557,9 @@cacheRead(uint64_t _id, void *_data, uint32_t _size) = 0¶cacheRead(uint64_t _id, void *_data, uint32_t _size) = 0¶Read cached item.
True if data is read.
@@ -576,9 +576,9 @@cacheWrite(uint64_t _id, const void *_data, uint32_t _size) = 0¶cacheWrite(uint64_t _id, const void *_data, uint32_t _size) = 0¶Write cached item.
C99 equivalent is bgfx_callback_vtbl.cache_write.
screenShot(const char *_filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, const void *_data, uint32_t _size, bool _yflip) = 0¶screenShot(const char *_filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, const void *_data, uint32_t _size, bool _yflip) = 0¶Screenshot captured. Screenshot format is always 4-byte BGRA.
C99 equivalent is bgfx_callback_vtbl.screen_shot.
captureBegin(uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format, bool _yflip) = 0¶captureBegin(uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format, bool _yflip) = 0¶Called when a video capture begins.
C99 equivalent is bgfx_callback_vtbl.capture_begin.
bgfx::shutdown()¶Shutdown bgfx library.
@@ -679,9 +679,9 @@bgfx::reset(uint32_t _width, uint32_t _height, uint32_t _flags = BGFX_RESET_NONE, TextureFormat::Enum _format = TextureFormat::Count)¶bgfx::reset(uint32_t _width, uint32_t _height, uint32_t _flags = BGFX_RESET_NONE, TextureFormat::Enum _format = TextureFormat::Count)¶Reset 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.
@@ -710,99 +710,99 @@bgfx::frame(bool _capture = false)¶Advance 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.
@@ -825,7 +825,7 @@bgfx::dbgTextClear(uint8_t _attr = 0, bool _small = false)¶Clear internal debug text buffer.
@@ -904,7 +904,7 @@bgfx::dbgTextPrintf(uint16_t _x, uint16_t _y, uint8_t _attr, const char *_format, ...)¶Print into internal debug text character-buffer (VGA-compatible text mode).
@@ -921,7 +921,7 @@bgfx::dbgTextPrintfVargs(uint16_t _x, uint16_t _y, uint8_t _attr, const char *_format, va_list _argList)¶Print into internal debug text character-buffer (VGA-compatible text mode).
@@ -939,7 +939,7 @@bgfx::dbgTextImage(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const void *_data, uint16_t _pitch)¶Draw image into internal debug text buffer.
@@ -963,7 +963,7 @@bgfx::getRendererType()¶Returns current renderer backend API type.
@@ -976,9 +976,9 @@RendererType¶bgfx::RendererType¶Renderer backend type enum.
C99 equivalent is bgfx_renderer_type_t.
Public Types
-Enum¶Renderer types:
Values:
-Noop¶Noop¶No rendering.
Caps¶bgfx::Caps¶Renderer capabilities.
C99 equivalent is bgfx_caps_t.
Public Members
-rendererType¶Renderer backend type. See: bgfx::RendererType
Limits¶Renderer runtime limits.
@@ -1219,139 +1219,139 @@Public Members
-maxDrawCalls¶Maximum number of draw calls.
maxBlits¶Maximum number of blit calls.
maxTextureSize¶Maximum texture size.
maxTextureLayers¶Maximum texture layers.
maxViews¶Maximum number of views.
maxFrameBuffers¶Maximum number of frame buffer handles.
maxFBAttachments¶Maximum number of frame buffer attachments.
maxPrograms¶Maximum number of program handles.
maxShaders¶Maximum number of shader handles.
maxTextures¶Maximum number of texture handles.
maxTextureSamplers¶Maximum number of texture samplers.
maxComputeBindings¶Maximum number of compute bindings.
maxVertexLayouts¶Maximum number of vertex format layouts.
maxVertexStreams¶Maximum number of vertex streams.
maxIndexBuffers¶Maximum number of index buffer handles.
maxVertexBuffers¶Maximum number of vertex buffer handles.
maxDynamicIndexBuffers¶Maximum number of dynamic index buffer handles.
maxDynamicVertexBuffers¶Maximum number of dynamic vertex buffer handles.
maxUniforms¶Maximum number of uniform handles.
maxOcclusionQueries¶Maximum number of occlusion query handles.
maxEncoders¶Maximum number of encoder threads.
transientVbSize¶Maximum transient vertex buffer size.
transientIbSize¶Maximum transient index buffer size.
@@ -1364,164 +1364,164 @@BGFX_CAPS_CONSERVATIVE_RASTER¶BGFX_CAPS_CONSERVATIVE_RASTER¶Conservative rasterization is supported.
BGFX_CAPS_FRAGMENT_DEPTH¶BGFX_CAPS_FRAGMENT_DEPTH¶Fragment depth is accessible in fragment shader.
BGFX_CAPS_FRAGMENT_ORDERING¶BGFX_CAPS_FRAGMENT_ORDERING¶Fragment ordering is available in fragment shader.
BGFX_CAPS_FRAMEBUFFER_RW¶BGFX_CAPS_FRAMEBUFFER_RW¶Read/Write frame buffer attachments are supported.
BGFX_CAPS_RENDERER_MULTITHREADED¶BGFX_CAPS_RENDERER_MULTITHREADED¶Renderer is on separate thread.
BGFX_CAPS_TEXTURE_COMPARE_LEQUAL¶BGFX_CAPS_TEXTURE_COMPARE_LEQUAL¶Texture compare less equal mode is supported.
Stats¶bgfx::Stats¶Renderer statistics data.
C99 equivalent is bgfx_stats_t.
Public Members
-cpuTimeFrame¶CPU time between two bgfx::frame calls.
cpuTimeBegin¶Render thread CPU submit begin time.
cpuTimeEnd¶Render thread CPU submit end time.
cpuTimerFreq¶CPU timer frequency. Timestamps-per-second.
gpuTimeBegin¶GPU frame begin time.
gpuTimeEnd¶GPU frame end time.
gpuTimerFreq¶GPU timer frequency.
waitRender¶Time spent waiting for render backend thread to finish issuing draw commands to underlying graphics API.
waitSubmit¶Time spent waiting for submit thread to advance to next frame.
numDraw¶Number of draw calls submitted.
numCompute¶Number of compute calls submitted.
numBlit¶Number of blit calls submitted.
maxGpuLatency¶GPU driver latency.
numDynamicIndexBuffers¶Number of used dynamic index buffers.
numDynamicVertexBuffers¶Number of used dynamic vertex buffers.
numFrameBuffers¶Number of used frame buffers.
numIndexBuffers¶Number of used index buffers.
numOcclusionQueries¶Number of used occlusion queries.
numPrograms¶Number of used programs.
numShaders¶Number of used shaders.
numTextures¶Number of used textures.
numUniforms¶Number of used uniforms.
numVertexBuffers¶Number of used vertex buffers.
numVertexLayouts¶Number of used vertex layouts.
textureMemoryUsed¶Estimate of texture memory used.
rtMemoryUsed¶Estimate of render target memory used.
transientVbUsed¶Amount of transient vertex buffer used.
transientIbUsed¶Amount of transient index buffer used.
numPrims[Count]¶Number of primitives rendered.
ViewStats¶bgfx::ViewStats¶View stats.
C99 equivalent is bgfx_view_stats_t.
EncoderStats¶bgfx::EncoderStats¶Encoder stats.
C99 equivalent is bgfx_encoder_stats_t.
Public Members
-cpuTimeEnd¶Encoder thread CPU submit end time.
@@ -1874,7 +1874,7 @@These are platform specific APIs. It is only necessary to use these APIs in conjunction with creating windows.
-bgfx::renderFrame(int32_t _msecs = -1)¶Render frame.
@@ -1895,7 +1895,7 @@ creating windows.RenderFrame¶Render frame enum.
@@ -1906,7 +1906,7 @@ creating windows.bgfx::setPlatformData(const PlatformData &_data)¶Set platform data.
@@ -1919,9 +1919,9 @@ creating windows.PlatformData¶bgfx::PlatformData¶Platform data.
C99 equivalent is bgfx_platform_data_t.
bgfx::getInternalData()¶Get internal data for interop.
@@ -1978,9 +1978,9 @@ creating windows.InternalData¶bgfx::InternalData¶Internal data.
C99 equivalent is bgfx_internal_data_t.
bgfx::overrideInternal(TextureHandle _handle, uintptr_t _ptr)bgfx::overrideInternal(TextureHandle _handle, uintptr_t _ptr)¶Override internal texture with externally created texture. Previously created internal texture will released.
It’s expected you understand some bgfx internals before you use this call.
@@ -2026,9 +2026,9 @@ creating windows.bgfx::overrideInternal(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, TextureFormat::Enum _format, uint64_t _flags = BGFX_TEXTURE_NONE | BGFX_SAMPLER_NONE)bgfx::overrideInternal(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, TextureFormat::Enum _format, uint64_t _flags = BGFX_TEXTURE_NONE | BGFX_SAMPLER_NONE)¶Override internal texture by creating new texture. Previously created internal texture will released.
It’s expected you understand some bgfx internals before you use this call.
@@ -2059,7 +2059,7 @@ creating windows.bgfx::vertexPack(const float _input[4], bool _inputNormalized, Attrib::Enum _attr, const VertexLayout &_layout, void *_data, uint32_t _index = 0)¶Pack vertex attribute into vertex stream format.
@@ -2079,7 +2079,7 @@ creating windows.bgfx::vertexUnpack(float _output[4], Attrib::Enum _attr, const VertexLayout &_layout, const void *_data, uint32_t _index = 0)¶Unpack vertex attribute from vertex stream format.
@@ -2098,7 +2098,7 @@ creating windows.bgfx::vertexConvert(const VertexLayout &_destLayout, void *_destData, const VertexLayout &_srcLayout, const void *_srcData, uint32_t _num = 1)¶Converts vertex stream data from one vertex stream format to another.
@@ -2117,7 +2117,7 @@ creating windows.bgfx::weldVertices(uint16_t *_output, const VertexLayout &_layout, const void *_data, uint16_t _num, float _epsilon = 0.001f)¶Weld vertices.
@@ -2138,9 +2138,9 @@ creating windows.TopologyConvert¶bgfx::TopologyConvert¶Topology conversion function.
C99 equivalent is bgfx_topology_convert_t.
Public Types
-Enum¶Topology conversion functions:
Values:
-bgfx::topologyConvert(TopologyConvert::Enum _conversion, void *_dst, uint32_t _dstSize, const void *_indices, uint32_t _numIndices, bool _index32)¶Convert index buffer for use with different primitive topologies.
@@ -2216,9 +2216,9 @@ creating windows.TopologySort¶bgfx::TopologySort¶Topology sort order.
C99 equivalent is bgfx_topology_sort_t.
Public Types
-Enum¶Topology sort order:
Values:
-DirectionFrontToBackMin¶DirectionFrontToBackMin¶DirectionFrontToBackAvg¶DirectionFrontToBackAvg¶DirectionFrontToBackMax¶DirectionFrontToBackMax¶DirectionBackToFrontMin¶DirectionBackToFrontMin¶DirectionBackToFrontAvg¶DirectionBackToFrontAvg¶bgfx::topologySortTriList(TopologySort::Enum _sort, void *_dst, uint32_t _dstSize, const float _dir[3], const float _pos[3], const void *_vertices, uint32_t _stride, const void *_indices, uint32_t _numIndices, bool _index32)¶Sort indices.
@@ -2326,7 +2326,7 @@ creating windows.bgfx::discard(uint8_t _flags = BGFX_DISCARD_ALL)¶Discard all previously set state for draw or compute call.
@@ -2341,7 +2341,7 @@ creating windows.bgfx::touch(ViewId _id)¶Submit an empty primitive for rendering. Uniforms and draw state will be applied but no geometry will be submitted.
@@ -2357,9 +2357,9 @@ creating windows.bgfx::setPaletteColor(uint8_t _index, uint32_t _rgba)bgfx::setPaletteColor(uint8_t _index, uint32_t _rgba)¶Set palette color value.
C99 equivalent is bgfx_set_palette_color.
bgfx::setPaletteColor(uint8_t _index, const float _rgba[4])bgfx::setPaletteColor(uint8_t _index, const float _rgba[4])¶Set palette color value.
C99 equivalent is bgfx_set_palette_color.
bgfx::setPaletteColor(uint8_t _index, float _r, float _g, float _b, float _a)bgfx::setPaletteColor(uint8_t _index, float _r, float _g, float _b, float _a)¶Set palette color value.
C99 equivalent is bgfx_set_palette_color.
bgfx::requestScreenShot(FrameBufferHandle _handle, const char *_filePath)¶Request screen shot of window back buffer.
@@ -2440,7 +2440,7 @@ because it doesn’t allow state change optimization, and should be avoided when known until the last moment, view ids can be remaped to arbitrary order by calling bgfx::setViewOrder.View state is preserved between multiple frames.
-bgfx::setViewName(ViewId _id, const char *_name)¶Set view name.
@@ -2469,9 +2469,9 @@ known until the last moment, view ids can be remaped to arbitrary order by callibgfx::setViewRect(ViewId _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)bgfx::setViewRect(ViewId _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)¶Set view rectangle. Draw primitive outside view will be clipped.
C99 equivalent is bgfx_set_view_rect.
bgfx::setViewRect(ViewId _id, uint16_t _x, uint16_t _y, BackbufferRatio::Enum _ratio)bgfx::setViewRect(ViewId _id, uint16_t _x, uint16_t _y, BackbufferRatio::Enum _ratio)¶Set view rectangle. Draw primitive outside view will be clipped.
C99 equivalent is bgfx_set_view_rect_ratio.
bgfx::setViewScissor(ViewId _id, uint16_t _x = 0, uint16_t _y = 0, uint16_t _width = 0, uint16_t _height = 0)¶Set view scissor. Draw primitive outside view will be clipped. When _x, _y, _width and _height are set to 0, scissor will be disabled.
@@ -2525,9 +2525,9 @@ known until the last moment, view ids can be remaped to arbitrary order by callibgfx::setViewClear(ViewId _id, uint16_t _flags, uint32_t _rgba = 0x000000ff, float _depth = 1.0f, uint8_t _stencil = 0)bgfx::setViewClear(ViewId _id, uint16_t _flags, uint32_t _rgba = 0x000000ff, float _depth = 1.0f, uint8_t _stencil = 0)¶Set view clear flags.
C99 equivalent is bgfx_set_view_clear.
bgfx::setViewClear(ViewId _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0 = UINT8_MAX, uint8_t _1 = UINT8_MAX, uint8_t _2 = UINT8_MAX, uint8_t _3 = UINT8_MAX, uint8_t _4 = UINT8_MAX, uint8_t _5 = UINT8_MAX, uint8_t _6 = UINT8_MAX, uint8_t _7 = UINT8_MAX)bgfx::setViewClear(ViewId _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0 = UINT8_MAX, uint8_t _1 = UINT8_MAX, uint8_t _2 = UINT8_MAX, uint8_t _3 = UINT8_MAX, uint8_t _4 = UINT8_MAX, uint8_t _5 = UINT8_MAX, uint8_t _6 = UINT8_MAX, uint8_t _7 = UINT8_MAX)¶Set view clear flags with different clear color for each frame buffer texture. Must use bgfx::setPaletteColor to setup clear color palette.
C99 equivalent is bgfx_set_view_clear_mrt.
ViewMode¶bgfx::ViewMode¶View mode sets draw call sort order.
C99 equivalent is bgfx_view_mode_t.
Public Types
-bgfx::setViewMode(ViewId _id, ViewMode::Enum _mode = ViewMode::Default)¶bgfx::setViewMode(ViewId _id, ViewMode::Enum _mode = ViewMode::Default)¶Set view sorting mode.
View mode must be set prior calling bgfx::submit for the view.
bgfx::setViewFrameBuffer(ViewId _id, FrameBufferHandle _handle)¶Set view frame buffer.
@@ -2656,7 +2656,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callibgfx::setViewTransform(ViewId _id, const void *_view, const void *_proj)¶Set view view and projection matrices, all draw primitives in this view will use these matrices.
@@ -2673,7 +2673,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callibgfx::setViewOrder(ViewId _id = 0, uint16_t _num = UINT16_MAX, const ViewId *_remap = NULL)¶Post submit view reordering.
@@ -2690,7 +2690,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callibgfx::resetView(ViewId _id)¶Reset all view settings to default.
@@ -2711,7 +2711,7 @@ known until the last moment, view ids can be remaped to arbitrary order by calliAPI for multi-threaded submission.
-bgfx::begin(bool _forThread = false)¶Begin submitting draw calls from thread.
@@ -2724,15 +2724,15 @@ known until the last moment, view ids can be remaped to arbitrary order by calliEncoder¶bgfx::Encoder¶Encoders are used for submitting draw calls from multiple threads. Only one encoder per thread should be used. Use bgfx::begin() to obtain an encoder for a thread.
C99 equivalent is bgfx_encoder.
Public Functions
-setMarker(const char *_marker)¶Sets a debug marker. This allows you to group graphics calls together for easy browsing in graphics debugging tools.
@@ -2752,12 +2752,12 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetState(uint64_t _state, uint32_t _rgba = 0)¶Set render states for draw primitive.
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)
BGFX_STATE_BLEND_EQUATION_ADD is set when no other blend equation is specified.
setCondition(OcclusionQueryHandle _handle, bool _visible)¶Set condition for rendering.
@@ -2799,7 +2799,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetStencil(uint32_t _fstencil, uint32_t _bstencil = BGFX_STENCIL_NONE)¶Set stencil test state.
@@ -2815,7 +2815,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetScissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)¶Set scissor for draw primitive. To scissor for all primitives in view see bgfx::setViewScissor.
setScissor(uint16_t _cache = UINT16_MAX)¶Set scissor from cache for draw primitive.
@@ -2850,7 +2850,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetTransform(const void *_mtx, uint16_t _num = 1)¶Set model matrix for draw primitive. If it is not called, model will be rendered with identity model matrix.
@@ -2868,7 +2868,7 @@ known until the last moment, view ids can be remaped to arbitrary order by calliallocTransform(Transform *_transform, uint16_t _num)¶Reserve _num matrices in internal matrix cache.
setTransform(uint32_t _cache, uint16_t _num = 1)¶Set model matrix from matrix cache for draw primitive.
@@ -2904,7 +2904,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetUniform(UniformHandle _handle, const void *_value, uint16_t _num = 1)¶Set shader uniform parameter for draw primitive.
@@ -2921,7 +2921,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetIndexBuffer(IndexBufferHandle _handle)¶Set index buffer for draw primitive.
@@ -2936,7 +2936,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetIndexBuffer(IndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices)¶Set index buffer for draw primitive.
@@ -2953,7 +2953,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetIndexBuffer(DynamicIndexBufferHandle _handle)¶Set index buffer for draw primitive.
@@ -2968,7 +2968,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices)¶Set index buffer for draw primitive.
@@ -2985,7 +2985,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetIndexBuffer(const TransientIndexBuffer *_tib)¶Set index buffer for draw primitive.
@@ -3000,7 +3000,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetIndexBuffer(const TransientIndexBuffer *_tib, uint32_t _firstIndex, uint32_t _numIndices)¶Set index buffer for draw primitive.
@@ -3017,7 +3017,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetVertexBuffer(uint8_t _stream, VertexBufferHandle _handle)¶Set vertex buffer for draw primitive.
@@ -3033,7 +3033,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetVertexBuffer(uint8_t _stream, VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices, VertexLayoutHandle _layoutHandle = BGFX_INVALID_HANDLE)¶Set vertex buffer for draw primitive.
@@ -3052,7 +3052,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle)¶Set vertex buffer for draw primitive.
@@ -3068,7 +3068,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices, VertexLayoutHandle _layoutHandle = BGFX_INVALID_HANDLE)¶Set vertex buffer for draw primitive.
@@ -3087,7 +3087,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetVertexBuffer(uint8_t _stream, const TransientVertexBuffer *_tvb)¶Set vertex buffer for draw primitive.
@@ -3103,7 +3103,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetVertexBuffer(uint8_t _stream, const TransientVertexBuffer *_tvb, uint32_t _startVertex, uint32_t _numVertices, VertexLayoutHandle _layoutHandle = BGFX_INVALID_HANDLE)¶Set vertex buffer for draw primitive.
@@ -3122,7 +3122,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetVertexCount(uint32_t _numVertices)¶Set number of vertices for auto generated vertices use in conjuction with gl_VertexID.
@@ -3139,7 +3139,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetInstanceDataBuffer(const InstanceDataBuffer *_idb)¶Set instance data buffer for draw primitive.
@@ -3154,7 +3154,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetInstanceDataBuffer(const InstanceDataBuffer *_idb, uint32_t _start, uint32_t _num)¶Set instance data buffer for draw primitive.
@@ -3171,7 +3171,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetInstanceDataBuffer(VertexBufferHandle _handle, uint32_t _start, uint32_t _num)¶Set instance data buffer for draw primitive.
@@ -3188,7 +3188,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetInstanceDataBuffer(DynamicVertexBufferHandle _handle, uint32_t _start, uint32_t _num)¶Set instance data buffer for draw primitive.
@@ -3205,7 +3205,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetInstanceCount(uint32_t _numInstances)¶Set number of instances for auto generated instances use in conjuction with gl_InstanceID.
@@ -3222,7 +3222,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetTexture(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint32_t _flags = UINT32_MAX)¶Set texture stage for draw primitive.
@@ -3244,7 +3244,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callitouch(ViewId _id)¶Submit 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.
@@ -3260,7 +3260,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisubmit(ViewId _id, ProgramHandle _program, uint32_t _depth = 0, uint8_t _flags = BGFX_DISCARD_ALL)¶Submit primitive for rendering.
@@ -3278,7 +3278,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisubmit(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint32_t _depth = 0, uint8_t _flags = BGFX_DISCARD_ALL)¶Submit primitive with occlusion query for rendering.
@@ -3297,7 +3297,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisubmit(ViewId _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16_t _start = 0, uint16_t _num = 1, uint32_t _depth = 0, uint8_t _flags = BGFX_DISCARD_ALL)¶Submit primitive for rendering with index and instance data info from indirect buffer.
@@ -3318,7 +3318,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetBuffer(uint8_t _stage, IndexBufferHandle _handle, Access::Enum _access)¶Set compute index buffer.
@@ -3335,7 +3335,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetBuffer(uint8_t _stage, VertexBufferHandle _handle, Access::Enum _access)¶Set compute vertex buffer.
@@ -3352,7 +3352,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetBuffer(uint8_t _stage, DynamicIndexBufferHandle _handle, Access::Enum _access)¶Set compute dynamic index buffer.
@@ -3369,7 +3369,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetBuffer(uint8_t _stage, DynamicVertexBufferHandle _handle, Access::Enum _access)¶Set compute dynamic vertex buffer.
@@ -3386,7 +3386,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetBuffer(uint8_t _stage, IndirectBufferHandle _handle, Access::Enum _access)¶Set compute indirect buffer.
@@ -3403,9 +3403,9 @@ known until the last moment, view ids can be remaped to arbitrary order by callisetImage(uint8_t _stage, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format = TextureFormat::Count)¶setImage(uint8_t _stage, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format = TextureFormat::Count)¶Set compute image from texture.
C99 equivalent is bgfx_encoder_set_image.
dispatch(ViewId _id, ProgramHandle _handle, uint32_t _numX = 1, uint32_t _numY = 1, uint32_t _numZ = 1, uint8_t _flags = BGFX_DISCARD_ALL)¶Dispatch compute.
@@ -3442,7 +3442,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callidispatch(ViewId _id, ProgramHandle _handle, IndirectBufferHandle _indirectHandle, uint16_t _start = 0, uint16_t _num = 1, uint8_t _flags = BGFX_DISCARD_ALL)¶Dispatch compute indirect.
@@ -3462,7 +3462,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callidiscard(uint8_t _flags = BGFX_DISCARD_ALL)¶Discard all previously set state for draw or compute call.
@@ -3477,7 +3477,7 @@ known until the last moment, view ids can be remaped to arbitrary order by calliblit(ViewId _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX)¶Blit texture 2D region between two 2D textures.
@@ -3504,7 +3504,7 @@ known until the last moment, view ids can be remaped to arbitrary order by calliblit(ViewId _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX)¶Blit texture region between two textures.
@@ -3549,7 +3549,7 @@ known until the last moment, view ids can be remaped to arbitrary order by callibgfx::setMarker(const char *_marker)¶Sets debug marker.
@@ -3560,9 +3560,9 @@ known until the last moment, view ids can be remaped to arbitrary order by callibgfx::setName(ShaderHandle _handle, const char *_name, int32_t _len = INT32_MAX)bgfx::setName(ShaderHandle _handle, const char *_name, int32_t _len = INT32_MAX)¶Set shader debug name.
C99 equivalent is bgfx_set_shader_name.
bgfx::setName(TextureHandle _handle, const char *_name, int32_t _len = INT32_MAX)bgfx::setName(TextureHandle _handle, const char *_name, int32_t _len = INT32_MAX)¶Set texture debug name.
C99 equivalent is bgfx_set_texture_name.
bgfx::setState(uint64_t _state, uint32_t _rgba = 0)¶Set render states for draw primitive.
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)
BGFX_STATE_BLEND_EQUATION_ADD is set when no other blend equation is specified.
Write
-BGFX_STATE_WRITE_R¶BGFX_STATE_WRITE_R¶Enable R write.
Color RGB/alpha/depth write. When it’s not specified write will be disabled.
Depth Test
-BGFX_STATE_DEPTH_TEST_LESS¶BGFX_STATE_DEPTH_TEST_LESS¶Enable depth test, less.
Depth test state. When BGFX_STATE_DEPTH_ is not specified depth test will be disabled.
Blend Mode
-BGFX_STATE_BLEND_ZERO¶BGFX_STATE_BLEND_ZERO¶0, 0, 0, 0
Use BGFX_STATE_BLEND_FUNC(_src, _dst) or BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA) helper macros.
Blend Equaation
-BGFX_STATE_BLEND_EQUATION_ADD¶BGFX_STATE_BLEND_EQUATION_ADD¶Blend add: src + dst.
Use BGFX_STATE_BLEND_EQUATION(_equation) or BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA) helper macros.
BGFX_STATE_BLEND_EQUATION_REVSUB¶BGFX_STATE_BLEND_EQUATION_REVSUB¶Blend reverse subtract: dst - src.
Primitive Culling
-BGFX_STATE_CULL_CW¶BGFX_STATE_CULL_CW¶Cull clockwise triangles.
Cull state. When BGFX_STATE_CULL_* is not specified culling will be disabled.
Primitive Type
-bgfx::setStencil(uint32_t _fstencil, uint32_t _bstencil = BGFX_STENCIL_NONE)¶Set stencil test state.
@@ -3917,9 +3917,9 @@ known until the last moment, view ids can be remaped to arbitrary order by calliWhen scissor rectangle is changing per draw call inside the same view use bgfx::setScissor, otherwise prefer bgfx::setViewScissor.
-bgfx::setScissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)bgfx::setScissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)¶Set scissor for draw primitive. For scissor for all primitives in view see bgfx::setViewScissor.
Scissor cache index.
@@ -3948,9 +3948,9 @@ otherwise prefer bgfx::setViewScissor.bgfx::setScissor(uint16_t _cache = UINT16_MAX)bgfx::setScissor(uint16_t _cache = UINT16_MAX)¶Set scissor from cache for draw primitive.
C99 equivalent is bgfx_set_scissor_cached.
bgfx::allocTransform(Transform *_transform, uint16_t _num)¶Reserve _num matrices in internal matrix cache.
bgfx::setTransform(const void *_mtx, uint16_t _num = 1)bgfx::setTransform(const void *_mtx, uint16_t _num = 1)¶Set model matrix for draw primitive. If it is not called, the model will be rendered with an identity model matrix.
index into matrix cache in case the same model matrix has to be used for other draw primitive call.
@@ -4004,9 +4004,9 @@ otherwise prefer bgfx::setViewScissor.bgfx::setTransform(uint32_t _cache, uint16_t _num = 1)bgfx::setTransform(uint32_t _cache, uint16_t _num = 1)¶Set model matrix from matrix cache for draw primitive.
C99 equivalent is bgfx_set_transform_cached.
bgfx::setCondition(OcclusionQueryHandle _handle, bool _visible)¶Set condition for rendering.
@@ -4042,9 +4042,9 @@ otherwise prefer bgfx::setViewScissor.bgfx::setIndexBuffer(IndexBufferHandle _handle)bgfx::setIndexBuffer(IndexBufferHandle _handle)¶Set index buffer for draw primitive.
C99 equivalent is bgfx_set_index_buffer.
bgfx::setIndexBuffer(IndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices)bgfx::setIndexBuffer(IndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices)¶Set index buffer for draw primitive.
C99 equivalent is bgfx_set_index_buffer.
bgfx::setIndexBuffer(DynamicIndexBufferHandle _handle)bgfx::setIndexBuffer(DynamicIndexBufferHandle _handle)¶Set index buffer for draw primitive.
C99 equivalent is bgfx_set_dynamic_index_buffer.
bgfx::setIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices)bgfx::setIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices)¶Set index buffer for draw primitive.
C99 equivalent is bgfx_set_dynamic_index_buffer.
TransientIndexBuffer¶bgfx::TransientIndexBuffer¶Transient index buffer.
C99 equivalent is bgfx_transient_index_buffer_t.
bgfx::setIndexBuffer(const TransientIndexBuffer *_tib)bgfx::setIndexBuffer(const TransientIndexBuffer *_tib)¶Set index buffer for draw primitive.
C99 equivalent is bgfx_set_transient_index_buffer.
bgfx::setIndexBuffer(const TransientIndexBuffer *_tib, uint32_t _firstIndex, uint32_t _numIndices)bgfx::setIndexBuffer(const TransientIndexBuffer *_tib, uint32_t _firstIndex, uint32_t _numIndices)¶Set index buffer for draw primitive.
C99 equivalent is bgfx_set_transient_index_buffer.
bgfx::setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle)bgfx::setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle)¶Set vertex buffer for draw primitive.
C99 equivalent is bgfx_set_vertex_buffer.
bgfx::setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices, VertexLayoutHandle _layoutHandle = BGFX_INVALID_HANDLE)bgfx::setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices, VertexLayoutHandle _layoutHandle = BGFX_INVALID_HANDLE)¶Set vertex buffer for draw primitive.
C99 equivalent is bgfx_set_vertex_buffer.
bgfx::setVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle)bgfx::setVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle)¶Set vertex buffer for draw primitive.
C99 equivalent is bgfx_set_dynamic_vertex_buffer.
bgfx::setVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices, VertexLayoutHandle _layoutHandle = BGFX_INVALID_HANDLE)bgfx::setVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices, VertexLayoutHandle _layoutHandle = BGFX_INVALID_HANDLE)¶Set vertex buffer for draw primitive.
C99 equivalent is bgfx_set_dynamic_vertex_buffer.
TransientVertexBuffer¶bgfx::TransientVertexBuffer¶Transient vertex buffer.
C99 equivalent is bgfx_transient_vertex_buffer_t.
Public Members
-data¶Pointer to data.
bgfx::setVertexBuffer(uint8_t _stream, const TransientVertexBuffer *_tvb)bgfx::setVertexBuffer(uint8_t _stream, const TransientVertexBuffer *_tvb)¶Set vertex buffer for draw primitive.
C99 equivalent is bgfx_set_transient_vertex_buffer.
bgfx::setVertexBuffer(uint8_t _stream, const TransientVertexBuffer *_tvb, uint32_t _startVertex, uint32_t _numVertices, VertexLayoutHandle _layoutHandle = BGFX_INVALID_HANDLE)bgfx::setVertexBuffer(uint8_t _stream, const TransientVertexBuffer *_tvb, uint32_t _startVertex, uint32_t _numVertices, VertexLayoutHandle _layoutHandle = BGFX_INVALID_HANDLE)¶Set vertex buffer for draw primitive.
C99 equivalent is bgfx_set_transient_vertex_buffer.
bgfx::setVertexCount(uint32_t _numVertices)¶Set number of vertices for auto generated vertices use in conjuction with gl_VertexID.
@@ -4348,9 +4348,9 @@ otherwise prefer bgfx::setViewScissor.InstanceDataBuffer¶bgfx::InstanceDataBuffer¶Instance data buffer info.
C99 equivalent is bgfx_texture_info_t.
Public Members
-data¶Pointer to data.
bgfx::setInstanceDataBuffer(const InstanceDataBuffer *_idb)bgfx::setInstanceDataBuffer(const InstanceDataBuffer *_idb)¶Set instance data buffer for draw primitive.
C99 equivalent is bgfx_set_instance_data_buffer.
bgfx::setInstanceDataBuffer(const InstanceDataBuffer *_idb, uint32_t _start, uint32_t _num)bgfx::setInstanceDataBuffer(const InstanceDataBuffer *_idb, uint32_t _start, uint32_t _num)¶Set instance data buffer for draw primitive.
C99 equivalent is bgfx_set_instance_data_buffer.
bgfx::setInstanceDataBuffer(VertexBufferHandle _handle, uint32_t _start, uint32_t _num)bgfx::setInstanceDataBuffer(VertexBufferHandle _handle, uint32_t _start, uint32_t _num)¶Set instance data buffer for draw primitive.
C99 equivalent is bgfx_set_instance_data_from_vertex_buffer.
bgfx::setInstanceDataBuffer(DynamicVertexBufferHandle _handle, uint32_t _start, uint32_t _num)bgfx::setInstanceDataBuffer(DynamicVertexBufferHandle _handle, uint32_t _start, uint32_t _num)¶Set instance data buffer for draw primitive.
C99 equivalent is bgfx_set_instance_data_from_dynamic_vertex_buffer.
bgfx::setInstanceCount(uint32_t _numInstances)¶Set number of instances for auto generated instances use in conjuction with gl_InstanceID.
@@ -4484,7 +4484,7 @@ otherwise prefer bgfx::setViewScissor.bgfx::setTexture(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint32_t _flags = UINT32_MAX)¶Set texture stage for draw primitive.
@@ -4510,9 +4510,9 @@ otherwise prefer bgfx::setViewScissor.Within view all draw commands are executed after blit and compute commands.
-bgfx::submit(ViewId _id, ProgramHandle _program, uint32_t _depth = 0, uint8_t _flags = BGFX_DISCARD_ALL)bgfx::submit(ViewId _id, ProgramHandle _program, uint32_t _depth = 0, uint8_t _flags = BGFX_DISCARD_ALL)¶Submit primitive for rendering.
C99 equivalent is bgfx_submit.
bgfx::submit(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint32_t _depth = 0, uint8_t _flags = BGFX_DISCARD_ALL)bgfx::submit(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint32_t _depth = 0, uint8_t _flags = BGFX_DISCARD_ALL)¶Submit primitive with occlusion query for rendering.
C99 equivalent is bgfx_submit_occlusion_query.
bgfx::submit(ViewId _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16_t _start = 0, uint16_t _num = 1, uint32_t _depth = 0, uint8_t _flags = BGFX_DISCARD_ALL)bgfx::submit(ViewId _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16_t _start = 0, uint16_t _num = 1, uint32_t _depth = 0, uint8_t _flags = BGFX_DISCARD_ALL)¶Submit primitive for rendering with index and instance data info from indirect buffer.
C99 equivalent is bgfx_submit_indirect.
Access¶bgfx::Access¶Access mode enum.
C99 equivalent is bgfx_access_t.
bgfx::setBuffer(uint8_t _stage, IndexBufferHandle _handle, Access::Enum _access)bgfx::setBuffer(uint8_t _stage, IndexBufferHandle _handle, Access::Enum _access)¶Set compute index buffer.
C99 equivalent is bgfx_set_compute_index_buffer.
bgfx::setBuffer(uint8_t _stage, VertexBufferHandle _handle, Access::Enum _access)bgfx::setBuffer(uint8_t _stage, VertexBufferHandle _handle, Access::Enum _access)¶Set compute vertex buffer.
C99 equivalent is bgfx_set_compute_vertex_buffer.
bgfx::setBuffer(uint8_t _stage, DynamicIndexBufferHandle _handle, Access::Enum _access)bgfx::setBuffer(uint8_t _stage, DynamicIndexBufferHandle _handle, Access::Enum _access)¶Set compute dynamic index buffer.
C99 equivalent is bgfx_set_compute_dynamic_index_buffer.
bgfx::setBuffer(uint8_t _stage, DynamicVertexBufferHandle _handle, Access::Enum _access)bgfx::setBuffer(uint8_t _stage, DynamicVertexBufferHandle _handle, Access::Enum _access)¶Set compute dynamic vertex buffer.
C99 equivalent is bgfx_set_compute_dynamic_vertex_buffer.
bgfx::setBuffer(uint8_t _stage, IndirectBufferHandle _handle, Access::Enum _access)bgfx::setBuffer(uint8_t _stage, IndirectBufferHandle _handle, Access::Enum _access)¶Set compute indirect buffer.
C99 equivalent is bgfx_set_compute_indirect_buffer.
bgfx::setImage(uint8_t _stage, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format = TextureFormat::Count)¶bgfx::setImage(uint8_t _stage, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format = TextureFormat::Count)¶Set compute image from texture.
C99 equivalent is bgfx_set_image.
Within view all compute commands are dispatched after blit commands, and before draw commands.
-bgfx::dispatch(ViewId _id, ProgramHandle _handle, uint32_t _numX = 1, uint32_t _numY = 1, uint32_t _numZ = 1, uint8_t _flags = BGFX_DISCARD_ALL)bgfx::dispatch(ViewId _id, ProgramHandle _handle, uint32_t _numX = 1, uint32_t _numY = 1, uint32_t _numZ = 1, uint8_t _flags = BGFX_DISCARD_ALL)¶Dispatch compute.
C99 equivalent is bgfx_dispatch.
bgfx::dispatch(ViewId _id, ProgramHandle _handle, IndirectBufferHandle _indirectHandle, uint16_t _start = 0, uint16_t _num = 1, uint8_t _flags = BGFX_DISCARD_ALL)bgfx::dispatch(ViewId _id, ProgramHandle _handle, IndirectBufferHandle _indirectHandle, uint16_t _start = 0, uint16_t _num = 1, uint8_t _flags = BGFX_DISCARD_ALL)¶Dispatch compute indirect.
C99 equivalent is bgfx_dispatch_indirect.
Within view all blit commands are executed before compute, and draw commands.
-bgfx::blit(ViewId _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX)bgfx::blit(ViewId _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX)¶Blit 2D texture region between two 2D textures.
Destination texture must be created with BGFX_TEXTURE_BLIT_DST flag.
bgfx::blit(ViewId _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX)bgfx::blit(ViewId _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX)¶Blit texture region between two textures.
Destination texture must be created with BGFX_TEXTURE_BLIT_DST flag.
Memory¶bgfx::Memory¶Memory must be obtained by calling bgfx::alloc, bgfx::copy, or bgfx::makeRef.
It is illegal to create this structure on stack and pass it to any bgfx API.
@@ -4852,13 +4852,13 @@ otherwise prefer bgfx::setViewScissor.bgfx::alloc(uint32_t _size)¶Allocate buffer to pass to bgfx calls. Data will be freed inside bgfx.
@@ -4882,7 +4882,7 @@ otherwise prefer bgfx::setViewScissor.bgfx::copy(const void *_data, uint32_t _size)¶Allocate buffer and copy data into it. Data will be freed inside bgfx.
@@ -4898,7 +4898,7 @@ otherwise prefer bgfx::setViewScissor.bgfx::makeRef(const void *_data, uint32_t _size, ReleaseFn _releaseFn = NULL, void *_userData = NULL)¶Make reference to data to pass to bgfx. Unlike bgfx::alloc, this call doesn’t allocate memory for data. It just copies the _data pointer. You can pass ReleaseFn function pointer to release this memory after it’s consumed, otherwise you must make sure _data is available for at least 2 bgfx::frame calls. ReleaseFn function must be able to be called from any thread.
bgfx::createShader(const Memory *_mem)¶Create shader from memory buffer.
@@ -4931,7 +4931,7 @@ otherwise prefer bgfx::setViewScissor.bgfx::getShaderUniforms(ShaderHandle _handle, UniformHandle *_uniforms = NULL, uint16_t _max = 0)¶Returns the number of uniforms and uniform handles used inside a shader.
@@ -4952,9 +4952,9 @@ otherwise prefer bgfx::setViewScissor.bgfx::destroy(ShaderHandle _handle)bgfx::destroy(ShaderHandle _handle)¶Destroy shader. Once a shader program is created with _handle, it is safe to destroy that shader.
C99 equivalent is bgfx_destroy_shader.
bgfx::createProgram(ShaderHandle _vsh, ShaderHandle _fsh, bool _destroyShaders = false)bgfx::createProgram(ShaderHandle _vsh, ShaderHandle _fsh, bool _destroyShaders = false)¶Create program with vertex and fragment shaders.
Program handle if vertex shader output and fragment shader input are matching, otherwise returns invalid program handle.
@@ -4986,9 +4986,9 @@ otherwise prefer bgfx::setViewScissor.bgfx::createProgram(ShaderHandle _csh, bool _destroyShader = false)bgfx::createProgram(ShaderHandle _csh, bool _destroyShader = false)¶Create program with compute shader.
Program handle.
@@ -5004,9 +5004,9 @@ otherwise prefer bgfx::setViewScissor.bgfx::destroy(ProgramHandle _handle)bgfx::destroy(ProgramHandle _handle)¶Destroy program.
C99 equivalent is bgfx_destroy_program.
bgfx::createUniform(const char *_name, UniformType::Enum _type, uint16_t _num = 1)¶Create shader uniform parameter.
Handle to uniform object.
Uniform names are unique. It’s valid to call bgfx::createUniform multiple times with the same uniform name. The library will always return the same handle, but the handle reference count will be incremented. This means that the same number of bgfx::destroyUniform must 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.
bgfx::getUniformInfo(UniformHandle _handle, UniformInfo &_info)¶Retrieve uniform info.
@@ -5077,9 +5077,9 @@ otherwise prefer bgfx::setViewScissor.bgfx::destroy(UniformHandle _handle)bgfx::destroy(UniformHandle _handle)¶Destroy shader uniform parameter.
C99 equivalent is bgfx_destroy_uniform.
UniformType¶bgfx::UniformType¶Uniform type enum.
C99 equivalent is bgfx_uniform_type_t.
Public Types
-Enum¶Uniform types:
Values:
-UniformInfo¶bgfx::UniformInfo¶Uniform info.
C99 equivalent is bgfx_uniform_info_t.
Public Members
-name[256]¶Uniform name.
type¶Uniform type.
num¶Number of elements in array.
@@ -5183,7 +5183,7 @@ otherwise prefer bgfx::setViewScissor.bgfx::createVertexLayout(const VertexLayout &_layout)¶Create vertex layout.
@@ -5194,9 +5194,9 @@ otherwise prefer bgfx::setViewScissor.bgfx::destroy(VertexLayoutHandle _handle)bgfx::destroy(VertexLayoutHandle _handle)¶Destroy vertex layout.
C99 equivalent is bgfx_destroy_vertex_layout.
bgfx::createVertexBuffer(const Memory *_mem, const VertexLayout &_layout, uint16_t _flags = BGFX_BUFFER_NONE)¶Create static vertex buffer.
@@ -5232,9 +5232,26 @@ otherwise prefer bgfx::setViewScissor.bgfx::setName(VertexBufferHandle _handle, const char *_name, int32_t _len = INT32_MAX)¶Set static vertex buffer debug name.
+C99 equivalent is bgfx_set_vertex_buffer_name.
[in] _handle: Static vertex buffer handle.
[in] _name: Static vertex buffer name.
[in] _len: Static vertex buffer name length (if length is INT32_MAX, it’s expected that _name is zero terminated string.
bgfx::destroy(VertexBufferHandle _handle)bgfx::destroy(VertexBufferHandle _handle)¶Destroy static vertex buffer.
C99 equivalent is bgfx_destroy_vertex_buffer.
VertexLayout¶bgfx::VertexLayout¶Vertex layout.
C99 equivalent is bgfx_vertex_layout_t.
Public Functions
-begin(RendererType::Enum _renderer = RendererType::Noop)¶begin(RendererType::Enum _renderer = RendererType::Noop)¶Start VertexLayout.
C99 equivalent is bgfx_vertex_layout_begin.
end()¶End VertexLayout.
@@ -5280,7 +5297,7 @@ otherwise prefer bgfx::setViewScissor.add(Attrib::Enum _attrib, uint8_t _num, AttribType::Enum _type, bool _normalized = false, bool _asInt = false)¶Add attribute to VertexLayout.
@@ -5301,7 +5318,7 @@ otherwise prefer bgfx::setViewScissor.skip(uint8_t _num)¶Skip _num bytes in vertex stream.
@@ -5312,7 +5329,7 @@ otherwise prefer bgfx::setViewScissor.decode(Attrib::Enum _attrib, uint8_t &_num, AttribType::Enum &_type, bool &_normalized, bool &_asInt) const¶Decode attribute.
@@ -5323,7 +5340,7 @@ otherwise prefer bgfx::setViewScissor.has(Attrib::Enum _attrib) const¶Returns true if VertexLayout contains attribute.
@@ -5334,19 +5351,19 @@ otherwise prefer bgfx::setViewScissor.