Updated docs.

This commit is contained in:
Branimir Karadžić
2016-06-03 09:42:39 -07:00
parent 16caef77a6
commit 72e9a1cc4f
31 changed files with 11775 additions and 10386 deletions

View File

@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -197,7 +197,10 @@ h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
dt:hover > a.headerlink,
caption:hover > a.headerlink,
p.caption:hover > a.headerlink,
div.code-block-caption:hover > a.headerlink {
visibility: visible;
}
@@ -314,6 +317,13 @@ table.docutils {
border-collapse: collapse;
}
table caption span.caption-number {
font-style: italic;
}
table caption span.caption-text {
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 5px;
border-top: 0;
@@ -344,6 +354,25 @@ table.citation td {
border-bottom: none;
}
/* -- figures --------------------------------------------------------------- */
div.figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
@@ -406,6 +435,10 @@ dl.glossary dt {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
@@ -471,22 +504,51 @@ table.highlighttable td {
padding: 0 0.5em 0 0.5em;
}
tt.descname {
div.code-block-caption {
padding: 2px 5px;
font-size: small;
}
div.code-block-caption code {
background-color: transparent;
}
div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
}
div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
padding: 1em 1em 0;
}
div.literal-block-wrapper div.highlight {
margin: 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
tt.descclassname {
code.descclassname {
background-color: transparent;
}
tt.xref, a tt {
code.xref, a code {
background-color: transparent;
font-weight: bold;
}
h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
background-color: transparent;
}

View File

@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -91,6 +91,30 @@ jQuery.fn.highlightText = function(text, className) {
});
};
/*
* 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;
}
/**
* Small JavaScript module for the documentation.
*/
@@ -152,9 +176,10 @@ var Documentation = {
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
if (document.location.hash)
window.setTimeout(function() {
document.location.href += '';
}, 10);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 355 KiB

16219
_static/jquery.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 173 B

View File

@@ -4,8 +4,10 @@
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
@@ -40,6 +42,7 @@
.highlight .nv { color: #bb60d5 } /* Name.Variable */
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #208050 } /* Literal.Number.Bin */
.highlight .mf { color: #208050 } /* Literal.Number.Float */
.highlight .mh { color: #208050 } /* Literal.Number.Hex */
.highlight .mi { color: #208050 } /* Literal.Number.Integer */

View File

@@ -4,12 +4,13 @@
*
* Sphinx JavaScript utilties for the full-text search.
*
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* Non-minified version JS is _stemmer.js if file is provided */
/**
* Porter Stemmer
*/
@@ -373,8 +374,7 @@ var Search = {
}
// lookup as search terms in fulltext
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term))
.concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title));
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
// let the scorer override scores with a custom scoring function
if (Scorer.score) {
@@ -439,7 +439,7 @@ var Search = {
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '') {
if (data !== '' && data !== undefined) {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
}
Search.output.append(listItem);
@@ -538,23 +538,47 @@ var Search = {
/**
* search for full-text terms in the index
*/
performTermsSearch : function(searchterms, excluded, terms, score) {
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
var filenames = this._index.filenames;
var titles = this._index.titles;
var i, j, file, files;
var i, j, file;
var fileMap = {};
var scoreMap = {};
var results = [];
// 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}
];
// no match but word was a required one
if ((files = terms[word]) === undefined)
if ($u.every(_o, function(o){return o.files === undefined;})) {
break;
if (files.length === undefined) {
files = [files];
}
// found search word in contents
$u.each(_o, function(o) {
var _files = o.files;
if (_files === undefined)
return
if (_files.length === undefined)
_files = [_files];
files = files.concat(_files);
// 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;
}
});
// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
@@ -576,7 +600,9 @@ var Search = {
// ensure that none of the excluded terms is in the search result
for (i = 0; i < excluded.length; i++) {
if (terms[excluded[i]] == file ||
$u.contains(terms[excluded[i]] || [], file)) {
titleterms[excluded[i]] == file ||
$u.contains(terms[excluded[i]] || [], file) ||
$u.contains(titleterms[excluded[i]] || [], file)) {
valid = false;
break;
}
@@ -584,6 +610,9 @@ var Search = {
// 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([filenames[file], titles[file], '', null, score]);
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 345 B

View File

@@ -4,7 +4,7 @@
*
* sphinx.websupport utilties for all documentation.
*
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -50,51 +50,51 @@
}
function initEvents() {
$('a.comment-close').live("click", function(event) {
$(document).on("click", 'a.comment-close', function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
});
$('a.vote').live("click", function(event) {
$(document).on("click", 'a.vote', function(event) {
event.preventDefault();
handleVote($(this));
});
$('a.reply').live("click", function(event) {
$(document).on("click", 'a.reply', function(event) {
event.preventDefault();
openReply($(this).attr('id').substring(2));
});
$('a.close-reply').live("click", function(event) {
$(document).on("click", 'a.close-reply', function(event) {
event.preventDefault();
closeReply($(this).attr('id').substring(2));
});
$('a.sort-option').live("click", function(event) {
$(document).on("click", 'a.sort-option', function(event) {
event.preventDefault();
handleReSort($(this));
});
$('a.show-proposal').live("click", function(event) {
$(document).on("click", 'a.show-proposal', function(event) {
event.preventDefault();
showProposal($(this).attr('id').substring(2));
});
$('a.hide-proposal').live("click", function(event) {
$(document).on("click", 'a.hide-proposal', function(event) {
event.preventDefault();
hideProposal($(this).attr('id').substring(2));
});
$('a.show-propose-change').live("click", function(event) {
$(document).on("click", 'a.show-propose-change', function(event) {
event.preventDefault();
showProposeChange($(this).attr('id').substring(2));
});
$('a.hide-propose-change').live("click", function(event) {
$(document).on("click", 'a.hide-propose-change', function(event) {
event.preventDefault();
hideProposeChange($(this).attr('id').substring(2));
});
$('a.accept-comment').live("click", function(event) {
$(document).on("click", 'a.accept-comment', function(event) {
event.preventDefault();
acceptComment($(this).attr('id').substring(2));
});
$('a.delete-comment').live("click", function(event) {
$(document).on("click", 'a.delete-comment', function(event) {
event.preventDefault();
deleteComment($(this).attr('id').substring(2));
});
$('a.comment-markup').live("click", function(event) {
$(document).on("click", 'a.comment-markup', function(event) {
event.preventDefault();
toggleCommentMarkupBox($(this).attr('id').substring(2));
});
@@ -700,8 +700,8 @@
(<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
<div class="comment-markup-box" id="mb<%id%>">\
reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
<tt>``code``</tt>, \
code blocks: <tt>::</tt> and an indented block after blank line</div>\
<code>``code``</code>, \
code blocks: <code>::</code> and an indented block after blank line</div>\
<form method="post" id="cf<%id%>" class="comment-form" action="">\
<textarea name="comment" cols="80"></textarea>\
<p class="propose-button">\

2806
bgfx.html

File diff suppressed because it is too large Load Diff

View File

@@ -134,7 +134,7 @@
<div class="rst-content">
@@ -258,13 +258,13 @@ bx repository.</p>
make
</pre></div>
</div>
<p>After calling <tt class="docutils literal"><span class="pre">make</span></tt>, .build/projects/* directory will be generated.
<p>After calling <code class="docutils literal"><span class="pre">make</span></code>, .build/projects/* directory will be generated.
All intermediate files generated by compiler will be inside .build
directory structure. Deleting .build directory at any time is safe.</p>
<div class="highlight-python"><div class="highlight"><pre>make &lt;configuration&gt;
</pre></div>
</div>
<p>Configuration is <tt class="docutils literal"><span class="pre">&lt;platform&gt;-&lt;debug/release&gt;[32/64]</span></tt>. For example:</p>
<p>Configuration is <code class="docutils literal"><span class="pre">&lt;platform&gt;-&lt;debug/release&gt;[32/64]</span></code>. For example:</p>
<div class="highlight-python"><div class="highlight"><pre>linux-release32, nacl-debug64, nacl-arm-debug, pnacl-release,
android-release, etc.
</pre></div>
@@ -293,7 +293,7 @@ configuration file, it has to be set manually for each example project:</p>
<li>Open <em>&#8220;Edit scheme...&#8221;</em> dialog for a given project.</li>
<li>Select <em>&#8220;Run&#8221;</em> settings.</li>
<li>Check <em>&#8220;Use custom working directory&#8221;</em> and enter following path:
<tt class="docutils literal"><span class="pre">${PROJECT_DIR}/../../../examples/runtime</span></tt>.</li>
<code class="docutils literal"><span class="pre">${PROJECT_DIR}/../../../examples/runtime</span></code>.</li>
</ol>
</div>
<div class="section" id="id2">
@@ -325,18 +325,18 @@ instead) inside different build system.</p>
</div>
<div class="section" id="oculusvr-integration">
<h2>OculusVR Integration<a class="headerlink" href="#oculusvr-integration" title="Permalink to this headline"></a></h2>
<p>To build with OculusVR HMD support enabled you must set <tt class="docutils literal"><span class="pre">OVR_DIR</span></tt> enviroment variable:</p>
<p>To build with OculusVR HMD support enabled you must set <code class="docutils literal"><span class="pre">OVR_DIR</span></code> enviroment variable:</p>
<div class="highlight-python"><div class="highlight"><pre>set OVR_DIR=&lt;path to OculusSDK&gt;
</pre></div>
</div>
<p>And generate project files with <tt class="docutils literal"><span class="pre">--with-ovr</span></tt> option:</p>
<p>And generate project files with <code class="docutils literal"><span class="pre">--with-ovr</span></code> option:</p>
<div class="highlight-python"><div class="highlight"><pre>genie --with-ovr vs2015
</pre></div>
</div>
</div>
<div class="section" id="tools">
<h2>Tools<a class="headerlink" href="#tools" title="Permalink to this headline"></a></h2>
<p>To build bgfx project files for tools, use <tt class="docutils literal"><span class="pre">--with-tools</span></tt> option:</p>
<p>To build bgfx project files for tools, use <code class="docutils literal"><span class="pre">--with-tools</span></code> option:</p>
<div class="highlight-python"><div class="highlight"><pre>genie --with-tools vs2015
</pre></div>
</div>

View File

@@ -146,7 +146,7 @@
<div class="rst-content">
@@ -378,7 +378,7 @@ caching OpenGL binary shaders, and video capture.</p>
<p>Draw stress is CPU stress test to show what is the maximimum 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
changing <tt class="docutils literal"><span class="pre">BGFX_CONFIG_MAX_DRAW_CALLS</span></tt>.</p>
changing <code class="docutils literal"><span class="pre">BGFX_CONFIG_MAX_DRAW_CALLS</span></code>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="19%" />
@@ -801,9 +801,9 @@ changing <tt class="docutils literal"><span class="pre">BGFX_CONFIG_MAX_DRAW_CAL
</table>
<p>To test browsers in 60Hz mode following changes were made:</p>
<ul class="simple">
<li>Firefox 27 <a class="reference external" href="about:config">about:config</a> adjustments: <tt class="docutils literal"><span class="pre">webgl.prefer-native-gl</span> <span class="pre">true</span></tt>
(on Windows), and <tt class="docutils literal"><span class="pre">layout.frame_rate</span> <span class="pre">500</span></tt>.</li>
<li>Chrome 33 command line option: <tt class="docutils literal"><span class="pre">--disable-gpu-vsync</span></tt>.</li>
<li>Firefox 27 <a class="reference external" href="about:config">about:config</a> adjustments: <code class="docutils literal"><span class="pre">webgl.prefer-native-gl</span> <span class="pre">true</span></code>
(on Windows), and <code class="docutils literal"><span class="pre">layout.frame_rate</span> <span class="pre">500</span></code>.</li>
<li>Chrome 33 command line option: <code class="docutils literal"><span class="pre">--disable-gpu-vsync</span></code>.</li>
</ul>
</div>
<div class="section" id="hz-test-for-browsers">

File diff suppressed because it is too large Load Diff

View File

@@ -109,7 +109,7 @@
<div class="rst-content">

View File

@@ -127,7 +127,7 @@
<div class="rst-content">

Binary file not shown.

View File

@@ -137,7 +137,7 @@
<div class="rst-content">
@@ -252,9 +252,9 @@ 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
<tt class="docutils literal"><span class="pre">bgfx::setViewSeq</span></tt>).</p>
<code class="docutils literal"><span class="pre">bgfx::setViewSeq</span></code>).</p>
<p>Internally all low-level rendering draw calls are issued inside single
function <tt class="docutils literal"><span class="pre">RendererContextI::submit</span></tt>. This function exist inside each
function <code class="docutils literal"><span class="pre">RendererContextI::submit</span></code>. This function exist inside each
renderer backend implementation.</p>
<blockquote>
<div><ul class="simple">
@@ -277,9 +277,9 @@ SDK</a>,
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 <tt class="docutils literal"><span class="pre">BGFX_CONFIG_*</span></tt> setting can be changed by passing defines thru
<p>Every <code class="docutils literal"><span class="pre">BGFX_CONFIG_*</span></code> setting can be changed by passing defines thru
compiler switches. For example setting preprocessor define
<tt class="docutils literal"><span class="pre">BGFX_CONFIG_RENDERER_OPENGL=1</span></tt> will change backend renderer to OpenGL
<code class="docutils literal"><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 won&#8217;t work nor make sense in all cases. Certain platforms have
only single choice, for example the Native Client works only with OpenGL
@@ -291,7 +291,7 @@ errors.</p>
<div class="section" id="renderdoc">
<h3>RenderDoc<a class="headerlink" href="#renderdoc" title="Permalink to this headline"></a></h3>
<p>Loading of RenderDoc is integrated in bgfx when using DX11 or OpenGL
renderer. You can drop in <tt class="docutils literal"><span class="pre">renderdoc.dll</span></tt> from RenderDoc distribution
renderer. You can drop in <code class="docutils literal"><span class="pre">renderdoc.dll</span></code> from RenderDoc distribution
into working directory, and it will be automatically loaded during bgfx
initialization. This allows frame capture at any time by pressing
<strong>F11</strong>.</p>
@@ -300,8 +300,8 @@ initialization. This allows frame capture at any time by pressing
<div class="section" id="intelgpa">
<h3>IntelGPA<a class="headerlink" href="#intelgpa" title="Permalink to this headline"></a></h3>
<p>Right click <strong>Intel GPA Monitor</strong> tray icon, choose preferences, check
&#8220;Auto-detect launched applications&#8221; option. Find <tt class="docutils literal"><span class="pre">InjectionList.txt</span></tt>
in GPA directory and add <tt class="docutils literal"><span class="pre">examples-*</span></tt> to the list.</p>
&#8220;Auto-detect launched applications&#8221; option. Find <code class="docutils literal"><span class="pre">InjectionList.txt</span></code>
in GPA directory and add <code class="docutils literal"><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>
@@ -473,19 +473,19 @@ int main(...
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">You can use <tt class="docutils literal"><span class="pre">--with-sdl</span></tt> when runnning GENie to enable SDL2 integration with examples:
<tt class="docutils literal"><span class="pre">genie</span> <span class="pre">--with-sdl</span> <span class="pre">vs2012</span></tt></p>
<p class="last">You can use <code class="docutils literal"><span class="pre">--with-sdl</span></code> when runnning GENie to enable SDL2 integration with examples:
<code class="docutils literal"><span class="pre">genie</span> <span class="pre">--with-sdl</span> <span class="pre">vs2012</span></code></p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><tt class="docutils literal"><span class="pre">--with-glfw</span></tt> is also available, but it&#8217;s just simple stub to be used to test GLFW
<p class="last"><code class="docutils literal"><span class="pre">--with-glfw</span></code> is also available, but it&#8217;s just simple stub to be used to test GLFW
integration API.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Special care is necessary to make custom windowing to work with multithreaded renderer.
Each platform has rules about where renderer can be and how multithreading interacts
with context/device. To disable multithreaded render use <tt class="docutils literal"><span class="pre">BGFX_CONFIG_MULTITHREDED=0</span></tt>
with context/device. To disable multithreaded render use <code class="docutils literal"><span class="pre">BGFX_CONFIG_MULTITHREDED=0</span></code>
preprocessor define.</p>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@@ -119,7 +119,7 @@
<div class="rst-content">
@@ -153,17 +153,17 @@ This technique has certain drawbacks, but overall it&#8217;s simple and allows
quick authoring of cross-platform shaders.</p>
<p>Some differences between bgfx&#8217;s shaderc flavor of GLSL and regular GLSL:</p>
<ul class="simple">
<li>No <tt class="docutils literal"><span class="pre">bool/int</span></tt> uniforms, all uniforms must be <tt class="docutils literal"><span class="pre">float</span></tt>.</li>
<li>Attributes and varyings can be accessed only from <tt class="docutils literal"><span class="pre">main()</span></tt>
<li>No <code class="docutils literal"><span class="pre">bool/int</span></code> uniforms, all uniforms must be <code class="docutils literal"><span class="pre">float</span></code>.</li>
<li>Attributes and varyings can be accessed only from <code class="docutils literal"><span class="pre">main()</span></code>
function.</li>
<li>Must use <tt class="docutils literal"><span class="pre">SAMPLER2D/3D/CUBE/etc.</span></tt> macros instead of
<tt class="docutils literal"><span class="pre">sampler2D/3D/Cube/etc.</span></tt> tokens.</li>
<li>Must use <tt class="docutils literal"><span class="pre">vec2/3/4_splat(&lt;value&gt;)</span></tt> instead of
<tt class="docutils literal"><span class="pre">vec2/3/4(&lt;value&gt;)</span></tt>.</li>
<li>Must use <tt class="docutils literal"><span class="pre">mul(x,</span> <span class="pre">y)</span></tt> when multiplying vectors and matrices.</li>
<li>Must use <tt class="docutils literal"><span class="pre">varying.def.sc</span></tt> to define input/output semantic and
precission instead of using <tt class="docutils literal"><span class="pre">attribute/in</span></tt> and <tt class="docutils literal"><span class="pre">varying/in/out</span></tt>.</li>
<li><tt class="docutils literal"><span class="pre">$input/$output</span></tt> tokens must appear at the begining of shader.</li>
<li>Must use <code class="docutils literal"><span class="pre">SAMPLER2D/3D/CUBE/etc.</span></code> macros instead of
<code class="docutils literal"><span class="pre">sampler2D/3D/Cube/etc.</span></code> tokens.</li>
<li>Must use <code class="docutils literal"><span class="pre">vec2/3/4_splat(&lt;value&gt;)</span></code> instead of
<code class="docutils literal"><span class="pre">vec2/3/4(&lt;value&gt;)</span></code>.</li>
<li>Must use <code class="docutils literal"><span class="pre">mul(x,</span> <span class="pre">y)</span></code> when multiplying vectors and matrices.</li>
<li>Must use <code class="docutils literal"><span class="pre">varying.def.sc</span></code> to define input/output semantic and
precission instead of using <code class="docutils literal"><span class="pre">attribute/in</span></code> and <code class="docutils literal"><span class="pre">varying/in/out</span></code>.</li>
<li><code class="docutils literal"><span class="pre">$input/$output</span></code> tokens must appear at the begining of shader.</li>
</ul>
<p>For more info see <a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/src/bgfx_shader.sh">shader helper
macros</a>.</p>