summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/21-deferred/deferred.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/21-deferred/deferred.cpp')
-rw-r--r--3rdparty/bgfx/examples/21-deferred/deferred.cpp18
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;