summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/00-helloworld/helloworld.cpp')
-rw-r--r--3rdparty/bgfx/examples/00-helloworld/helloworld.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp b/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
index a66acd13fba..57d594155f6 100644
--- a/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
+++ b/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2017 Branimir Karadzic. All rights reserved.
+ * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
@@ -29,8 +29,13 @@ public:
m_debug = BGFX_DEBUG_TEXT;
m_reset = BGFX_RESET_VSYNC;
- bgfx::init(args.m_type, args.m_pciId);
- bgfx::reset(m_width, m_height, m_reset);
+ bgfx::Init init;
+ init.type = args.m_type;
+ init.vendorId = args.m_pciId;
+ init.resolution.width = m_width;
+ init.resolution.height = m_height;
+ init.resolution.reset = m_reset;
+ bgfx::init(init);
// Enable debug text.
bgfx::setDebug(m_debug);
@@ -84,8 +89,8 @@ public:
// Use debug font to print information about this example.
bgfx::dbgTextClear();
bgfx::dbgTextImage(
- bx::uint16_max(uint16_t(m_width /2/8 ), 20)-20
- , bx::uint16_max(uint16_t(m_height/2/16), 6)-6
+ bx::max<uint16_t>(uint16_t(m_width /2/8 ), 20)-20
+ , bx::max<uint16_t>(uint16_t(m_height/2/16), 6)-6
, 40
, 12
, s_logo
@@ -93,6 +98,9 @@ public:
);
bgfx::dbgTextPrintf(0, 1, 0x0f, "Color can be changed with ANSI \x1b[9;me\x1b[10;ms\x1b[11;mc\x1b[12;ma\x1b[13;mp\x1b[14;me\x1b[0m code too.");
+ bgfx::dbgTextPrintf(80, 1, 0x0f, "\x1b[;0m \x1b[;1m \x1b[; 2m \x1b[; 3m \x1b[; 4m \x1b[; 5m \x1b[; 6m \x1b[; 7m \x1b[0m");
+ bgfx::dbgTextPrintf(80, 2, 0x0f, "\x1b[;8m \x1b[;9m \x1b[;10m \x1b[;11m \x1b[;12m \x1b[;13m \x1b[;14m \x1b[;15m \x1b[0m");
+
const bgfx::Stats* stats = bgfx::getStats();
bgfx::dbgTextPrintf(0, 2, 0x0f, "Backbuffer %dW x %dH in pixels, debug text %dW x %dH in characters."
, stats->width