diff options
author | 2015-11-01 20:30:24 +0100 | |
---|---|---|
committer | 2015-11-01 20:30:24 +0100 | |
commit | 5664971d3bf57ad7e1a7a3138f788f714c0d7d74 (patch) | |
tree | f64fdaa35a890c4c7052f5fd173b3d0d3668a4ed /3rdparty/bgfx/examples/21-deferred/deferred.cpp | |
parent | 99c12e17c40fecb16e1ef0dc2fae0d45a86def59 (diff) |
update to latest BGFX and BX
Diffstat (limited to '3rdparty/bgfx/examples/21-deferred/deferred.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/21-deferred/deferred.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/3rdparty/bgfx/examples/21-deferred/deferred.cpp b/3rdparty/bgfx/examples/21-deferred/deferred.cpp index 019b8920518..f1201363036 100644 --- a/3rdparty/bgfx/examples/21-deferred/deferred.cpp +++ b/3rdparty/bgfx/examples/21-deferred/deferred.cpp @@ -215,14 +215,16 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf class Deferred : public entry::AppI { - void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE + void init(int _argc, char** _argv) BX_OVERRIDE { - m_width = 1280; + Args args(_argc, _argv); + + m_width = 1280; m_height = 720; - m_debug = BGFX_DEBUG_TEXT; - m_reset = BGFX_RESET_VSYNC; + m_debug = BGFX_DEBUG_TEXT; + m_reset = BGFX_RESET_VSYNC; - bgfx::init(); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(m_width, m_height, m_reset); // Enable m_debug text. @@ -410,9 +412,9 @@ class Deferred : public entry::AppI else { if (m_oldWidth != m_width - || m_oldHeight != m_height - || m_oldReset != m_reset - || !bgfx::isValid(m_gbuffer) ) + || m_oldHeight != m_height + || m_oldReset != m_reset + || !bgfx::isValid(m_gbuffer) ) { // Recreate variable size render targets when resolution changes. m_oldWidth = m_width; |