diff options
author | 2023-09-05 17:10:24 +0200 | |
---|---|---|
committer | 2023-09-06 01:10:24 +1000 | |
commit | 1c61ccfe840cdae7a9f92292946a45f3b47e2412 (patch) | |
tree | b56d4b69b96e314abcf56407da44705a602727f1 /3rdparty/bgfx/examples/07-callback/callback.cpp | |
parent | b2c399c61d65063ae95e8387d34b098e9516b1a9 (diff) |
Updated bgfx, bx and bimg to current upstream versions. (#11493)
* Reverted "macOS, iOS: Removed OpenGL/OpenGLES support. (commit 4693983242a698eaafed87faf4ffef1789adc8f9).
* Reverted "Fix macOS build" (commit ce2c2c13eda7d699051f75f598e740a447343a88).
* Reverted "macOS: Fixed deprecated warnings." (commit 10a8cb61f882ebc9bb376ee2341d003880b7037f).
* Added bgfx/README.mame explaining deviations from upstream.
Diffstat (limited to '3rdparty/bgfx/examples/07-callback/callback.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/07-callback/callback.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/3rdparty/bgfx/examples/07-callback/callback.cpp b/3rdparty/bgfx/examples/07-callback/callback.cpp index 418b2a96eae..2b7f59c8bfb 100644 --- a/3rdparty/bgfx/examples/07-callback/callback.cpp +++ b/3rdparty/bgfx/examples/07-callback/callback.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022 Branimir Karadzic. All rights reserved. + * Copyright 2011-2023 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE */ @@ -202,7 +202,7 @@ struct BgfxCallback : public bgfx::CallbackI m_writer = BX_NEW(entry::getAllocator(), AviWriter)(entry::getFileWriter() ); if (!m_writer->open("temp/capture.avi", _width, _height, 60, _yflip) ) { - BX_DELETE(entry::getAllocator(), m_writer); + bx::deleteObject(entry::getAllocator(), m_writer); m_writer = NULL; } } @@ -212,7 +212,7 @@ struct BgfxCallback : public bgfx::CallbackI if (NULL != m_writer) { m_writer->close(); - BX_DELETE(entry::getAllocator(), m_writer); + bx::deleteObject(entry::getAllocator(), m_writer); m_writer = NULL; } } @@ -257,7 +257,7 @@ public: } else { - bx::alignedFree(this, _ptr, _align, _file, _line); + bx::alignedFree(this, _ptr, _align, bx::Location(_file, _line) ); } } @@ -274,7 +274,7 @@ public: return ptr; } - return bx::alignedAlloc(this, _size, _align, _file, _line); + return bx::alignedAlloc(this, _size, _align, bx::Location(_file, _line) ); } if (kNaturalAlignment >= _align) @@ -292,7 +292,7 @@ public: return ptr; } - return bx::alignedRealloc(this, _ptr, _size, _align, _file, _line); + return bx::alignedRealloc(this, _ptr, _size, _align, bx::Location(_file, _line) ); } void dumpStats() const @@ -331,6 +331,7 @@ 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; |