summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-09-08 05:14:35 +1000
committer Vas Crabb <vas@vastheman.com>2023-09-08 05:14:35 +1000
commit44eb5ea3c69dcec37e2b687e479297af5303efc3 (patch)
tree2784753bdf56564ce3b4cf0f410bf07709854fdd /3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
parent1147d8fc44c701ed0235e9374f97d218fae37b32 (diff)
Revert "Updated bgfx, bx and bimg to current upstream versions. (#11493)"
This reverts commit 1c61ccfe840cdae7a9f92292946a45f3b47e2412.
Diffstat (limited to '3rdparty/bgfx/examples/00-helloworld/helloworld.cpp')
-rw-r--r--3rdparty/bgfx/examples/00-helloworld/helloworld.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp b/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
index 8b989195207..97a79463357 100644
--- a/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
+++ b/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2023 Branimir Karadzic. All rights reserved.
+ * Copyright 2011-2022 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
*/
@@ -34,7 +34,6 @@ public:
init.vendorId = args.m_pciId;
init.platformData.nwh = entry::getNativeWindowHandle(entry::kDefaultWindowHandle);
init.platformData.ndt = entry::getNativeDisplayHandle();
- init.platformData.type = entry::getNativeWindowHandleType(entry::kDefaultWindowHandle);
init.resolution.width = m_width;
init.resolution.height = m_height;
init.resolution.reset = m_reset;
@@ -91,12 +90,9 @@ public:
// Use debug font to print information about this example.
bgfx::dbgTextClear();
-
- const bgfx::Stats* stats = bgfx::getStats();
-
bgfx::dbgTextImage(
- bx::max<uint16_t>(uint16_t(stats->textWidth/2), 20)-20
- , bx::max<uint16_t>(uint16_t(stats->textHeight/2), 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
@@ -107,6 +103,7 @@ public:
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
, stats->height