2015-08-01 20:40:24 -07:00
<!DOCTYPE html>
<!-- [if IE 8]><html class="no - js lt - ie9" lang="en" > <![endif] -->
<!-- [if gt IE 8]><! --> < html class = "no-js" lang = "en" > <!-- <![endif] -->
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title > Tools — bgfx 1.0 documentation< / title >
< link rel = "stylesheet" href = "_static/css/theme.css" type = "text/css" / >
< link rel = "top" title = "bgfx 1.0 documentation" href = "index.html" / >
2015-08-02 15:05:48 -07:00
< link rel = "next" title = "License" href = "license.html" / >
2015-08-01 20:40:24 -07:00
< link rel = "prev" title = "API Reference" href = "bgfx.html" / >
< script src = "_static/js/modernizr.min.js" > < / script >
< / head >
< body class = "wy-body-for-nav" role = "document" >
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
2016-05-16 08:59:36 -07:00
< div class = "wy-side-scroll" >
< div class = "wy-side-nav-search" >
2015-08-01 20:40:24 -07:00
2016-05-16 08:59:36 -07:00
< a href = "index.html" class = "icon icon-home" > bgfx
2015-08-01 20:40:24 -07:00
2016-05-16 08:59:36 -07:00
< / a >
2015-08-01 20:40:24 -07:00
2016-05-16 08:59:36 -07:00
< div class = "version" >
1.0
< / div >
2015-08-01 20:40:24 -07:00
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
2016-05-16 08:59:36 -07:00
< / div >
< div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "main navigation" >
2015-08-01 20:40:24 -07:00
2016-05-16 08:59:36 -07:00
< 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 >
< li class = "toctree-l1" > < a class = "reference internal" href = "examples.html" > Examples< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "bgfx.html" > API Reference< / a > < / li >
2015-08-01 20:40:24 -07:00
< li class = "toctree-l1 current" > < a class = "current reference internal" href = "" > Tools< / a > < ul >
2016-04-29 09:43:23 -07:00
< li class = "toctree-l2" > < a class = "reference internal" href = "#geometry-compiler-geometryc" > Geometry Compiler (geometryc)< / a > < / li >
2015-12-07 21:53:52 -08:00
< li class = "toctree-l2" > < a class = "reference internal" href = "#shader-compiler-shaderc" > Shader Compiler (shaderc)< / a > < ul >
< li class = "toctree-l3" > < a class = "reference internal" href = "#building-shaders" > Building shaders< / a > < / li >
< / ul >
< / li >
2015-08-01 20:40:24 -07:00
< li class = "toctree-l2" > < a class = "reference internal" href = "#texture-compiler-texturec" > Texture Compiler (texturec)< / a > < / li >
2016-04-29 09:43:23 -07:00
< li class = "toctree-l2" > < a class = "reference internal" href = "#texture-viewer-texturev" > Texture Viewer (texturev)< / a > < / li >
2015-08-01 20:40:24 -07:00
< / ul >
< / li >
2016-05-16 08:59:36 -07:00
< li class = "toctree-l1" > < a class = "reference internal" href = "license.html" > License< / a > < / li >
2015-08-01 20:40:24 -07:00
< / ul >
2016-05-16 08:59:36 -07:00
2015-08-01 20:40:24 -07:00
2016-05-16 08:59:36 -07:00
< / div >
2015-08-01 20:40:24 -07:00
< / div >
< / nav >
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" >
< nav class = "wy-nav-top" role = "navigation" aria-label = "top navigation" >
< 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" >
2016-05-16 08:59:36 -07:00
2016-06-03 09:42:39 -07:00
2016-05-16 08:59:36 -07:00
< div role = "navigation" aria-label = "breadcrumbs navigation" >
2015-08-01 20:40:24 -07:00
< ul class = "wy-breadcrumbs" >
< li > < a href = "index.html" > Docs< / a > » < / li >
< li > Tools< / li >
< li class = "wy-breadcrumbs-aside" >
< / li >
< / ul >
< hr / >
< / div >
2016-05-16 08:59:36 -07:00
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
2015-08-01 20:40:24 -07:00
< div class = "section" id = "tools" >
< h1 > Tools< a class = "headerlink" href = "#tools" title = "Permalink to this headline" > ¶< / a > < / h1 >
2016-04-29 09:43:23 -07:00
< 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 >
< p > Converts Wavefront .obj mesh file to format optimal for using with bgfx.< / p >
< / div >
2015-08-01 20:40:24 -07:00
< 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 >
< p > bgfx cross-platform shader language is based on GLSL syntax. It’ s uses
ANSI C preprocessor to transform GLSL like language syntax into HLSL.
This technique has certain drawbacks, but overall it’ s simple and allows
quick authoring of cross-platform shaders.< / p >
< p > Some differences between bgfx’ s shaderc flavor of GLSL and regular GLSL:< / p >
< ul class = "simple" >
2016-06-03 09:42:39 -07:00
< 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 >
2015-08-01 20:40:24 -07:00
function.< / li >
2016-06-03 09:42:39 -07:00
< 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(< value> )< / span > < / code > instead of
< code class = "docutils literal" > < span class = "pre" > vec2/3/4(< value> )< / 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 >
2015-08-01 20:40:24 -07:00
< / 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 >
2015-12-07 21:53:52 -08:00
< div class = "section" id = "building-shaders" >
< h3 > Building shaders< a class = "headerlink" href = "#building-shaders" title = "Permalink to this headline" > ¶< / a > < / h3 >
< p > Shaders must be compiled for all renderers by using < cite > shaderc< / cite > tool. Makefile to simplify building
shaders is provided in examples. D3D9 and D3D11 shaders can be only compiled on Windows.< / p >
< / div >
2015-08-01 20:40:24 -07:00
< / 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 >
2016-02-23 22:40:08 -08:00
< p > Convert PNG, TGA, DDS, KTX, PVR texture into bgfx supported texture formats.< / p >
2015-08-01 20:40:24 -07:00
< / div >
2016-04-29 09:43:23 -07:00
< 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 >
< p > Texture viewer.< / p >
2015-08-01 20:40:24 -07:00
< / div >
< / div >
2016-05-16 08:59:36 -07:00
< / div >
2015-08-01 20:40:24 -07:00
< / div >
< footer >
< div class = "rst-footer-buttons" role = "navigation" aria-label = "footer navigation" >
2015-08-02 15:05:48 -07:00
< a href = "license.html" class = "btn btn-neutral float-right" title = "License" accesskey = "n" > Next < span class = "fa fa-arrow-circle-right" > < / span > < / a >
2015-08-01 20:40:24 -07:00
< a href = "bgfx.html" class = "btn btn-neutral" title = "API Reference" accesskey = "p" > < span class = "fa fa-arrow-circle-left" > < / span > Previous< / a >
< / div >
< hr / >
< div role = "contentinfo" >
< p >
2016-01-01 11:55:15 -08:00
© Copyright 2010-2016, Branimir Karadžić.
2016-05-16 08:59:36 -07:00
2015-08-01 20:40:24 -07:00
< / p >
2016-05-16 08:59:36 -07:00
< / div >
2015-08-01 20:40:24 -07:00
< / footer >
< / div >
< / div >
< / section >
< / div >
< script type = "text/javascript" >
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false
};
< / script >
< script type = "text/javascript" src = "_static/jquery.js" > < / script >
< script type = "text/javascript" src = "_static/underscore.js" > < / script >
< script type = "text/javascript" src = "_static/doctools.js" > < / script >
< script type = "text/javascript" src = "_static/js/theme.js" > < / script >
< script type = "text/javascript" >
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
< / script >
< / body >
< / html >