Updated docs.

This commit is contained in:
Бранимир Караџић
2022-09-17 18:23:36 -07:00
parent 68fb9154e6
commit fc561e3e58
22 changed files with 4768 additions and 5249 deletions

View File

@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -130,7 +130,7 @@ ul.search li a {
font-weight: bold;
}
ul.search li div.context {
ul.search li p.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
@@ -222,7 +222,7 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 450px;
min-width: 360px;
max-width: 800px;
}
@@ -236,7 +236,6 @@ div.body p, div.body dd, div.body li, div.body blockquote {
a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
@@ -247,6 +246,7 @@ span.brackets > a:after {
content: "]";
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
@@ -277,25 +277,25 @@ p.rubric {
font-weight: bold;
}
img.align-left, .figure.align-left, object.align-left {
img.align-left, figure.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
img.align-right, figure.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
img.align-center, figure.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, .figure.align-default {
img.align-default, figure.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
@@ -319,7 +319,8 @@ img.align-default, .figure.align-default {
/* -- sidebars -------------------------------------------------------------- */
div.sidebar {
div.sidebar,
aside.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
@@ -333,13 +334,11 @@ div.sidebar {
p.sidebar-title {
font-weight: bold;
}
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px;
@@ -377,12 +376,14 @@ div.body p.centered {
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
aside.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
aside.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
@@ -425,10 +426,6 @@ table.docutils td, table.docutils th {
border-bottom: 1px solid #aaa;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
@@ -455,20 +452,22 @@ td > :last-child {
/* -- figures --------------------------------------------------------------- */
div.figure {
div.figure, figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
div.figure p.caption, figcaption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
div.figure p.caption span.caption-number,
figcaption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
div.figure p.caption span.caption-text,
figcaption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
@@ -503,6 +502,63 @@ table.hlist td {
vertical-align: top;
}
/* -- object description styles --------------------------------------------- */
.sig {
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
}
.sig-name, code.descname {
background-color: transparent;
font-weight: bold;
}
.sig-name {
font-size: 1.1em;
}
code.descname {
font-size: 1.2em;
}
.sig-prename, code.descclassname {
background-color: transparent;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.sig-param.n {
font-style: italic;
}
/* C++ specific styling */
.sig-inline.c-texpr,
.sig-inline.cpp-texpr {
font-family: unset;
}
.sig.c .k, .sig.c .kt,
.sig.cpp .k, .sig.cpp .kt {
color: #0033B3;
}
.sig.c .m,
.sig.cpp .m {
color: #1750EB;
}
.sig.c .s, .sig.c .sc,
.sig.cpp .s, .sig.cpp .sc {
color: #067D17;
}
/* -- other body styles ----------------------------------------------------- */
@@ -552,7 +608,6 @@ ol.simple p,
ul.simple p {
margin-bottom: 0;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
@@ -581,11 +636,11 @@ dl.field-list > dt {
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
@@ -629,14 +684,6 @@ dl.glossary dt {
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
@@ -677,8 +724,9 @@ dl.glossary dt {
.classifier:before {
font-style: normal;
margin: 0.5em;
margin: 0 0.5em;
content: ":";
display: inline-block;
}
abbr, acronym {
@@ -702,6 +750,7 @@ span.pre {
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
white-space: nowrap;
}
div[class*="highlight-"] {
@@ -765,8 +814,12 @@ div.code-block-caption code {
table.highlighttable td.linenos,
span.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
-webkit-user-select: text; /* Safari fallback only */
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+ */
}
div.code-block-caption span.caption-number {
@@ -781,16 +834,6 @@ div.literal-block-wrapper {
margin: 1em 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
code.descclassname {
background-color: transparent;
}
code.xref, a code {
background-color: transparent;
font-weight: bold;

File diff suppressed because one or more lines are too long

View File

@@ -2,315 +2,263 @@
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilities for all documentation.
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
"profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {};
}
*/
/**
* small helper function to urldecode strings
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
const _ready = (callback) => {
if (document.readyState !== "loading") {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* highlight a given string on a node by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
const _highlight = (node, addItems, text, className) => {
if (node.nodeType === Node.TEXT_NODE) {
const val = node.nodeValue;
const parent = node.parentNode;
const pos = val.toLowerCase().indexOf(text);
if (
pos >= 0 &&
!parent.classList.contains(className) &&
!parent.classList.contains("nohighlight")
) {
let span;
const closestNode = parent.closest("body, svg, foreignObject");
const isInSVG = closestNode && closestNode.matches("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.classList.add(className);
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
parent.insertBefore(
span,
parent.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
const rect = document.createElementNS(
"http://www.w3.org/2000/svg",
"rect"
);
const bbox = parent.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute("class", className);
addItems.push({ parent: parent, target: rect });
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
} else if (node.matches && !node.matches("button, select, textarea")) {
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
const _highlightText = (thisNode, text, className) => {
let addItems = [];
_highlight(thisNode, addItems, text, className);
addItems.forEach((obj) =>
obj.parent.insertAdjacentElement("beforebegin", obj.target)
);
};
/**
* Small JavaScript module for the documentation.
*/
var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
const Documentation = {
init: () => {
Documentation.highlightSearchWords();
Documentation.initDomainIndexTable();
Documentation.initOnKeyListeners();
},
/**
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
LOCALE : 'unknown',
TRANSLATIONS: {},
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
LOCALE: "unknown",
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated === 'undefined')
return string;
return (typeof translated === 'string') ? translated : translated[0];
gettext: (string) => {
const translated = Documentation.TRANSLATIONS[string];
switch (typeof translated) {
case "undefined":
return string; // no translation
case "string":
return translated; // translation exists
default:
return translated[0]; // (singular, plural) translation tuple exists
}
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
ngettext: (singular, plural, n) => {
const translated = Documentation.TRANSLATIONS[singular];
if (typeof translated !== "undefined")
return translated[Documentation.PLURAL_EXPR(n)];
return n === 1 ? singular : plural;
},
addTranslations : function(catalog) {
for (var key in catalog.messages)
this.TRANSLATIONS[key] = catalog.messages[key];
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
this.LOCALE = catalog.locale;
},
/**
* add context elements like header anchor links
*/
addContextElements : function() {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
appendTo(this);
});
$('dt[id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this definition')).
appendTo(this);
});
},
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
addTranslations: (catalog) => {
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
Documentation.PLURAL_EXPR = new Function(
"n",
`return (${catalog.plural_expr})`
);
Documentation.LOCALE = catalog.locale;
},
/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords : function() {
var params = $.getQueryParameters();
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
if (!body.length) {
body = $('body');
}
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<p class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
.appendTo($('#searchbox'));
}
},
highlightSearchWords: () => {
const highlight =
new URLSearchParams(window.location.search).get("highlight") || "";
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
if (terms.length === 0) return; // nothing to do
/**
* init the domain index toggle buttons
*/
initIndexTable : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) === 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
togglers.click();
}
// There should never be more than one element matching "div.body"
const divBody = document.querySelectorAll("div.body");
const body = divBody.length ? divBody[0] : document.querySelector("body");
window.setTimeout(() => {
terms.forEach((term) => _highlightText(body, term, "highlighted"));
}, 10);
const searchBox = document.getElementById("searchbox");
if (searchBox === null) return;
searchBox.appendChild(
document
.createRange()
.createContextualFragment(
'<p class="highlight-link">' +
'<a href="javascript:Documentation.hideSearchWords()">' +
Documentation.gettext("Hide Search Matches") +
"</a></p>"
)
);
},
/**
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
hideSearchWords: () => {
document
.querySelectorAll("#searchbox .highlight-link")
.forEach((el) => el.remove());
document
.querySelectorAll("span.highlighted")
.forEach((el) => el.classList.remove("highlighted"));
const url = new URL(window.location);
url.searchParams.delete("highlight");
window.history.replaceState({}, "", url);
},
/**
* make the url absolute
* helper function to focus on search bar
*/
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
focusSearchBar: () => {
document.querySelectorAll("input[name=q]")[0]?.focus();
},
/**
* get the current relative url
* Initialise the domain index toggle buttons
*/
getCurrentURL : function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this === '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
initDomainIndexTable: () => {
const toggler = (el) => {
const idNumber = el.id.substr(7);
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
if (el.src.substr(-9) === "minus.png") {
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
toggledRows.forEach((el) => (el.style.display = "none"));
} else {
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
toggledRows.forEach((el) => (el.style.display = ""));
}
};
const togglerElements = document.querySelectorAll("img.toggler");
togglerElements.forEach((el) =>
el.addEventListener("click", (event) => toggler(event.currentTarget))
);
togglerElements.forEach((el) => (el.style.display = ""));
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
},
initOnKeyListeners: function() {
$(document).keydown(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box, textarea, dropdown or button
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
&& !event.shiftKey) {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
if (prevHref) {
window.location.href = prevHref;
return false;
initOnKeyListeners: () => {
// only install a listener if it is really needed
if (
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
)
return;
const blacklistedElements = new Set([
"TEXTAREA",
"INPUT",
"SELECT",
"BUTTON",
]);
document.addEventListener("keydown", (event) => {
if (blacklistedElements.has(document.activeElement.tagName)) return; // bail for input elements
if (event.altKey || event.ctrlKey || event.metaKey) return; // bail with special keys
if (!event.shiftKey) {
switch (event.key) {
case "ArrowLeft":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const prevLink = document.querySelector('link[rel="prev"]');
if (prevLink && prevLink.href) {
window.location.href = prevLink.href;
event.preventDefault();
}
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
break;
case "ArrowRight":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const nextLink = document.querySelector('link[rel="next"]');
if (nextLink && nextLink.href) {
window.location.href = nextLink.href;
event.preventDefault();
}
break;
case "Escape":
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
Documentation.hideSearchWords();
event.preventDefault();
}
}
// some keyboard layouts may need Shift to get /
switch (event.key) {
case "/":
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
Documentation.focusSearchBar();
event.preventDefault();
}
});
}
},
};
// quick alias for translations
_ = Documentation.gettext;
const _ = Documentation.gettext;
$(document).ready(function() {
Documentation.init();
});
_ready(Documentation.init);

View File

@@ -1,12 +1,14 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.115.8277',
LANGUAGE: 'None',
VERSION: '1.116.8293',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: false,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: true,
};

4
_static/jquery.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -5,15 +5,16 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
/* Non-minified version JS is _stemmer.js if file is provided */
/* Non-minified version is copied as a separate JS file, is available */
/**
* Porter Stemmer
*/
@@ -196,102 +197,3 @@ var Stemmer = function() {
}
}
var splitChars = (function() {
var result = {};
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
var i, j, start, end;
for (i = 0; i < singles.length; i++) {
result[singles[i]] = true;
}
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
for (i = 0; i < ranges.length; i++) {
start = ranges[i][0];
end = ranges[i][1];
for (j = start; j <= end; j++) {
result[j] = true;
}
}
return result;
})();
function splitQuery(query) {
var result = [];
var start = -1;
for (var i = 0; i < query.length; i++) {
if (splitChars[query.charCodeAt(i)]) {
if (start !== -1) {
result.push(query.slice(start, i));
start = -1;
}
} else if (start === -1) {
start = i;
}
}
if (start !== -1) {
result.push(query.slice(start));
}
return result;
}

View File

@@ -1,5 +1,10 @@
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #eeffcc; }
.highlight { background: #eeffcc; }
.highlight .c { color: #408090; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */

View File

@@ -4,22 +4,24 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";
if (!Scorer) {
/**
* Simple result scoring code.
*/
/**
* Simple result scoring code.
*/
if (typeof Scorer === "undefined") {
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// The function takes a result array [docname, title, anchor, descr, score, filename]
// and returns the new score.
/*
score: function(result) {
return result[4];
score: result => {
const [docname, title, anchor, descr, score, filename] = result
return score
},
*/
@@ -28,9 +30,11 @@ if (!Scorer) {
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
objPrio: {
0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5, // used to be unimportantResults
},
// Used when the priority is not in the mapping.
objPrioDefault: 0,
@@ -39,444 +43,453 @@ if (!Scorer) {
partialTitle: 7,
// query found in terms
term: 5,
partialTerm: 2
partialTerm: 2,
};
}
if (!splitQuery) {
function splitQuery(query) {
return query.split(/\s+/);
const _removeChildren = (element) => {
while (element && element.lastChild) element.removeChild(element.lastChild);
};
/**
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
*/
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
const _displayItem = (item, highlightTerms, searchTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const [docName, title, anchor, descr] = item;
let listItem = document.createElement("li");
let requestUrl;
let linkUrl;
if (docBuilder === "dirhtml") {
// dirhtml builder
let dirname = docName + "/";
if (dirname.match(/\/index\/$/))
dirname = dirname.substring(0, dirname.length - 6);
else if (dirname === "index/") dirname = "";
requestUrl = docUrlRoot + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = docUrlRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
}
const params = new URLSearchParams();
params.set("highlight", [...highlightTerms].join(" "));
let linkEl = listItem.appendChild(document.createElement("a"));
linkEl.href = linkUrl + "?" + params.toString() + anchor;
linkEl.innerHTML = title;
if (descr)
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
else if (showSearchSummary)
fetch(requestUrl)
.then((responseData) => responseData.text())
.then((data) => {
if (data)
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms, highlightTerms)
);
});
Search.output.appendChild(listItem);
};
const _finishSearch = (resultCount) => {
Search.stopPulse();
Search.title.innerText = _("Search Results");
if (!resultCount)
Search.status.innerText = Documentation.gettext(
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
);
else
Search.status.innerText = _(
`Search finished, found ${resultCount} page(s) matching the search query.`
);
};
const _displayNextItem = (
results,
resultCount,
highlightTerms,
searchTerms
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
_displayItem(results.pop(), highlightTerms, searchTerms);
setTimeout(
() => _displayNextItem(results, resultCount, highlightTerms, searchTerms),
5
);
}
// search finished, update title and status message
else _finishSearch(resultCount);
};
/**
* Default splitQuery function. Can be overridden in ``sphinx.search`` with a
* custom function per language.
*
* The regular expression works by splitting the string on consecutive characters
* that are not Unicode letters, numbers, underscores, or emoji characters.
* This is the same as ``\W+`` in Python, preserving the surrogate pair area.
*/
if (typeof splitQuery === "undefined") {
var splitQuery = (query) => query
.split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
.filter(term => term) // remove remaining empty strings
}
/**
* Search Module
*/
var Search = {
const Search = {
_index: null,
_queued_query: null,
_pulse_status: -1,
_index : null,
_queued_query : null,
_pulse_status : -1,
htmlToText : function(htmlString) {
var virtualDocument = document.implementation.createHTMLDocument('virtual');
var htmlElement = $(htmlString, virtualDocument);
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;
htmlToText: (htmlString) => {
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
const docContent = htmlElement.querySelector('[role="main"]');
if (docContent !== undefined) return docContent.textContent;
console.warn(
"Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
);
return "";
},
init : function() {
var params = $.getQueryParameters();
if (params.q) {
var query = params.q[0];
$('input[name="q"]')[0].value = query;
this.performSearch(query);
}
init: () => {
const query = new URLSearchParams(window.location.search).get("q");
document
.querySelectorAll('input[name="q"]')
.forEach((el) => (el.value = query));
if (query) Search.performSearch(query);
},
loadIndex : function(url) {
$.ajax({type: "GET", url: url, data: null,
dataType: "script", cache: true,
complete: function(jqxhr, textstatus) {
if (textstatus != "success") {
document.getElementById("searchindexloader").src = url;
}
}});
},
loadIndex: (url) =>
(document.body.appendChild(document.createElement("script")).src = url),
setIndex : function(index) {
var q;
this._index = index;
if ((q = this._queued_query) !== null) {
this._queued_query = null;
Search.query(q);
setIndex: (index) => {
Search._index = index;
if (Search._queued_query !== null) {
const query = Search._queued_query;
Search._queued_query = null;
Search.query(query);
}
},
hasIndex : function() {
return this._index !== null;
},
hasIndex: () => Search._index !== null,
deferQuery : function(query) {
this._queued_query = query;
},
deferQuery: (query) => (Search._queued_query = query),
stopPulse : function() {
this._pulse_status = 0;
},
stopPulse: () => (Search._pulse_status = -1),
startPulse : function() {
if (this._pulse_status >= 0)
return;
function pulse() {
var i;
startPulse: () => {
if (Search._pulse_status >= 0) return;
const pulse = () => {
Search._pulse_status = (Search._pulse_status + 1) % 4;
var dotString = '';
for (i = 0; i < Search._pulse_status; i++)
dotString += '.';
Search.dots.text(dotString);
if (Search._pulse_status > -1)
window.setTimeout(pulse, 500);
}
Search.dots.innerText = ".".repeat(Search._pulse_status);
if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
};
pulse();
},
/**
* perform a search for something (or wait until index is loaded)
*/
performSearch : function(query) {
performSearch: (query) => {
// create the required interface elements
this.out = $('#search-results');
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
this.dots = $('<span></span>').appendTo(this.title);
this.status = $('<p class="search-summary">&nbsp;</p>').appendTo(this.out);
this.output = $('<ul class="search"/>').appendTo(this.out);
const searchText = document.createElement("h2");
searchText.textContent = _("Searching");
const searchSummary = document.createElement("p");
searchSummary.classList.add("search-summary");
searchSummary.innerText = "";
const searchList = document.createElement("ul");
searchList.classList.add("search");
$('#search-progress').text(_('Preparing search...'));
this.startPulse();
const out = document.getElementById("search-results");
Search.title = out.appendChild(searchText);
Search.dots = Search.title.appendChild(document.createElement("span"));
Search.status = out.appendChild(searchSummary);
Search.output = out.appendChild(searchList);
const searchProgress = document.getElementById("search-progress");
// Some themes don't use the search progress node
if (searchProgress) {
searchProgress.innerText = _("Preparing search...");
}
Search.startPulse();
// index already loaded, the browser was quick!
if (this.hasIndex())
this.query(query);
else
this.deferQuery(query);
if (Search.hasIndex()) Search.query(query);
else Search.deferQuery(query);
},
/**
* execute search (requires search index to be loaded)
*/
query : function(query) {
var i;
query: (query) => {
// stem the search terms and add them to the correct list
const stemmer = new Stemmer();
const searchTerms = new Set();
const excludedTerms = new Set();
const highlightTerms = new Set();
const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
splitQuery(query.trim()).forEach((queryTerm) => {
const queryTermLower = queryTerm.toLowerCase();
// stem the searchterms and add them to the correct list
var stemmer = new Stemmer();
var searchterms = [];
var excluded = [];
var hlterms = [];
var tmp = splitQuery(query);
var objectterms = [];
for (i = 0; i < tmp.length; i++) {
if (tmp[i] !== "") {
objectterms.push(tmp[i].toLowerCase());
}
// maybe skip this "word"
// stopwords array is from language_data.js
if (
stopwords.indexOf(queryTermLower) !== -1 ||
queryTerm.match(/^\d+$/)
)
return;
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
// skip this "word"
continue;
}
// stem the word
var word = stemmer.stemWord(tmp[i].toLowerCase());
// prevent stemmer from cutting word smaller than two chars
if(word.length < 3 && tmp[i].length >= 3) {
word = tmp[i];
}
var toAppend;
let word = stemmer.stemWord(queryTermLower);
// select the correct list
if (word[0] == '-') {
toAppend = excluded;
word = word.substr(1);
}
if (word[0] === "-") excludedTerms.add(word.substr(1));
else {
toAppend = searchterms;
hlterms.push(tmp[i].toLowerCase());
searchTerms.add(word);
highlightTerms.add(queryTermLower);
}
// only add if not already in the list
if (!$u.contains(toAppend, word))
toAppend.push(word);
}
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
});
// console.debug('SEARCH: searching for:');
// console.info('required: ', searchterms);
// console.info('excluded: ', excluded);
// console.debug("SEARCH: searching for:");
// console.info("required: ", [...searchTerms]);
// console.info("excluded: ", [...excludedTerms]);
// prepare search
var terms = this._index.terms;
var titleterms = this._index.titleterms;
// array of [filename, title, anchor, descr, score]
var results = [];
$('#search-progress').empty();
// array of [docname, title, anchor, descr, score, filename]
let results = [];
_removeChildren(document.getElementById("search-progress"));
// lookup as object
for (i = 0; i < objectterms.length; i++) {
var others = [].concat(objectterms.slice(0, i),
objectterms.slice(i+1, objectterms.length));
results = results.concat(this.performObjectSearch(objectterms[i], others));
}
objectTerms.forEach((term) =>
results.push(...Search.performObjectSearch(term, objectTerms))
);
// lookup as search terms in fulltext
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
// let the scorer override scores with a custom scoring function
if (Scorer.score) {
for (i = 0; i < results.length; i++)
results[i][4] = Scorer.score(results[i]);
}
if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
// now sort the results by score (in opposite order of appearance, since the
// display function below uses pop() to retrieve items) and then
// alphabetically
results.sort(function(a, b) {
var left = a[4];
var right = b[4];
if (left > right) {
return 1;
} else if (left < right) {
return -1;
} else {
results.sort((a, b) => {
const leftScore = a[4];
const rightScore = b[4];
if (leftScore === rightScore) {
// same score: sort alphabetically
left = a[1].toLowerCase();
right = b[1].toLowerCase();
return (left > right) ? -1 : ((left < right) ? 1 : 0);
const leftTitle = a[1].toLowerCase();
const rightTitle = b[1].toLowerCase();
if (leftTitle === rightTitle) return 0;
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
}
return leftScore > rightScore ? 1 : -1;
});
// remove duplicate search results
// note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
let seen = new Set();
results = results.reverse().reduce((acc, result) => {
let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
if (!seen.has(resultStr)) {
acc.push(result);
seen.add(resultStr);
}
return acc;
}, []);
results = results.reverse();
// for debugging
//Search.lastresults = results.slice(); // a copy
//console.info('search results:', Search.lastresults);
// console.info("search results:", Search.lastresults);
// print the results
var resultCount = results.length;
function displayNextItem() {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
dirname = dirname.substring(0, dirname.length-6);
} else if (dirname == 'index/') {
dirname = '';
}
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
}
listItem.append($('<a/>').attr('href',
linkUrl +
highlightstring + item[2]).html(item[1]));
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '' && data !== undefined) {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
}
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
}});
} else {
// no source available, just display title
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
}
}
// search finished, update title and status message
else {
Search.stopPulse();
Search.title.text(_('Search Results'));
if (!resultCount)
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
else
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
Search.status.fadeIn(500);
}
}
displayNextItem();
_displayNextItem(results, results.length, highlightTerms, searchTerms);
},
/**
* search for object names
*/
performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames;
var docnames = this._index.docnames;
var objects = this._index.objects;
var objnames = this._index.objnames;
var titles = this._index.titles;
performObjectSearch: (object, objectTerms) => {
const filenames = Search._index.filenames;
const docNames = Search._index.docnames;
const objects = Search._index.objects;
const objNames = Search._index.objnames;
const titles = Search._index.titles;
var i;
var results = [];
const results = [];
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
var fullnameLower = fullname.toLowerCase()
if (fullnameLower.indexOf(object) > -1) {
var score = 0;
var parts = fullnameLower.split('.');
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullnameLower == object || parts[parts.length - 1] == object) {
score += Scorer.objNameMatch;
// matches in last name
} else if (parts[parts.length - 1].indexOf(object) > -1) {
score += Scorer.objPartialMatch;
}
var match = objects[prefix][name];
var objname = objnames[match[1]][2];
var title = titles[match[0]];
// If more than one term searched for, we require other words to be
// found in the name/title/description
if (otherterms.length > 0) {
var haystack = (prefix + ' ' + name + ' ' +
objname + ' ' + title).toLowerCase();
var allfound = true;
for (i = 0; i < otherterms.length; i++) {
if (haystack.indexOf(otherterms[i]) == -1) {
allfound = false;
break;
}
}
if (!allfound) {
continue;
}
}
var descr = objname + _(', in ') + title;
const objectSearchCallback = (prefix, match) => {
const name = match[4]
const fullname = (prefix ? prefix + "." : "") + name;
const fullnameLower = fullname.toLowerCase();
if (fullnameLower.indexOf(object) < 0) return;
var anchor = match[3];
if (anchor === '')
anchor = fullname;
else if (anchor == '-')
anchor = objnames[match[1]][1] + '-' + fullname;
// add custom score for some objects according to scorer
if (Scorer.objPrio.hasOwnProperty(match[2])) {
score += Scorer.objPrio[match[2]];
} else {
score += Scorer.objPrioDefault;
}
results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
}
let score = 0;
const parts = fullnameLower.split(".");
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullnameLower === object || parts.slice(-1)[0] === object)
score += Scorer.objNameMatch;
else if (parts.slice(-1)[0].indexOf(object) > -1)
score += Scorer.objPartialMatch; // matches in last name
const objName = objNames[match[1]][2];
const title = titles[match[0]];
// If more than one term searched for, we require other words to be
// found in the name/title/description
const otherTerms = new Set(objectTerms);
otherTerms.delete(object);
if (otherTerms.size > 0) {
const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
if (
[...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
)
return;
}
}
let anchor = match[3];
if (anchor === "") anchor = fullname;
else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
const descr = objName + _(", in ") + title;
// add custom score for some objects according to scorer
if (Scorer.objPrio.hasOwnProperty(match[2]))
score += Scorer.objPrio[match[2]];
else score += Scorer.objPrioDefault;
results.push([
docNames[match[0]],
fullname,
"#" + anchor,
descr,
score,
filenames[match[0]],
]);
};
Object.keys(objects).forEach((prefix) =>
objects[prefix].forEach((array) =>
objectSearchCallback(prefix, array)
)
);
return results;
},
/**
* search for full-text terms in the index
*/
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
var docnames = this._index.docnames;
var filenames = this._index.filenames;
var titles = this._index.titles;
performTermsSearch: (searchTerms, excludedTerms) => {
// prepare search
const terms = Search._index.terms;
const titleTerms = Search._index.titleterms;
const docNames = Search._index.docnames;
const filenames = Search._index.filenames;
const titles = Search._index.titles;
var i, j, file;
var fileMap = {};
var scoreMap = {};
var results = [];
const scoreMap = new Map();
const fileMap = new Map();
// perform the search on the required terms
for (i = 0; i < searchterms.length; i++) {
var word = searchterms[i];
var files = [];
var _o = [
{files: terms[word], score: Scorer.term},
{files: titleterms[word], score: Scorer.title}
searchTerms.forEach((word) => {
const files = [];
const arr = [
{ files: terms[word], score: Scorer.term },
{ files: titleTerms[word], score: Scorer.title },
];
// add support for partial matches
if (word.length > 2) {
for (var w in terms) {
if (w.match(word) && !terms[word]) {
_o.push({files: terms[w], score: Scorer.partialTerm})
}
}
for (var w in titleterms) {
if (w.match(word) && !titleterms[word]) {
_o.push({files: titleterms[w], score: Scorer.partialTitle})
}
}
const escapedWord = _escapeRegExp(word);
Object.keys(terms).forEach((term) => {
if (term.match(escapedWord) && !terms[word])
arr.push({ files: terms[term], score: Scorer.partialTerm });
});
Object.keys(titleTerms).forEach((term) => {
if (term.match(escapedWord) && !titleTerms[word])
arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
});
}
// no match but word was a required one
if ($u.every(_o, function(o){return o.files === undefined;})) {
break;
}
if (arr.every((record) => record.files === undefined)) return;
// found search word in contents
$u.each(_o, function(o) {
var _files = o.files;
if (_files === undefined)
return
arr.forEach((record) => {
if (record.files === undefined) return;
if (_files.length === undefined)
_files = [_files];
files = files.concat(_files);
let recordFiles = record.files;
if (recordFiles.length === undefined) recordFiles = [recordFiles];
files.push(...recordFiles);
// set score for the word in each file to Scorer.term
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {};
scoreMap[file][word] = o.score;
}
// set score for the word in each file
recordFiles.forEach((file) => {
if (!scoreMap.has(file)) scoreMap.set(file, {});
scoreMap.get(file)[word] = record.score;
});
});
// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap && fileMap[file].indexOf(word) === -1)
fileMap[file].push(word);
else
fileMap[file] = [word];
}
}
files.forEach((file) => {
if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
fileMap.get(file).push(word);
else fileMap.set(file, [word]);
});
});
// now check if the files don't contain excluded terms
for (file in fileMap) {
var valid = true;
const results = [];
for (const [file, wordList] of fileMap) {
// check if all requirements are matched
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
searchterms.filter(function(term){return term.length > 2}).length
// as search terms with length < 3 are discarded
const filteredTermCount = [...searchTerms].filter(
(term) => term.length > 2
).length;
if (
fileMap[file].length != searchterms.length &&
fileMap[file].length != filteredTermCount
) continue;
wordList.length !== searchTerms.size &&
wordList.length !== filteredTermCount
)
continue;
// ensure that none of the excluded terms is in the search result
for (i = 0; i < excluded.length; i++) {
if (terms[excluded[i]] == file ||
titleterms[excluded[i]] == file ||
$u.contains(terms[excluded[i]] || [], file) ||
$u.contains(titleterms[excluded[i]] || [], file)) {
valid = false;
break;
}
}
if (
[...excludedTerms].some(
(term) =>
terms[term] === file ||
titleTerms[term] === file ||
(terms[term] || []).includes(file) ||
(titleTerms[term] || []).includes(file)
)
)
break;
// if we have still a valid result we can add it to the result list
if (valid) {
// select one (max) score for the file.
// for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
}
// select one (max) score for the file.
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
// add result to the result list
results.push([
docNames[file],
titles[file],
"",
null,
score,
filenames[file],
]);
}
return results;
},
@@ -484,31 +497,34 @@ var Search = {
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words, hlwords is the list of normal, unstemmed
* of stemmed words, highlightWords is the list of normal, unstemmed
* words. the first one is used to find the occurrence, the
* latter for highlighting it.
*/
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
var i = textLower.indexOf(this.toLowerCase());
if (i > -1)
start = i;
});
start = Math.max(start - 120, 0);
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});
return rv;
}
makeSearchSummary: (htmlText, keywords, highlightWords) => {
const text = Search.htmlToText(htmlText);
if (text === "") return null;
const textLower = text.toLowerCase();
const actualStartPosition = [...keywords]
.map((k) => textLower.indexOf(k.toLowerCase()))
.filter((i) => i > -1)
.slice(-1)[0];
const startWithContext = Math.max(actualStartPosition - 120, 0);
const top = startWithContext === 0 ? "" : "...";
const tail = startWithContext + 240 < text.length ? "..." : "";
let summary = document.createElement("p");
summary.classList.add("context");
summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
highlightWords.forEach((highlightWord) =>
_highlightText(summary, highlightWord, "highlighted")
);
return summary;
},
};
$(document).ready(function() {
Search.init();
});
_ready(Search.init);

File diff suppressed because one or more lines are too long

6337
bgfx.html

File diff suppressed because it is too large Load Diff

View File

@@ -1,72 +1,38 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Building &mdash; bgfx 1.115.8277 documentation</title>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Building &mdash; bgfx 1.116.8293 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Examples" href="examples.html" />
<link rel="prev" title="Overview" href="overview.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home" alt="Documentation Home"> bgfx
<a href="index.html" class="icon icon-home"> bgfx
</a>
<div class="version">
1.115.8277
1.116.8293
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@@ -74,18 +40,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Building</a><ul>
@@ -119,84 +74,46 @@
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">bgfx</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Building</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="building">
<h1>Building<a class="headerlink" href="#building" title="Permalink to this headline"></a></h1>
<div class="section" id="dependencies">
<h2>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline"></a></h2>
<section id="building">
<h1>Building<a class="headerlink" href="#building" title="Permalink to this heading"></a></h1>
<section id="dependencies">
<h2>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/bkaradzic/bx">https://github.com/bkaradzic/bx</a></p>
<p><a class="reference external" href="https://github.com/bkaradzic/bimg">https://github.com/bkaradzic/bimg</a></p>
</div>
<div class="section" id="getting-source">
<h2>Getting Source<a class="headerlink" href="#getting-source" title="Permalink to this headline"></a></h2>
</section>
<section id="getting-source">
<h2>Getting Source<a class="headerlink" href="#getting-source" title="Permalink to this heading"></a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">bkaradzic</span><span class="o">/</span><span class="n">bx</span><span class="o">.</span><span class="n">git</span>
<span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">bkaradzic</span><span class="o">/</span><span class="n">bimg</span><span class="o">.</span><span class="n">git</span>
<span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">bkaradzic</span><span class="o">/</span><span class="n">bgfx</span><span class="o">.</span><span class="n">git</span>
</pre></div>
</div>
</div>
<div class="section" id="quick-start">
<h2>Quick Start<a class="headerlink" href="#quick-start" title="Permalink to this headline"></a></h2>
</section>
<section id="quick-start">
<h2>Quick Start<a class="headerlink" href="#quick-start" title="Permalink to this heading"></a></h2>
<p>These are step for users who use Windows with Visual Studio.</p>
<p>Enter bgfx directory:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">bgfx</span>
@@ -214,11 +131,11 @@
<p class="admonition-title">Note</p>
<p>For more detailed prerequisites and build steps on other platforms see below.</p>
</div>
</div>
<div class="section" id="prerequisites">
<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline"></a></h2>
<div class="section" id="android">
<h3>Android<a class="headerlink" href="#android" title="Permalink to this headline"></a></h3>
</section>
<section id="prerequisites">
<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this heading"></a></h2>
<section id="android">
<h3>Android<a class="headerlink" href="#android" title="Permalink to this heading"></a></h3>
<p>Download AndroidNDK:</p>
<blockquote>
<div><ul class="simple">
@@ -238,15 +155,15 @@
<li><p><a class="reference external" href="https://github.com/Nodrev/bgfx-android-activity#bgfx-android-activity---android-glue-for-bgfx">https://github.com/Nodrev/bgfx-android-activity#bgfx-android-activity—android-glue-for-bgfx</a></p></li>
</ul>
</div></blockquote>
</div>
<div class="section" id="linux">
<h3>Linux<a class="headerlink" href="#linux" title="Permalink to this headline"></a></h3>
</section>
<section id="linux">
<h3>Linux<a class="headerlink" href="#linux" title="Permalink to this heading"></a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">libgl1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">x11proto</span><span class="o">-</span><span class="n">core</span><span class="o">-</span><span class="n">dev</span> <span class="n">libx11</span><span class="o">-</span><span class="n">dev</span>
</pre></div>
</div>
</div>
<div class="section" id="windows">
<h3>Windows<a class="headerlink" href="#windows" title="Permalink to this headline"></a></h3>
</section>
<section id="windows">
<h3>Windows<a class="headerlink" href="#windows" title="Permalink to this heading"></a></h3>
<p>Windows users download GnuWin32 utilities:</p>
<blockquote>
<div><ul class="simple">
@@ -256,15 +173,15 @@
<li><p><a class="reference external" href="http://gnuwin32.sourceforge.net/packages/libintl.htm">http://gnuwin32.sourceforge.net/packages/libintl.htm</a></p></li>
</ul>
</div></blockquote>
</div>
</div>
<div class="section" id="build">
<h2>Build<a class="headerlink" href="#build" title="Permalink to this headline"></a></h2>
</section>
</section>
<section id="build">
<h2>Build<a class="headerlink" href="#build" title="Permalink to this heading"></a></h2>
<p>bgfx uses <a class="reference external" href="https://github.com/bkaradzic/genie#genie---project-generator-tool">GENie - Project generator tool</a>
to generate project files for various platform. Binaries for Linux, OSX, and Windows are included in
bx repository.</p>
<div class="section" id="general">
<h3>General<a class="headerlink" href="#general" title="Permalink to this headline"></a></h3>
<section id="general">
<h3>General<a class="headerlink" href="#general" title="Permalink to this heading"></a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">bgfx</span>
<span class="n">make</span>
</pre></div>
@@ -279,9 +196,9 @@ directory structure. Deleting .build directory at any time is safe.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">linux</span><span class="o">-</span><span class="n">release64</span><span class="p">,</span> <span class="n">wasm</span><span class="o">-</span><span class="n">debug</span><span class="p">,</span> <span class="n">wasm</span><span class="o">-</span><span class="n">release</span><span class="p">,</span> <span class="n">osx</span><span class="o">-</span><span class="n">debug</span><span class="p">,</span> <span class="n">osx</span><span class="o">-</span><span class="n">release</span><span class="p">,</span> <span class="n">android</span><span class="o">-</span><span class="n">arm64</span><span class="o">-</span><span class="n">release</span><span class="p">,</span> <span class="n">etc</span><span class="o">.</span>
</pre></div>
</div>
</div>
<div class="section" id="id1">
<h3>Windows<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3>
</section>
<section id="id1">
<h3>Windows<a class="headerlink" href="#id1" title="Permalink to this heading"></a></h3>
<p>Visual Studio 2017 command line:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">vs2017</span><span class="o">-</span><span class="n">release64</span>
</pre></div>
@@ -290,9 +207,9 @@ directory structure. Deleting .build directory at any time is safe.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">start</span> <span class="o">.</span><span class="n">build</span><span class="o">/</span><span class="n">projects</span><span class="o">/</span><span class="n">vs2017</span><span class="o">/</span><span class="n">bgfx</span><span class="o">.</span><span class="n">sln</span>
</pre></div>
</div>
</div>
<div class="section" id="xcode">
<h3>Xcode<a class="headerlink" href="#xcode" title="Permalink to this headline"></a></h3>
</section>
<section id="xcode">
<h3>Xcode<a class="headerlink" href="#xcode" title="Permalink to this heading"></a></h3>
<p>Xcode command line:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">osx</span><span class="o">-</span><span class="n">release</span>
<span class="n">cd</span> <span class="n">examples</span><span class="o">/</span><span class="n">runtime</span>
@@ -313,15 +230,15 @@ configuration file, it has to be set manually for each example project:</p>
<li><p>Check <em>“Use custom working directory”</em> and enter following path:
<code class="docutils literal notranslate"><span class="pre">${PROJECT_DIR}/../../../examples/runtime</span></code>.</p></li>
</ol>
</div>
<div class="section" id="id2">
<h3>Linux<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h3>
</section>
<section id="id2">
<h3>Linux<a class="headerlink" href="#id2" title="Permalink to this heading"></a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">linux</span><span class="o">-</span><span class="n">release64</span>
</pre></div>
</div>
</div>
<div class="section" id="winrt-uwp">
<h3>WinRT / UWP<a class="headerlink" href="#winrt-uwp" title="Permalink to this headline"></a></h3>
</section>
<section id="winrt-uwp">
<h3>WinRT / UWP<a class="headerlink" href="#winrt-uwp" title="Permalink to this heading"></a></h3>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">..</span>\<span class="n">bx</span>\<span class="n">tools</span>\<span class="nb">bin</span>\<span class="n">windows</span>\<span class="n">genie</span> <span class="o">--</span><span class="n">vs</span><span class="o">=</span><span class="n">winstore100</span> <span class="n">vs2017</span>
</pre></div>
</div>
@@ -330,26 +247,26 @@ configuration file, it has to be set manually for each example project:</p>
<p class="admonition-title">Note</p>
<p>Shaders will need to be compiled with the appropriate target profile for your platform.</p>
</div>
</div>
</div>
<div class="section" id="amalgamated-build">
<h2>Amalgamated Build<a class="headerlink" href="#amalgamated-build" title="Permalink to this headline"></a></h2>
</section>
</section>
<section id="amalgamated-build">
<h2>Amalgamated Build<a class="headerlink" href="#amalgamated-build" title="Permalink to this heading"></a></h2>
<p>For ease of integration to other build system bgfx library can be built
with single .cpp file. Its only necessary to build
<a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/src/amalgamated.cpp">src/amalgamated.cpp</a>
(for OSX/iOS use
<a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/src/amalgamated.mm">src/amalgamated.mm</a>
instead) inside different build system.</p>
</div>
<div class="section" id="tools">
<h2>Tools<a class="headerlink" href="#tools" title="Permalink to this headline"></a></h2>
</section>
<section id="tools">
<h2>Tools<a class="headerlink" href="#tools" title="Permalink to this heading"></a></h2>
<p>To build bgfx project files for tools, use <code class="docutils literal notranslate"><span class="pre">--with-tools</span></code> option:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">..</span>\<span class="n">bx</span>\<span class="n">tools</span>\<span class="nb">bin</span>\<span class="n">windows</span>\<span class="n">genie</span> <span class="o">--</span><span class="k">with</span><span class="o">-</span><span class="n">tools</span> <span class="n">vs2017</span>
</pre></div>
</div>
</div>
<div class="section" id="alternative-build-systems">
<h2>Alternative build systems<a class="headerlink" href="#alternative-build-systems" title="Permalink to this headline"></a></h2>
</section>
<section id="alternative-build-systems">
<h2>Alternative build systems<a class="headerlink" href="#alternative-build-systems" title="Permalink to this heading"></a></h2>
<p><strong>CMake</strong></p>
<blockquote>
<div><ul class="simple">
@@ -364,62 +281,42 @@ instead) inside different build system.</p>
<a class="reference external" href="https://github.com/floooh/fips#fips">https://github.com/floooh/fips#fips</a></p>
<p><strong>Conan</strong> package
<a class="reference external" href="https://github.com/firefalcom/bgfx-conan">https://github.com/firefalcom/bgfx-conan</a></p>
</div>
<div class="section" id="minimal-example-without-bgfx-s-example-harness">
<h2>Minimal example without bgfxs example harness<a class="headerlink" href="#minimal-example-without-bgfx-s-example-harness" title="Permalink to this headline"></a></h2>
</section>
<section id="minimal-example-without-bgfx-s-example-harness">
<h2>Minimal example without bgfxs example harness<a class="headerlink" href="#minimal-example-without-bgfx-s-example-harness" title="Permalink to this heading"></a></h2>
<p>This project demonstrates minimal amount of code needed to integrate bgfx with GLFW, but without
any of existing bgfx example harness. It also demonstrates how to build bgfx with alternative build
system.</p>
<p><a class="reference external" href="https://github.com/jpcy/bgfx-minimal-example">https://github.com/jpcy/bgfx-minimal-example</a></p>
</div>
</div>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="examples.html" class="btn btn-neutral float-right" title="Examples" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="overview.html" class="btn btn-neutral float-left" title="Overview" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="overview.html" class="btn btn-neutral float-left" title="Overview" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="examples.html" class="btn btn-neutral float-right" title="Examples" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2010-2022, Branimir Karadžić
<p>&#169; Copyright 2010-2022, Branimir Karadžić.</p>
</div>
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@@ -1,72 +1,38 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Examples &mdash; bgfx 1.115.8277 documentation</title>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Examples &mdash; bgfx 1.116.8293 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="API Reference" href="bgfx.html" />
<link rel="prev" title="Building" href="build.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home" alt="Documentation Home"> bgfx
<a href="index.html" class="icon icon-home"> bgfx
</a>
<div class="version">
1.115.8277
1.116.8293
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@@ -74,18 +40,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="build.html">Building</a></li>
@@ -143,6 +98,7 @@
<li class="toctree-l2"><a class="reference internal" href="#fsr">46-fsr</a></li>
<li class="toctree-l2"><a class="reference internal" href="#pixelformats">47-pixelformats</a></li>
<li class="toctree-l2"><a class="reference internal" href="#drawindirect">48-drawindirect</a></li>
<li class="toctree-l2"><a class="reference internal" href="#hextile">49-hextile</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a></li>
@@ -151,90 +107,52 @@
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">bgfx</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Examples</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="examples">
<h1>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h1>
<section id="examples">
<h1>Examples<a class="headerlink" href="#examples" title="Permalink to this heading"></a></h1>
<p>Most of the examples require shader/texture/mesh data to be loaded. When
running examples your current directory should be examples/runtime.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>&lt;bgfx_path&gt;/examples/runtime $ ../../.build/&lt;config&gt;/bin/example-00-helloworldDebug
</pre></div>
</div>
<div class="section" id="helloworld">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/00-helloworld">00-helloworld</a><a class="headerlink" href="#helloworld" title="Permalink to this headline"></a></h2>
<section id="helloworld">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/00-helloworld">00-helloworld</a><a class="headerlink" href="#helloworld" title="Permalink to this heading"></a></h2>
<p>Initialization and debug text.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-00-helloworld" src="https://github.com/bkaradzic/bgfx/raw/master/examples/00-helloworld/screenshot.png" />
</div>
</div>
<div class="section" id="cubes">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/01-cubes/cubes.cpp">01-cubes</a><a class="headerlink" href="#cubes" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="cubes">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/01-cubes/cubes.cpp">01-cubes</a><a class="headerlink" href="#cubes" title="Permalink to this heading"></a></h2>
<p>Rendering simple static mesh.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-01-cubes" src="https://github.com/bkaradzic/bgfx/raw/master/examples/01-cubes/screenshot.png" />
</div>
</div>
<div class="section" id="metaballs">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/02-metaballs">02-metaballs</a><a class="headerlink" href="#metaballs" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="metaballs">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/02-metaballs">02-metaballs</a><a class="headerlink" href="#metaballs" title="Permalink to this heading"></a></h2>
<p>Rendering with transient buffers and embedding shaders.</p>
<div class="emscripten">
<progress value="0" max="100" id="progress" hidden=1></progress>
@@ -325,102 +243,102 @@ running examples your current directory should be examples/runtime.</p>
};
};
</script>
<script async type="text/javascript" src="example-02-metaballsRelease.bc.js"></script></div>
<div class="section" id="raymarch">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/03-raymarch">03-raymarch</a><a class="headerlink" href="#raymarch" title="Permalink to this headline"></a></h2>
<script async type="text/javascript" src="example-02-metaballsRelease.bc.js"></script></section>
<section id="raymarch">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/03-raymarch">03-raymarch</a><a class="headerlink" href="#raymarch" title="Permalink to this heading"></a></h2>
<p>Updating shader uniforms.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-03-raymarch" src="https://github.com/bkaradzic/bgfx/raw/master/examples/03-raymarch/screenshot.png" />
</div>
</div>
<div class="section" id="mesh">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/04-mesh">04-mesh</a><a class="headerlink" href="#mesh" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="mesh">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/04-mesh">04-mesh</a><a class="headerlink" href="#mesh" title="Permalink to this heading"></a></h2>
<p>Loading meshes.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-04-mesh" src="https://github.com/bkaradzic/bgfx/raw/master/examples/04-mesh/screenshot.png" />
</div>
</div>
<div class="section" id="instancing">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/05-instancing">05-instancing</a><a class="headerlink" href="#instancing" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="instancing">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/05-instancing">05-instancing</a><a class="headerlink" href="#instancing" title="Permalink to this heading"></a></h2>
<p>Geometry instancing.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-05-instancing" src="https://github.com/bkaradzic/bgfx/raw/master/examples/05-instancing/screenshot.png" />
</div>
</div>
<div class="section" id="bump">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/06-bump">06-bump</a><a class="headerlink" href="#bump" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="bump">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/06-bump">06-bump</a><a class="headerlink" href="#bump" title="Permalink to this heading"></a></h2>
<p>Loading textures.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-06-bump" src="https://github.com/bkaradzic/bgfx/raw/master/examples/06-bump/screenshot.png" />
</div>
</div>
<div class="section" id="callback">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/07-callback">07-callback</a><a class="headerlink" href="#callback" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="callback">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/07-callback">07-callback</a><a class="headerlink" href="#callback" title="Permalink to this heading"></a></h2>
<p>Implementing application specific callbacks for taking screen shots,
caching OpenGL binary shaders, and video capture.</p>
</div>
<div class="section" id="update">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/08-update">08-update</a><a class="headerlink" href="#update" title="Permalink to this headline"></a></h2>
</section>
<section id="update">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/08-update">08-update</a><a class="headerlink" href="#update" title="Permalink to this heading"></a></h2>
<p>Updating textures.</p>
</div>
<div class="section" id="hdr">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/09-hdr">09-hdr</a><a class="headerlink" href="#hdr" title="Permalink to this headline"></a></h2>
</section>
<section id="hdr">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/09-hdr">09-hdr</a><a class="headerlink" href="#hdr" title="Permalink to this heading"></a></h2>
<p>Using multiple views with frame buffers, and view order remapping.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-09-hdr" src="https://github.com/bkaradzic/bgfx/raw/master/examples/09-hdr/screenshot.png" />
</div>
</div>
<div class="section" id="font">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/10-font">10-font</a><a class="headerlink" href="#font" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="font">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/10-font">10-font</a><a class="headerlink" href="#font" title="Permalink to this heading"></a></h2>
<p>Use the font system to display text and styled text.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-10-font" src="https://github.com/bkaradzic/bgfx/raw/master/examples/10-font/screenshot.png" />
</div>
</div>
<div class="section" id="fontsdf">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/11-fontsdf">11-fontsdf</a><a class="headerlink" href="#fontsdf" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="fontsdf">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/11-fontsdf">11-fontsdf</a><a class="headerlink" href="#fontsdf" title="Permalink to this heading"></a></h2>
<p>Use a single distance field font to render text of various size.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-11-fontsdf" src="https://github.com/bkaradzic/bgfx/raw/master/examples/11-fontsdf/screenshot.png" />
</div>
</div>
<div class="section" id="lod">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/12-lod">12-lod</a><a class="headerlink" href="#lod" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="lod">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/12-lod">12-lod</a><a class="headerlink" href="#lod" title="Permalink to this heading"></a></h2>
<p>Mesh LOD transitions.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-12-lod" src="https://github.com/bkaradzic/bgfx/raw/master/examples/12-lod/screenshot.png" />
</div>
</div>
<div class="section" id="stencil">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/13-stencil">13-stencil</a><a class="headerlink" href="#stencil" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="stencil">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/13-stencil">13-stencil</a><a class="headerlink" href="#stencil" title="Permalink to this heading"></a></h2>
<p>Stencil reflections and shadows.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-13-stencil" src="https://github.com/bkaradzic/bgfx/raw/master/examples/13-stencil/screenshot.png" />
</div>
</div>
<div class="section" id="shadowvolumes">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/14-shadowvolumes">14-shadowvolumes</a><a class="headerlink" href="#shadowvolumes" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="shadowvolumes">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/14-shadowvolumes">14-shadowvolumes</a><a class="headerlink" href="#shadowvolumes" title="Permalink to this heading"></a></h2>
<p>Shadow volumes.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-14-shadowvolumes" src="https://github.com/bkaradzic/bgfx/raw/master/examples/14-shadowvolumes/screenshot.png" />
</div>
</div>
<div class="section" id="shadowmaps-simple">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/15-shadowmaps-simple">15-shadowmaps-simple</a><a class="headerlink" href="#shadowmaps-simple" title="Permalink to this headline"></a></h2>
<div class="figure align-default">
</figure>
</section>
<section id="shadowmaps-simple">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/15-shadowmaps-simple">15-shadowmaps-simple</a><a class="headerlink" href="#shadowmaps-simple" title="Permalink to this heading"></a></h2>
<figure class="align-default">
<img alt="example-15-shadowmaps-simple" src="https://github.com/bkaradzic/bgfx/raw/master/examples/15-shadowmaps-simple/screenshot.png" />
</div>
</div>
<div class="section" id="shadowmaps">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/16-shadowmaps">16-shadowmaps</a><a class="headerlink" href="#shadowmaps" title="Permalink to this headline"></a></h2>
<div class="figure align-default">
</figure>
</section>
<section id="shadowmaps">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/16-shadowmaps">16-shadowmaps</a><a class="headerlink" href="#shadowmaps" title="Permalink to this heading"></a></h2>
<figure class="align-default">
<img alt="example-16-shadowmaps" src="https://github.com/bkaradzic/bgfx/raw/master/examples/16-shadowmaps/screenshot.png" />
</div>
</div>
<div class="section" id="drawstress">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/17-drawstress">17-drawstress</a><a class="headerlink" href="#drawstress" title="Permalink to this headline"></a></h2>
<div class="section" id="hz">
<h3>60Hz<a class="headerlink" href="#hz" title="Permalink to this headline"></a></h3>
</figure>
</section>
<section id="drawstress">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/examples/17-drawstress">17-drawstress</a><a class="headerlink" href="#drawstress" title="Permalink to this heading"></a></h2>
<section id="hz">
<h3>60Hz<a class="headerlink" href="#hz" title="Permalink to this heading"></a></h3>
<p>Draw stress is CPU stress test to show what is the maximum number of
draw calls while maintaining 60Hz frame rate. bgfx currently has default
limit of 64K draw calls per frame. You can increase this limit by
@@ -886,9 +804,9 @@ changing <code class="docutils literal notranslate"><span class="pre">BGFX_CONFI
(on Windows), and <code class="docutils literal notranslate"><span class="pre">layout.frame_rate</span> <span class="pre">500</span></code>.</p></li>
<li><p>Chrome 33 command line option: <code class="docutils literal notranslate"><span class="pre">--disable-gpu-vsync</span></code>.</p></li>
</ul>
</div>
<div class="section" id="hz-test-for-browsers">
<h3>30Hz (test for browsers)<a class="headerlink" href="#hz-test-for-browsers" title="Permalink to this headline"></a></h3>
</section>
<section id="hz-test-for-browsers">
<h3>30Hz (test for browsers)<a class="headerlink" href="#hz-test-for-browsers" title="Permalink to this heading"></a></h3>
<p>By default browsers are using vsync, and dont have option to turn it
off programmatically.</p>
<table class="docutils align-default">
@@ -1017,109 +935,109 @@ off programmatically.</p>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ibl">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/18-ibl">18-ibl</a><a class="headerlink" href="#ibl" title="Permalink to this headline"></a></h2>
</section>
</section>
<section id="ibl">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/18-ibl">18-ibl</a><a class="headerlink" href="#ibl" title="Permalink to this heading"></a></h2>
<p>Image-based lighting.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-18-ibl" src="https://github.com/bkaradzic/bgfx/raw/master/examples/18-ibl/screenshot.png" />
</div>
</div>
<div class="section" id="oit">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/19-oit">19-oit</a><a class="headerlink" href="#oit" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="oit">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/19-oit">19-oit</a><a class="headerlink" href="#oit" title="Permalink to this heading"></a></h2>
<p>Weighted, Blended Order-Independent Transparency</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-19-oit" src="https://github.com/bkaradzic/bgfx/raw/master/examples/19-oit/screenshot.png" />
</div>
</div>
<div class="section" id="nanovg">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/20-nanovg">20-nanovg</a><a class="headerlink" href="#nanovg" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="nanovg">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/20-nanovg">20-nanovg</a><a class="headerlink" href="#nanovg" title="Permalink to this heading"></a></h2>
<p>NanoVG is small antialiased vector graphics rendering library.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-20-nanovg" src="https://github.com/bkaradzic/bgfx/raw/master/examples/20-nanovg/screenshot.png" />
</div>
</div>
<div class="section" id="deferred">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/21-deferred">21-deferred</a><a class="headerlink" href="#deferred" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="deferred">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/21-deferred">21-deferred</a><a class="headerlink" href="#deferred" title="Permalink to this heading"></a></h2>
<p>MRT rendering and deferred shading.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-21-deferred" src="https://github.com/bkaradzic/bgfx/raw/master/examples/21-deferred/screenshot.png" />
</div>
</div>
<div class="section" id="windows">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/22-windows">22-windows</a><a class="headerlink" href="#windows" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="windows">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/22-windows">22-windows</a><a class="headerlink" href="#windows" title="Permalink to this heading"></a></h2>
<p>Rendering into multiple windows.</p>
</div>
<div class="section" id="vectordisplay">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/23-vectordisplay">23-vectordisplay</a><a class="headerlink" href="#vectordisplay" title="Permalink to this headline"></a></h2>
</section>
<section id="vectordisplay">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/23-vectordisplay">23-vectordisplay</a><a class="headerlink" href="#vectordisplay" title="Permalink to this heading"></a></h2>
<p>Rendering lines as oldschool vectors.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-23-vectordisplay" src="https://github.com/bkaradzic/bgfx/raw/master/examples/23-vectordisplay/screenshot.png" />
</div>
</div>
<div class="section" id="nbody">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/24-nbody">24-nbody</a><a class="headerlink" href="#nbody" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="nbody">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/24-nbody">24-nbody</a><a class="headerlink" href="#nbody" title="Permalink to this heading"></a></h2>
<p>N-body simulation with compute shaders using buffers.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-24-nbody" src="https://github.com/bkaradzic/bgfx/raw/master/examples/24-nbody/screenshot.png" />
</div>
</div>
<div class="section" id="c99">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/25-c99">25-c99</a><a class="headerlink" href="#c99" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="c99">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/25-c99">25-c99</a><a class="headerlink" href="#c99" title="Permalink to this heading"></a></h2>
<p>Initialization and debug text with C99 API.</p>
</div>
<div class="section" id="occlusion">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/26-occlusion">26-occlusion</a><a class="headerlink" href="#occlusion" title="Permalink to this headline"></a></h2>
</section>
<section id="occlusion">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/26-occlusion">26-occlusion</a><a class="headerlink" href="#occlusion" title="Permalink to this heading"></a></h2>
<p>Using occlusion query for conditional rendering.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-26-occlusion" src="https://github.com/bkaradzic/bgfx/raw/master/examples/26-occlusion/screenshot.png" />
</div>
</div>
<div class="section" id="terrain">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/27-terrain">27-terrain</a><a class="headerlink" href="#terrain" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="terrain">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/27-terrain">27-terrain</a><a class="headerlink" href="#terrain" title="Permalink to this heading"></a></h2>
<p>Terrain painting example.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-27-terrain" src="https://github.com/bkaradzic/bgfx/raw/master/examples/27-terrain/screenshot.png" />
</div>
</div>
<div class="section" id="wireframe">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/28-wireframe">28-wireframe</a><a class="headerlink" href="#wireframe" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="wireframe">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/28-wireframe">28-wireframe</a><a class="headerlink" href="#wireframe" title="Permalink to this heading"></a></h2>
<p>Drawing wireframe mesh.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-28-wireframe" src="https://github.com/bkaradzic/bgfx/raw/master/examples/28-wireframe/screenshot.png" />
</div>
</div>
<div class="section" id="debugdraw">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/29-debugdraw">29-debugdraw</a><a class="headerlink" href="#debugdraw" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="debugdraw">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/29-debugdraw">29-debugdraw</a><a class="headerlink" href="#debugdraw" title="Permalink to this heading"></a></h2>
<p>Debug draw.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-29-debugdraw" src="https://github.com/bkaradzic/bgfx/raw/master/examples/29-debugdraw/screenshot.png" />
</div>
</div>
<div class="section" id="picking">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/30-picking">30-picking</a><a class="headerlink" href="#picking" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="picking">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/30-picking">30-picking</a><a class="headerlink" href="#picking" title="Permalink to this heading"></a></h2>
<p>Mouse picking via GPU readback.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-30-picking" src="https://github.com/bkaradzic/bgfx/raw/master/examples/30-picking/screenshot.png" />
</div>
</div>
<div class="section" id="rsm">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/31-rsm">31-rsm</a><a class="headerlink" href="#rsm" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="rsm">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/31-rsm">31-rsm</a><a class="headerlink" href="#rsm" title="Permalink to this heading"></a></h2>
<p>Global Illumination with Reflective Shadow Map.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-31-rsm" src="https://github.com/bkaradzic/bgfx/raw/master/examples/31-rsm/screenshot.png" />
</div>
</div>
<div class="section" id="particles">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/32-particles">32-particles</a><a class="headerlink" href="#particles" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="particles">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/32-particles">32-particles</a><a class="headerlink" href="#particles" title="Permalink to this heading"></a></h2>
<p>Particles.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-32-particles" src="https://github.com/bkaradzic/bgfx/raw/master/examples/32-particles/screenshot.png" />
</div>
</div>
<div class="section" id="pom">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/33-pom">33-pom</a><a class="headerlink" href="#pom" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="pom">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/33-pom">33-pom</a><a class="headerlink" href="#pom" title="Permalink to this heading"></a></h2>
<p>Parallax occlusion mapping.</p>
<dl class="simple">
<dt>Reference(s):</dt><dd><ul class="simple">
@@ -1127,33 +1045,33 @@ off programmatically.</p>
</ul>
</dd>
</dl>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-33-pom" src="https://github.com/bkaradzic/bgfx/raw/master/examples/33-pom/screenshot.png" />
</div>
</div>
<div class="section" id="mvs">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/34-mvs">34-mvs</a><a class="headerlink" href="#mvs" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="mvs">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/34-mvs">34-mvs</a><a class="headerlink" href="#mvs" title="Permalink to this heading"></a></h2>
<p>Multiple vertex streams.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-34-mvs" src="https://github.com/bkaradzic/bgfx/raw/master/examples/34-mvs/screenshot.png" />
</div>
</div>
<div class="section" id="dynamic">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/35-dynamic">35-dynamic</a><a class="headerlink" href="#dynamic" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="dynamic">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/35-dynamic">35-dynamic</a><a class="headerlink" href="#dynamic" title="Permalink to this heading"></a></h2>
<p>Dynamic buffers update.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-35-dynamic" src="https://github.com/bkaradzic/bgfx/raw/master/examples/35-dynamic/screenshot.png" />
</div>
</div>
<div class="section" id="sky">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/36-sky">36-sky</a><a class="headerlink" href="#sky" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="sky">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/36-sky">36-sky</a><a class="headerlink" href="#sky" title="Permalink to this heading"></a></h2>
<p>Perez dynamic sky model.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-36-sky" src="https://github.com/bkaradzic/bgfx/raw/master/examples/36-sky/screenshot.png" />
</div>
</div>
<div class="section" id="gpudrivenrendering">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/37-gpudrivenrendering">37-gpudrivenrendering</a><a class="headerlink" href="#gpudrivenrendering" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="gpudrivenrendering">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/37-gpudrivenrendering">37-gpudrivenrendering</a><a class="headerlink" href="#gpudrivenrendering" title="Permalink to this heading"></a></h2>
<p>GPU-Driven Rendering.</p>
<dl class="simple">
<dt>Reference(s):</dt><dd><ul class="simple">
@@ -1163,12 +1081,12 @@ off programmatically.</p>
</ul>
</dd>
</dl>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-37-gpudrivenrendering" src="https://github.com/bkaradzic/bgfx/raw/master/examples/37-gpudrivenrendering/screenshot.png" />
</div>
</div>
<div class="section" id="bloom">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/38-bloom">38-bloom</a><a class="headerlink" href="#bloom" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="bloom">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/38-bloom">38-bloom</a><a class="headerlink" href="#bloom" title="Permalink to this heading"></a></h2>
<p>Bloom.</p>
<dl class="simple">
<dt>Reference(s):</dt><dd><ul class="simple">
@@ -1176,12 +1094,12 @@ off programmatically.</p>
</ul>
</dd>
</dl>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-38-bloom" src="https://github.com/bkaradzic/bgfx/raw/master/examples/38-bloom/screenshot.png" />
</div>
</div>
<div class="section" id="assao">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/39-assao">39-assao</a><a class="headerlink" href="#assao" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="assao">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/39-assao">39-assao</a><a class="headerlink" href="#assao" title="Permalink to this heading"></a></h2>
<p>Adaptive Screen Space Ambient Occlusion.</p>
<dl class="simple">
<dt>Reference(s):</dt><dd><ul class="simple">
@@ -1189,19 +1107,19 @@ off programmatically.</p>
</ul>
</dd>
</dl>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-39-assao" src="https://github.com/bkaradzic/bgfx/raw/master/examples/39-assao/screenshot.png" />
</div>
</div>
<div class="section" id="svt">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/40-svt">40-svt</a><a class="headerlink" href="#svt" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="svt">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/40-svt">40-svt</a><a class="headerlink" href="#svt" title="Permalink to this heading"></a></h2>
<p>Sparse Virtual Textures.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-40-svt" src="https://github.com/bkaradzic/bgfx/raw/master/examples/40-svt/screenshot.png" />
</div>
</div>
<div class="section" id="tess">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/41-tess">41-tess</a><a class="headerlink" href="#tess" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="tess">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/41-tess">41-tess</a><a class="headerlink" href="#tess" title="Permalink to this heading"></a></h2>
<p>Adaptive GPU Tessellation with Compute Shaders</p>
<dl class="simple">
<dt>Reference(s):</dt><dd><ul class="simple">
@@ -1209,12 +1127,12 @@ off programmatically.</p>
</ul>
</dd>
</dl>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-41-tess" src="https://github.com/bkaradzic/bgfx/raw/master/examples/41-tess/screenshot.png" />
</div>
</div>
<div class="section" id="bunnylod">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/42-bunnylod">42-bunnylod</a><a class="headerlink" href="#bunnylod" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="bunnylod">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/42-bunnylod">42-bunnylod</a><a class="headerlink" href="#bunnylod" title="Permalink to this heading"></a></h2>
<p>Simple Polygon Reduction</p>
<dl class="simple">
<dt>Reference(s):</dt><dd><ul class="simple">
@@ -1223,12 +1141,12 @@ off programmatically.</p>
</ul>
</dd>
</dl>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-42-bunnylod" src="https://github.com/bkaradzic/bgfx/raw/master/examples/42-bunnylod/screenshot.png" />
</div>
</div>
<div class="section" id="denoise">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/43-denoise">43-denoise</a><a class="headerlink" href="#denoise" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="denoise">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/43-denoise">43-denoise</a><a class="headerlink" href="#denoise" title="Permalink to this heading"></a></h2>
<p>Denoise</p>
<dl class="simple">
<dt>Reference(s):</dt><dd><ul class="simple">
@@ -1238,19 +1156,19 @@ off programmatically.</p>
</ul>
</dd>
</dl>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-43-denoise" src="https://github.com/bkaradzic/bgfx/raw/master/examples/43-denoise/screenshot.png" />
</div>
</div>
<div class="section" id="sss">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/44-sss">44-sss</a><a class="headerlink" href="#sss" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="sss">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/44-sss">44-sss</a><a class="headerlink" href="#sss" title="Permalink to this heading"></a></h2>
<p>Screen-Space Shadows</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-44-sss" src="https://github.com/bkaradzic/bgfx/raw/master/examples/44-sss/screenshot.png" />
</div>
</div>
<div class="section" id="bokeh">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/45-bokeh">45-bokeh</a><a class="headerlink" href="#bokeh" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="bokeh">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/45-bokeh">45-bokeh</a><a class="headerlink" href="#bokeh" title="Permalink to this heading"></a></h2>
<p>Bokeh Depth of Field</p>
<dl class="simple">
<dt>Reference(s):</dt><dd><ul class="simple">
@@ -1258,28 +1176,28 @@ off programmatically.</p>
</ul>
</dd>
</dl>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-45-bokeh" src="https://github.com/bkaradzic/bgfx/raw/master/examples/45-bokeh/screenshot.png" />
</div>
</div>
<div class="section" id="fsr">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/46-fsr">46-fsr</a><a class="headerlink" href="#fsr" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="fsr">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/46-fsr">46-fsr</a><a class="headerlink" href="#fsr" title="Permalink to this heading"></a></h2>
<p>AMD FidelityFX Super Resolution - high-quality solution for producing high resolution frames
from lower resolution inputs.</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-46-fsr" src="https://github.com/bkaradzic/bgfx/raw/master/examples/46-fsr/screenshot.png" />
</div>
</div>
<div class="section" id="pixelformats">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/47-pixelformats">47-pixelformats</a><a class="headerlink" href="#pixelformats" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="pixelformats">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/47-pixelformats">47-pixelformats</a><a class="headerlink" href="#pixelformats" title="Permalink to this heading"></a></h2>
<p>Pixel Formats</p>
<p>View and test texture formats</p>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-47-pixelformats" src="https://github.com/bkaradzic/bgfx/raw/master/examples/47-pixelformats/screenshot.png" />
</div>
</div>
<div class="section" id="drawindirect">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/48-drawindirect">48-drawindirect</a><a class="headerlink" href="#drawindirect" title="Permalink to this headline"></a></h2>
</figure>
</section>
<section id="drawindirect">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/48-drawindirect">48-drawindirect</a><a class="headerlink" href="#drawindirect" title="Permalink to this heading"></a></h2>
<p>Draw Indirect</p>
<p>Simple example of indirect rendering + an implementation of multidraw indirect</p>
<dl class="simple">
@@ -1289,58 +1207,53 @@ from lower resolution inputs.</p>
</ul>
</dd>
</dl>
<div class="figure align-default">
<figure class="align-default">
<img alt="example-48-drawindirect" src="https://github.com/bkaradzic/bgfx/raw/master/examples/48-drawindirect/screenshot.png" />
</div>
</div>
</div>
</figure>
</section>
<section id="hextile">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples/49-hextile">49-hextile</a><a class="headerlink" href="#hextile" title="Permalink to this heading"></a></h2>
<p>Realtime Hex-Tiling</p>
<p>Simple example of how to use Hex-tiling in real time, ported from <a class="reference external" href="https://github.com/mmikk/hextile-demo">https://github.com/mmikk/hextile-demo</a></p>
<dl class="simple">
<dt>Reference(s):</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/mmikk/hextile-demo">Hex-Tiling demo</a>.</p></li>
<li><p><a class="reference external" href="https://github.com/mmikk/mmikk.github.io/blob/master/papers3d/mm_hex_compressed.pdf">Paper explaining concepts -</a>.</p></li>
</ul>
</dd>
</dl>
<figure class="align-default">
<img alt="example-49-hextile" src="https://github.com/bkaradzic/bgfx/raw/master/examples/49-hextile/screenshot.png" />
</figure>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="bgfx.html" class="btn btn-neutral float-right" title="API Reference" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="build.html" class="btn btn-neutral float-left" title="Building" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="build.html" class="btn btn-neutral float-left" title="Building" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="bgfx.html" class="btn btn-neutral float-right" title="API Reference" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2010-2022, Branimir Karadžić
<p>&#169; Copyright 2010-2022, Branimir Karadžić.</p>
</div>
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@@ -1,70 +1,35 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; bgfx 1.115.8277 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; bgfx 1.116.8293 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home" alt="Documentation Home"> bgfx
<a href="index.html" class="icon icon-home"> bgfx
</a>
<div class="version">
1.115.8277
1.116.8293
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@@ -72,18 +37,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="build.html">Building</a></li>
@@ -94,67 +48,29 @@
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">bgfx</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Index</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1 id="index">Index</h1>
@@ -457,7 +373,7 @@
</li>
<li><a href="bgfx.html#_CPPv4N4bgfx7Encoder14setVertexCountE8uint32_t">bgfx::Encoder::setVertexCount (C++ function)</a>
</li>
<li><a href="bgfx.html#_CPPv4N4bgfx7Encoder6submitE6ViewId13ProgramHandle20IndirectBufferHandle8uint16_t8uint16_t8uint32_t7uint8_t">bgfx::Encoder::submit (C++ function)</a>, <a href="bgfx.html#_CPPv4N4bgfx7Encoder6submitE6ViewId13ProgramHandle20OcclusionQueryHandle8uint32_t7uint8_t">[1]</a>, <a href="bgfx.html#_CPPv4N4bgfx7Encoder6submitE6ViewId13ProgramHandle8uint32_t7uint8_t">[2]</a>
<li><a href="bgfx.html#_CPPv4N4bgfx7Encoder6submitE6ViewId13ProgramHandle20IndirectBufferHandle8uint16_t17IndexBufferHandle8uint32_t8uint16_t8uint32_t7uint8_t">bgfx::Encoder::submit (C++ function)</a>, <a href="bgfx.html#_CPPv4N4bgfx7Encoder6submitE6ViewId13ProgramHandle20IndirectBufferHandle8uint16_t8uint16_t8uint32_t7uint8_t">[1]</a>, <a href="bgfx.html#_CPPv4N4bgfx7Encoder6submitE6ViewId13ProgramHandle20OcclusionQueryHandle8uint32_t7uint8_t">[2]</a>, <a href="bgfx.html#_CPPv4N4bgfx7Encoder6submitE6ViewId13ProgramHandle8uint32_t7uint8_t">[3]</a>
</li>
<li><a href="bgfx.html#_CPPv4N4bgfx7Encoder5touchE6ViewId">bgfx::Encoder::touch (C++ function)</a>
</li>
@@ -759,10 +675,10 @@
</li>
<li><a href="bgfx.html#_CPPv4N4bgfx5Stats16numVertexLayoutsE">bgfx::Stats::numVertexLayouts (C++ member)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="bgfx.html#_CPPv4N4bgfx5Stats8numViewsE">bgfx::Stats::numViews (C++ member)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="bgfx.html#_CPPv4N4bgfx5Stats12rtMemoryUsedE">bgfx::Stats::rtMemoryUsed (C++ member)</a>
</li>
<li><a href="bgfx.html#_CPPv4N4bgfx5Stats10textHeightE">bgfx::Stats::textHeight (C++ member)</a>
@@ -1170,6 +1086,8 @@
<li><a href="bgfx.html#c.BGFX_CAPS_CONSERVATIVE_RASTER">BGFX_CAPS_CONSERVATIVE_RASTER (C macro)</a>
</li>
<li><a href="bgfx.html#c.BGFX_CAPS_DRAW_INDIRECT">BGFX_CAPS_DRAW_INDIRECT (C macro)</a>
</li>
<li><a href="bgfx.html#c.BGFX_CAPS_DRAW_INDIRECT_COUNT">BGFX_CAPS_DRAW_INDIRECT_COUNT (C macro)</a>
</li>
<li><a href="bgfx.html#c.BGFX_CAPS_FRAGMENT_DEPTH">BGFX_CAPS_FRAGMENT_DEPTH (C macro)</a>
</li>
@@ -1363,41 +1281,27 @@
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2010-2022, Branimir Karadžić
<p>&#169; Copyright 2010-2022, Branimir Karadžić.</p>
</div>
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@@ -1,71 +1,37 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Documentation &mdash; bgfx 1.115.8277 documentation</title>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Documentation &mdash; bgfx 1.116.8293 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Overview" href="overview.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="#" class="icon icon-home" alt="Documentation Home"> bgfx
<a href="#" class="icon icon-home"> bgfx
</a>
<div class="version">
1.115.8277
1.116.8293
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@@ -73,18 +39,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="build.html">Building</a></li>
@@ -95,69 +50,31 @@
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="#">bgfx</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="#" class="icon icon-home"></a> &raquo;</li>
<li>Documentation</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="documentation">
<h1>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline"></a></h1>
<section id="documentation">
<h1>Documentation<a class="headerlink" href="#documentation" title="Permalink to this heading"></a></h1>
<p>Cross-platform, graphics API agnostic, “Bring Your Own Engine/Framework” style rendering library,
licensed under permissive BSD-2 clause open source license.</p>
<dl class="simple">
@@ -166,8 +83,8 @@ licensed under permissive BSD-2 clause open source license.</p>
</ul>
</dd>
</dl>
<div class="section" id="contents">
<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline"></a></h2>
<section id="contents">
<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this heading"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a><ul>
@@ -272,6 +189,7 @@ licensed under permissive BSD-2 clause open source license.</p>
<li class="toctree-l2"><a class="reference internal" href="examples.html#fsr">46-fsr</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#pixelformats">47-pixelformats</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#drawindirect">48-drawindirect</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples.html#hextile">49-hextile</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a><ul>
@@ -339,53 +257,34 @@ licensed under permissive BSD-2 clause open source license.</p>
</li>
</ul>
</div>
</div>
</div>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="overview.html" class="btn btn-neutral float-right" title="Overview" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="overview.html" class="btn btn-neutral float-right" title="Overview" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2010-2022, Branimir Karadžić
<p>&#169; Copyright 2010-2022, Branimir Karadžić.</p>
</div>
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@@ -1,72 +1,38 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Internals &mdash; bgfx 1.115.8277 documentation</title>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Internals &mdash; bgfx 1.116.8293 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="License" href="license.html" />
<link rel="prev" title="Tools" href="tools.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home" alt="Documentation Home"> bgfx
<a href="index.html" class="icon icon-home"> bgfx
</a>
<div class="version">
1.115.8277
1.116.8293
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@@ -74,18 +40,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="build.html">Building</a></li>
@@ -107,156 +62,98 @@
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">bgfx</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Internals</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="internals">
<h1>Internals<a class="headerlink" href="#internals" title="Permalink to this headline"></a></h1>
<div class="section" id="sort-based-draw-call-bucketing">
<h2>Sort based draw call bucketing<a class="headerlink" href="#sort-based-draw-call-bucketing" title="Permalink to this headline"></a></h2>
<section id="internals">
<h1>Internals<a class="headerlink" href="#internals" title="Permalink to this heading"></a></h1>
<section id="sort-based-draw-call-bucketing">
<h2>Sort based draw call bucketing<a class="headerlink" href="#sort-based-draw-call-bucketing" title="Permalink to this heading"></a></h2>
<p>bgfx is using sort-based draw call bucketing. This means that submission order doesnt necessarily match the rendering order, but on the low-level they will be sorted and ordered correctly. On the high level bgfx uses <strong>declarative API</strong> and internal sorting allows more optimal way of submitting draw calls for all passes at one place, and on the low-level this allows better optimization of rendering order. This sometimes creates undesired results usually for GUI rendering, where draw order should usually match submit order. bgfx provides way to enable sequential rendering for these cases (see <code class="docutils literal notranslate"><span class="pre">bgfx::setViewMode</span></code>).</p>
<blockquote>
<div><ul class="simple">
<li><p>More detailed description of sort-based draw call bucketing can be found at: <a class="reference external" href="http://realtimecollisiondetection.net/blog/?p=86">Order your graphics draw calls around!</a></p></li>
</ul>
</div></blockquote>
</div>
<div class="section" id="api-and-render-thread">
<h2>API and render thread<a class="headerlink" href="#api-and-render-thread" title="Permalink to this headline"></a></h2>
</section>
<section id="api-and-render-thread">
<h2>API and render thread<a class="headerlink" href="#api-and-render-thread" title="Permalink to this heading"></a></h2>
<p>API thread is thread from which <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> is called. Once <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> is called on thread, internally bgfx assumes that all API calls will be called from the same thread with exception of Resource, View, and Encoder API.</p>
<p>Render thread from where internal rendering <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> is called. On most of OS its required that this call be called on thread that OS created when executing process (some refer to this thread as “main” thread, or thread where <code class="docutils literal notranslate"><span class="pre">main</span></code> function is called).</p>
<p>When bgfx is compiled with option <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MULTITHREADED=1</span></code> (default is on) <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> can be called by user. Its required to be called before <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> from thread that will be used as render thread. If both <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> and <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> are called from the same thread, bgfx will switch to execute in single threaded mode, and calling <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> is not required, since it will be called automatically during <code class="docutils literal notranslate"><span class="pre">bgfx::frame</span></code> call.</p>
</div>
<div class="section" id="resource-api">
<h2>Resource API<a class="headerlink" href="#resource-api" title="Permalink to this headline"></a></h2>
</section>
<section id="resource-api">
<h2>Resource API<a class="headerlink" href="#resource-api" title="Permalink to this heading"></a></h2>
<p>Any API call starting with <code class="docutils literal notranslate"><span class="pre">bgfx::create*</span></code>, <code class="docutils literal notranslate"><span class="pre">bgfx::destroy*</span></code>, <code class="docutils literal notranslate"><span class="pre">bgfx::update*</span></code>, <code class="docutils literal notranslate"><span class="pre">bgfx::alloc*</span></code> is considered part of resource API. Internally resource API calls are guarded by mutex. There is no limit of number of threads that can call resource API simultaneously. Calling any resource API is infrequent, and functions are cheap since most of work with resource is done at later point on render thread.</p>
</div>
<div class="section" id="view-api">
<h2>View API<a class="headerlink" href="#view-api" title="Permalink to this headline"></a></h2>
</section>
<section id="view-api">
<h2>View API<a class="headerlink" href="#view-api" title="Permalink to this heading"></a></h2>
<p>Any API call starting with <code class="docutils literal notranslate"><span class="pre">bgfx::setView*</span></code> is considered part of view API. View API is not designed to be thread safe at all since all views are independentent from each other. Calling any view API for different views from different threads is safe. Whats not safe is to update the same view from multiple threads. This will lead to undefined behavior. Only view API that has to be set before any draw calls are issued is view mode <code class="docutils literal notranslate"><span class="pre">bgfx::setViewMode</span></code>. Internal encoder requires view mode to select sort key encoding and if user changes view mode after submit it will cause incorrect sort behavior within the view.</p>
</div>
<div class="section" id="encoder-api">
<h2>Encoder API<a class="headerlink" href="#encoder-api" title="Permalink to this headline"></a></h2>
</section>
<section id="encoder-api">
<h2>Encoder API<a class="headerlink" href="#encoder-api" title="Permalink to this heading"></a></h2>
<p>Encoder API can be obtained by calling <code class="docutils literal notranslate"><span class="pre">bgfx::begin</span></code>. bgfx by default allows 8 simultaneous threads to use encoders. This can be configured by changing <code class="docutils literal notranslate"><span class="pre">Limits.maxEncoders</span></code> init option of <code class="docutils literal notranslate"><span class="pre">bgfx::Init</span></code> structure.</p>
</div>
<div class="section" id="customization">
<h2>Customization<a class="headerlink" href="#customization" title="Permalink to this headline"></a></h2>
</section>
<section id="customization">
<h2>Customization<a class="headerlink" href="#customization" title="Permalink to this heading"></a></h2>
<p>By default each platform has sane default values. For example on Windows default renderer is DirectX, on Linux it is OpenGL, and on OSX its Metal. On Windows platform almost all rendering backends are available. For OpenGL ES on desktop you can find more information at:- <a class="reference external" href="http://www.g-truc.net/post-0457.html">OpenGL ES 2.0 and EGL on desktop</a></p>
<p>If youre targeting specific mobile hardware, you can find GLES support in their official SDKs: <a class="reference external" href="http://developer.qualcomm.com/mobile-development/mobile-technologies/gaming-graphics-optimization-adreno/tools-and-resources">Adreno
SDK</a>, <a class="reference external" href="http://www.malideveloper.com/">Mali SDK</a>, <a class="reference external" href="http://www.imgtec.com/powervr/insider/sdkdownloads/">PowerVR SDK</a>.</p>
<p>All configuration settings are located inside <a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/src/config.h">src/config.h</a>.</p>
<p>Every <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_*</span></code> setting can be changed by passing defines thru compiler switches. For example setting preprocessor define <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_OPENGL=1</span></code> will change backend renderer to OpenGL 2.1. on Windows. Since rendering APIs are platform specific, this obviously wont work nor make sense in all cases.</p>
<div class="section" id="options">
<h3>Options<a class="headerlink" href="#options" title="Permalink to this headline"></a></h3>
<section id="options">
<h3>Options<a class="headerlink" href="#options" title="Permalink to this heading"></a></h3>
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MULTITHREADED</span></code> is used to enable/disable threading support inside bgfx. By default set to 1 on all platforms that support threading.</p>
</div>
</div>
</div>
</section>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="license.html" class="btn btn-neutral float-right" title="License" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="tools.html" class="btn btn-neutral float-left" title="Tools" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="tools.html" class="btn btn-neutral float-left" title="Tools" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="license.html" class="btn btn-neutral float-right" title="License" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2010-2022, Branimir Karadžić
<p>&#169; Copyright 2010-2022, Branimir Karadžić.</p>
</div>
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@@ -1,71 +1,37 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>License &mdash; bgfx 1.115.8277 documentation</title>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>License &mdash; bgfx 1.116.8293 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="Internals" href="internals.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home" alt="Documentation Home"> bgfx
<a href="index.html" class="icon icon-home"> bgfx
</a>
<div class="version">
1.115.8277
1.116.8293
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@@ -73,18 +39,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="build.html">Building</a></li>
@@ -100,71 +55,33 @@
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">bgfx</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>License</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="license">
<h1>License<a class="headerlink" href="#license" title="Permalink to this headline"></a></h1>
<div class="section" id="license-bsd-2-clause">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/LICENSE">License (BSD 2-clause)</a><a class="headerlink" href="#license-bsd-2-clause" title="Permalink to this headline"></a></h2>
<section id="license">
<h1>License<a class="headerlink" href="#license" title="Permalink to this heading"></a></h1>
<section id="license-bsd-2-clause">
<h2><a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/LICENSE">License (BSD 2-clause)</a><a class="headerlink" href="#license-bsd-2-clause" title="Permalink to this heading"></a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Copyright</span> <span class="mi">2010</span><span class="o">-</span><span class="mi">2022</span> <span class="n">Branimir</span> <span class="n">Karadzic</span>
<span class="n">Redistribution</span> <span class="ow">and</span> <span class="n">use</span> <span class="ow">in</span> <span class="n">source</span> <span class="ow">and</span> <span class="n">binary</span> <span class="n">forms</span><span class="p">,</span> <span class="k">with</span> <span class="ow">or</span> <span class="n">without</span> <span class="n">modification</span><span class="p">,</span>
@@ -189,9 +106,9 @@
<span class="n">OF</span> <span class="n">THE</span> <span class="n">POSSIBILITY</span> <span class="n">OF</span> <span class="n">SUCH</span> <span class="n">DAMAGE</span><span class="o">.</span>
</pre></div>
</div>
</div>
<div class="section" id="rd-party-libraries">
<h2>3rd Party Libraries<a class="headerlink" href="#rd-party-libraries" title="Permalink to this headline"></a></h2>
</section>
<section id="rd-party-libraries">
<h2>3rd Party Libraries<a class="headerlink" href="#rd-party-libraries" title="Permalink to this heading"></a></h2>
<p>All required 3rd party libraries are included in bgfx repository in
<a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/3rdparty">3rdparty/</a>
directory.</p>
@@ -213,9 +130,9 @@ directory.</p>
<li><p>stb (<a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/3rdparty/stb/LICENSE">Public Domain</a>)</p></li>
</ul>
</div></blockquote>
</div>
<div class="section" id="assets">
<h2>Assets<a class="headerlink" href="#assets" title="Permalink to this headline"></a></h2>
</section>
<section id="assets">
<h2>Assets<a class="headerlink" href="#assets" title="Permalink to this heading"></a></h2>
<p>Bunny</p>
<blockquote>
<div><ul class="simple">
@@ -325,53 +242,41 @@ directory.</p>
<li><p><a class="reference external" href="https://commons.wikimedia.org/wiki/File:Normal_map_example_with_scene_and_result.png">https://commons.wikimedia.org/wiki/File:Normal_map_example_with_scene_and_result.png</a></p></li>
</ul>
</div></blockquote>
</div>
</div>
<p>Hextile example-49 texture (CC0 License)</p>
<blockquote>
<div><ul class="simple">
<li><p><a href="#id1"><span class="problematic" id="id2">`Rob Tuytel`__</span></a></p></li>
<li><p><a class="reference external" href="https://polyhaven.com/a/aerial_rocks_04">https://polyhaven.com/a/aerial_rocks_04</a></p></li>
</ul>
</div></blockquote>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="internals.html" class="btn btn-neutral float-left" title="Internals" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="internals.html" class="btn btn-neutral float-left" title="Internals" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2010-2022, Branimir Karadžić
<p>&#169; Copyright 2010-2022, Branimir Karadžić.</p>
</div>
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

Binary file not shown.

View File

@@ -1,72 +1,38 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Overview &mdash; bgfx 1.115.8277 documentation</title>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview &mdash; bgfx 1.116.8293 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Building" href="build.html" />
<link rel="prev" title="Documentation" href="index.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home" alt="Documentation Home"> bgfx
<a href="index.html" class="icon icon-home"> bgfx
</a>
<div class="version">
1.115.8277
1.116.8293
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@@ -74,18 +40,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Overview</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#what-is-it">What is it?</a><ul>
@@ -119,78 +74,40 @@
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">bgfx</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Overview</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="overview">
<h1>Overview<a class="headerlink" href="#overview" title="Permalink to this headline"></a></h1>
<div class="section" id="what-is-it">
<h2>What is it?<a class="headerlink" href="#what-is-it" title="Permalink to this headline"></a></h2>
<section id="overview">
<h1>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h1>
<section id="what-is-it">
<h2>What is it?<a class="headerlink" href="#what-is-it" title="Permalink to this heading"></a></h2>
<p>Cross-platform, graphics API agnostic, “Bring Your Own Engine/Framework” style rendering library,
licensed under permissive BSD-2 clause open source license.</p>
<p>
<iframe src="https://ghbtns.com/github-btn.html?user=bkaradzic&repo=bgfx&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=bkaradzic&repo=bgfx&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>
</p><div class="section" id="supported-rendering-backends">
<h3>Supported rendering backends<a class="headerlink" href="#supported-rendering-backends" title="Permalink to this headline"></a></h3>
</p><section id="supported-rendering-backends">
<h3>Supported rendering backends<a class="headerlink" href="#supported-rendering-backends" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Direct3D 9</p></li>
<li><p>Direct3D 11</p></li>
@@ -206,9 +123,9 @@ licensed under permissive BSD-2 clause open source license.</p>
<li><p>WebGL 2.0</p></li>
<li><p>WebGPU/Dawn (experimental)</p></li>
</ul>
</div>
<div class="section" id="supported-platforms">
<h3>Supported Platforms<a class="headerlink" href="#supported-platforms" title="Permalink to this headline"></a></h3>
</section>
<section id="supported-platforms">
<h3>Supported Platforms<a class="headerlink" href="#supported-platforms" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Android (14+, ARM, x86, MIPS)</p></li>
<li><p>FreeBSD</p></li>
@@ -222,17 +139,17 @@ licensed under permissive BSD-2 clause open source license.</p>
<li><p>Wasm/Emscripten</p></li>
<li><p>Windows (XP, Vista, 7, 8, 10)</p></li>
</ul>
</div>
<div class="section" id="supported-compilers">
<h3>Supported Compilers<a class="headerlink" href="#supported-compilers" title="Permalink to this headline"></a></h3>
</section>
<section id="supported-compilers">
<h3>Supported Compilers<a class="headerlink" href="#supported-compilers" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Clang 3.3 and above</p></li>
<li><p>GCC 5 and above</p></li>
<li><p>vs2017 and above</p></li>
</ul>
</div>
<div class="section" id="supported-languages">
<h3>Supported Languages<a class="headerlink" href="#supported-languages" title="Permalink to this headline"></a></h3>
</section>
<section id="supported-languages">
<h3>Supported Languages<a class="headerlink" href="#supported-languages" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://bkaradzic.github.io/bgfx/bgfx.html">C/C++ API documentation</a></p></li>
<li><p><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/bindings/bf">Beef API bindings</a></p></li>
@@ -250,15 +167,15 @@ licensed under permissive BSD-2 clause open source license.</p>
<li><p><a class="reference external" href="https://github.com/stuartcarnie/SwiftBGFX">Swift language API bindings</a></p></li>
<li><p><a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/bindings/zig">Zig language API bindings</a></p></li>
</ul>
</div>
<div class="section" id="project-page">
<h3>Project Page<a class="headerlink" href="#project-page" title="Permalink to this headline"></a></h3>
</section>
<section id="project-page">
<h3>Project Page<a class="headerlink" href="#project-page" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/bkaradzic/bgfx">https://github.com/bkaradzic/bgfx</a></p></li>
</ul>
</div>
<div class="section" id="contact">
<h3>Contact<a class="headerlink" href="#contact" title="Permalink to this headline"></a></h3>
</section>
<section id="contact">
<h3>Contact<a class="headerlink" href="#contact" title="Permalink to this heading"></a></h3>
<blockquote>
<div><ul class="simple">
<li><p><a class="reference external" href="https://github.com/bkaradzic/bgfx/discussions">GitHub Discussions</a></p></li>
@@ -267,12 +184,12 @@ licensed under permissive BSD-2 clause open source license.</p>
<li><p>Twitter <a class="reference external" href="https://twitter.com/bkaradzic">&#64;bkaradzic</a></p></li>
</ul>
</div></blockquote>
</div>
</div>
<div class="section" id="debugging-and-profiling">
<h2>Debugging and Profiling<a class="headerlink" href="#debugging-and-profiling" title="Permalink to this headline"></a></h2>
<div class="section" id="renderdoc">
<h3>RenderDoc<a class="headerlink" href="#renderdoc" title="Permalink to this headline"></a></h3>
</section>
</section>
<section id="debugging-and-profiling">
<h2>Debugging and Profiling<a class="headerlink" href="#debugging-and-profiling" title="Permalink to this heading"></a></h2>
<section id="renderdoc">
<h3>RenderDoc<a class="headerlink" href="#renderdoc" title="Permalink to this heading"></a></h3>
<p>Loading of RenderDoc is integrated in bgfx when using DX11 or OpenGL
renderer. You can drop in <code class="docutils literal notranslate"><span class="pre">renderdoc.dll</span></code> from RenderDoc distribution
into working directory, and it will be automatically loaded during bgfx
@@ -282,17 +199,17 @@ initialization. This allows frame capture at any time by pressing
<p>RenderDoc <a class="reference external" href="https://renderdoc.org/docs/how/index.html">How do I …?</a> documentation.</p>
<p><a class="reference external" href="https://software.intel.com/en-us/articles/shader-debugging-for-bgfx-rendering-engine">Shader debugging</a>
with RenderDoc and MSVC.</p>
</div>
<div class="section" id="intelgpa">
<h3>IntelGPA<a class="headerlink" href="#intelgpa" title="Permalink to this headline"></a></h3>
</section>
<section id="intelgpa">
<h3>IntelGPA<a class="headerlink" href="#intelgpa" title="Permalink to this heading"></a></h3>
<p>Right click <strong>Intel GPA Monitor</strong> tray icon, choose preferences, check
“Auto-detect launched applications” option. Find <code class="docutils literal notranslate"><span class="pre">InjectionList.txt</span></code>
in GPA directory and add <code class="docutils literal notranslate"><span class="pre">examples-*</span></code> to the list.</p>
<p>Download:
<a class="reference external" href="https://software.intel.com/en-us/vcsource/tools/intel-gpa">IntelGPA</a></p>
</div>
<div class="section" id="other-debuggers-and-profilers">
<h3>Other Debuggers and Profilers<a class="headerlink" href="#other-debuggers-and-profilers" title="Permalink to this headline"></a></h3>
</section>
<section id="other-debuggers-and-profilers">
<h3>Other Debuggers and Profilers<a class="headerlink" href="#other-debuggers-and-profilers" title="Permalink to this heading"></a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 15%" />
@@ -456,10 +373,10 @@ in GPA directory and add <code class="docutils literal notranslate"><span class=
<li><p><a class="reference external" href="https://github.com/GPUOpen-Tools/Radeon-GPUProfiler/releases">RGP (Radeon GPU Profiler)</a></p></li>
<li><p><a class="reference external" href="https://github.com/ValveSoftware/vogl">vogl</a></p></li>
</ul>
</div>
</div>
<div class="section" id="sdl-glfw-etc">
<h2>SDL, GLFW, etc.<a class="headerlink" href="#sdl-glfw-etc" title="Permalink to this headline"></a></h2>
</section>
</section>
<section id="sdl-glfw-etc">
<h2>SDL, GLFW, etc.<a class="headerlink" href="#sdl-glfw-etc" title="Permalink to this heading"></a></h2>
<p>It is possible to use bgfx with SDL, GLFW and similar cross platform
windowing libraries. The main requirement is that windowing library
provides access to native window handle thats used to create Direct3D
@@ -482,9 +399,9 @@ Each platform has rules about where renderer can be and how multithreading inter
with context/device. To disable multithreaded render use <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MULTITHREADED=0</span></code>
preprocessor define.</p>
</div>
</div>
<div class="section" id="getting-involved">
<h2>Getting Involved<a class="headerlink" href="#getting-involved" title="Permalink to this headline"></a></h2>
</section>
<section id="getting-involved">
<h2>Getting Involved<a class="headerlink" href="#getting-involved" title="Permalink to this heading"></a></h2>
<p>Everyone is welcome to contribute to bgfx by submitting bug reports, testing on different
platforms, writing examples (see <a class="reference external" href="https://github.com/bkaradzic/bgfx/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+needed%22">ideas</a>),
improving documentation, profiling and optimizing, etc.</p>
@@ -493,8 +410,8 @@ improving documentation, profiling and optimizing, etc.</p>
<p><strong>When contributing to the bgfx project you must agree to the BSD 2-clause
licensing terms.</strong></p>
</div>
<div class="section" id="contributors">
<h3>Contributors<a class="headerlink" href="#contributors" title="Permalink to this headline"></a></h3>
<section id="contributors">
<h3>Contributors<a class="headerlink" href="#contributors" title="Permalink to this heading"></a></h3>
<p>Chronological order:</p>
<blockquote>
<div><ul class="simple">
@@ -586,64 +503,45 @@ and <a class="reference external" href="examples.html#bokeh">45-bokeh</a> exampl
<li><p>Richard Schubert (<a class="reference external" href="https://github.com/Hemofektik">&#64;Hemofektik</a>) - <a class="reference external" href="examples.html#fsr">46-fsr</a> example.</p></li>
<li><p>Sandy Carter (<a class="reference external" href="https://github.com/bwrsandman">&#64;bwrsandman</a>) - <a class="reference external" href="examples.html#pixelformats">47-pixelformats</a> example, and various fixes and improvements.</p></li>
<li><p>Liam Twigger (<a class="reference external" href="https://github.com/SnapperTT">&#64;SnapperTT</a>) - <a class="reference external" href="examples.html#drawindirect">48-drawindirect</a> example.</p></li>
<li><p>Preetish Kakkar (<a class="reference external" href="https://github.com/preetishkakkar">&#64;blackhole</a>) - <a class="reference external" href="examples.html#49-hextile">49-hextile</a> example.</p></li>
</ul>
</div></blockquote>
<p>and <a class="reference external" href="https://github.com/bkaradzic/bgfx/graphs/contributors">others</a></p>
</div>
<div class="section" id="repository-visualization">
<h3>Repository visualization<a class="headerlink" href="#repository-visualization" title="Permalink to this headline"></a></h3>
</section>
<section id="repository-visualization">
<h3>Repository visualization<a class="headerlink" href="#repository-visualization" title="Permalink to this heading"></a></h3>
<p>
<iframe width="694" height="390" src="https://www.youtube.com/embed/5ZeN_d_-BHo" frameborder="0" allowfullscreen></iframe>
</p></div>
</div>
</div>
</p></section>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="build.html" class="btn btn-neutral float-right" title="Building" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="index.html" class="btn btn-neutral float-left" title="Documentation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Documentation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="build.html" class="btn btn-neutral float-right" title="Building" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2010-2022, Branimir Karadžić
<p>&#169; Copyright 2010-2022, Branimir Karadžić.</p>
</div>
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>

View File

@@ -1,72 +1,38 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search &mdash; bgfx 1.115.8277 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; bgfx 1.116.8293 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
<script src="_static/js/theme.js"></script>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home" alt="Documentation Home"> bgfx
<a href="index.html" class="icon icon-home"> bgfx
</a>
<div class="version">
1.115.8277
1.116.8293
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="#" method="get">
<input type="text" name="q" placeholder="Search docs" />
@@ -74,18 +40,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="build.html">Building</a></li>
@@ -96,67 +51,29 @@
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">bgfx</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Search</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<noscript>
<div id="fallback" class="admonition warning">
<p class="last">
@@ -171,46 +88,32 @@
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2010-2022, Branimir Karadžić
<p>&#169; Copyright 2010-2022, Branimir Karadžić.</p>
</div>
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<script type="text/javascript">
<script>
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
<script type="text/javascript" id="searchindexloader"></script>
<script id="searchindexloader"></script>

File diff suppressed because one or more lines are too long

View File

@@ -1,72 +1,38 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tools &mdash; bgfx 1.115.8277 documentation</title>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tools &mdash; bgfx 1.116.8293 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Internals" href="internals.html" />
<link rel="prev" title="API Reference" href="bgfx.html" />
</head>
<body class="wy-body-for-nav">
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home" alt="Documentation Home"> bgfx
<a href="index.html" class="icon icon-home"> bgfx
</a>
<div class="version">
1.115.8277
1.116.8293
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
@@ -74,18 +40,7 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="build.html">Building</a></li>
@@ -108,71 +63,33 @@
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">bgfx</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Tools</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="tools">
<h1>Tools<a class="headerlink" href="#tools" title="Permalink to this headline"></a></h1>
<div class="section" id="geometry-compiler-geometryc">
<h2>Geometry Compiler (geometryc)<a class="headerlink" href="#geometry-compiler-geometryc" title="Permalink to this headline"></a></h2>
<section id="tools">
<h1>Tools<a class="headerlink" href="#tools" title="Permalink to this heading"></a></h1>
<section id="geometry-compiler-geometryc">
<h2>Geometry Compiler (geometryc)<a class="headerlink" href="#geometry-compiler-geometryc" title="Permalink to this heading"></a></h2>
<p>Converts Wavefront .obj, or glTF 2.0 mesh files to a format which is optimized for use with bgfx.</p>
<p>Usage:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">geometryc</span> <span class="o">-</span><span class="n">f</span> <span class="o">&lt;</span><span class="ow">in</span><span class="o">&gt;</span> <span class="o">-</span><span class="n">o</span> <span class="o">&lt;</span><span class="n">out</span><span class="o">&gt;</span>
@@ -263,13 +180,13 @@
</dd>
</dl>
</div></blockquote>
</div>
<div class="section" id="geometry-viewer-geometryv">
<h2>Geometry Viewer (geometryv)<a class="headerlink" href="#geometry-viewer-geometryv" title="Permalink to this headline"></a></h2>
</section>
<section id="geometry-viewer-geometryv">
<h2>Geometry Viewer (geometryv)<a class="headerlink" href="#geometry-viewer-geometryv" title="Permalink to this heading"></a></h2>
<p>A geometry viewer.</p>
</div>
<div class="section" id="shader-compiler-shaderc">
<h2>Shader Compiler (shaderc)<a class="headerlink" href="#shader-compiler-shaderc" title="Permalink to this headline"></a></h2>
</section>
<section id="shader-compiler-shaderc">
<h2>Shader Compiler (shaderc)<a class="headerlink" href="#shader-compiler-shaderc" title="Permalink to this heading"></a></h2>
<p>Shader Compiler is used to compile bgfxs cross-platform shader language, which based on GLSL.
It uses an ANSI C pre-processor to transform the GLSL-like language into HLSL.
This method has certain drawbacks,
@@ -289,8 +206,8 @@ This file cannot include comments, and typically only one is necessary.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">$input/$output</span></code> tokens corresponding to inputs and outputs defined in
<code class="docutils literal notranslate"><span class="pre">varying.def.sc</span></code> must be used at the beginning of shader.</p></li>
</ul>
<div class="section" id="defines">
<h3>Defines<a class="headerlink" href="#defines" title="Permalink to this headline"></a></h3>
<section id="defines">
<h3>Defines<a class="headerlink" href="#defines" title="Permalink to this heading"></a></h3>
<p>Shader Compiler also has the following default defines (default value is set to 0):</p>
<blockquote>
<div><table class="docutils align-default">
@@ -373,9 +290,9 @@ This file cannot include comments, and typically only one is necessary.</p></li>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="predefined-uniforms">
<h3>Predefined Uniforms<a class="headerlink" href="#predefined-uniforms" title="Permalink to this headline"></a></h3>
</section>
<section id="predefined-uniforms">
<h3>Predefined Uniforms<a class="headerlink" href="#predefined-uniforms" title="Permalink to this heading"></a></h3>
<blockquote>
<div><table class="docutils align-default">
<colgroup>
@@ -525,16 +442,16 @@ Can be 03.</p>
</dd>
</dl>
</div></blockquote>
</div>
<div class="section" id="building-shaders">
<h3>Building shaders<a class="headerlink" href="#building-shaders" title="Permalink to this headline"></a></h3>
</section>
<section id="building-shaders">
<h3>Building shaders<a class="headerlink" href="#building-shaders" title="Permalink to this heading"></a></h3>
<p>Shaders can be compiled for all renderers by using the <code class="docutils literal notranslate"><span class="pre">shaderc</span></code> tool.
A Makefile to simplify building shaders is provided in the <a class="reference external" href="https://github.com/bkaradzic/bgfx/tree/master/examples">bgfx examples</a>.
D3D shaders can be only compiled on Windows.</p>
</div>
</div>
<div class="section" id="texture-compiler-texturec">
<h2>Texture Compiler (texturec)<a class="headerlink" href="#texture-compiler-texturec" title="Permalink to this headline"></a></h2>
</section>
</section>
<section id="texture-compiler-texturec">
<h2>Texture Compiler (texturec)<a class="headerlink" href="#texture-compiler-texturec" title="Permalink to this heading"></a></h2>
<p>Convert PNG, TGA, DDS, KTX, and PVR textures into bgfx-supported texture formats.</p>
<p>Usage:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">texturec</span> <span class="o">-</span><span class="n">f</span> <span class="o">&lt;</span><span class="ow">in</span><span class="o">&gt;</span> <span class="o">-</span><span class="n">o</span> <span class="o">&lt;</span><span class="n">out</span><span class="o">&gt;</span> <span class="p">[</span><span class="o">-</span><span class="n">t</span> <span class="o">&lt;</span><span class="n">texture</span> <span class="nb">format</span><span class="o">&gt;</span><span class="p">]</span>
@@ -672,59 +589,39 @@ aspect ratio will be preserved)</p>
</dl>
</dd>
</dl>
</div>
<div class="section" id="texture-viewer-texturev">
<h2>Texture Viewer (texturev)<a class="headerlink" href="#texture-viewer-texturev" title="Permalink to this headline"></a></h2>
</section>
<section id="texture-viewer-texturev">
<h2>Texture Viewer (texturev)<a class="headerlink" href="#texture-viewer-texturev" title="Permalink to this heading"></a></h2>
<p>A texture viewer.</p>
</div>
</div>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="internals.html" class="btn btn-neutral float-right" title="Internals" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="bgfx.html" class="btn btn-neutral float-left" title="API Reference" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="bgfx.html" class="btn btn-neutral float-left" title="API Reference" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="internals.html" class="btn btn-neutral float-right" title="Internals" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2010-2022, Branimir Karadžić
<p>&#169; Copyright 2010-2022, Branimir Karadžić.</p>
</div>
</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>