mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Added ANSI escape codes for debug text. Added info about backbuffer and debug text width/height.
This commit is contained in:
@@ -65,6 +65,16 @@ class ExampleHelloWorld : public entry::AppI
|
||||
bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/00-helloworld");
|
||||
bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Initialization and debug text.");
|
||||
|
||||
bgfx::dbgTextPrintf(0, 4, 0x0f, "Color can be changed with ANSI \e[9;me\e[10;ms\e[11;mc\e[12;ma\e[13;mp\e[14;me\e[0m code too.");
|
||||
|
||||
const bgfx::Stats* stats = bgfx::getStats();
|
||||
bgfx::dbgTextPrintf(0, 6, 0x0f, "Backbuffer %dW x %dH in pixels, debug text %dW x %dH in characters."
|
||||
, stats->width
|
||||
, stats->height
|
||||
, stats->textWidth
|
||||
, stats->textHeight
|
||||
);
|
||||
|
||||
// Advance to next frame. Rendering thread will be kicked to
|
||||
// process submitted rendering primitives.
|
||||
bgfx::frame();
|
||||
|
||||
Reference in New Issue
Block a user