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 57d594155f6..68815ba347d 100644
--- a/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
+++ b/3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
- * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
+ * Copyright 2011-2022 Branimir Karadzic. All rights reserved.
+ * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
*/
#include <bx/uint32_t.h>
@@ -15,8 +15,8 @@ namespace
class ExampleHelloWorld : public entry::AppI
{
public:
- ExampleHelloWorld(const char* _name, const char* _description)
- : entry::AppI(_name, _description)
+ ExampleHelloWorld(const char* _name, const char* _description, const char* _url)
+ : entry::AppI(_name, _description, _url)
{
}
@@ -32,6 +32,9 @@ public:
bgfx::Init init;
init.type = args.m_type;
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;
@@ -129,4 +132,9 @@ public:
} // namespace
-ENTRY_IMPLEMENT_MAIN(ExampleHelloWorld, "00-helloworld", "Initialization and debug text.");
+ENTRY_IMPLEMENT_MAIN(
+ ExampleHelloWorld
+ , "00-helloworld"
+ , "Initialization and debug text."
+ , "https://bkaradzic.github.io/bgfx/examples.html#helloworld"
+ );