mirror of https://github.com/bkaradzic/bgfx
texturev: Added texture info to title bar.
This commit is contained in:
parent
c869e48248
commit
f1501a686c
|
@ -27,6 +27,8 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
namespace stl = tinystl;
|
namespace stl = tinystl;
|
||||||
|
|
||||||
|
#include "image.h"
|
||||||
|
|
||||||
struct Binding
|
struct Binding
|
||||||
{
|
{
|
||||||
enum Enum
|
enum Enum
|
||||||
|
@ -534,8 +536,6 @@ int _main_(int _argc, char** _argv)
|
||||||
fileIndex = view.m_fileIndex;
|
fileIndex = view.m_fileIndex;
|
||||||
|
|
||||||
filePath = view.m_fileList[view.m_fileIndex].c_str();
|
filePath = view.m_fileList[view.m_fileIndex].c_str();
|
||||||
entry::WindowHandle handle = { 0 };
|
|
||||||
entry::setWindowTitle(handle, filePath);
|
|
||||||
|
|
||||||
texture = loadTexture(filePath
|
texture = loadTexture(filePath
|
||||||
, 0
|
, 0
|
||||||
|
@ -545,6 +545,16 @@ int _main_(int _argc, char** _argv)
|
||||||
, 0
|
, 0
|
||||||
, &view.m_info
|
, &view.m_info
|
||||||
);
|
);
|
||||||
|
|
||||||
|
std::string title;
|
||||||
|
bx::stringPrintf(title, "%s (%d x %d, %s)"
|
||||||
|
, filePath
|
||||||
|
, view.m_info.width
|
||||||
|
, view.m_info.height
|
||||||
|
, bgfx::getName(view.m_info.format)
|
||||||
|
);
|
||||||
|
entry::WindowHandle handle = { 0 };
|
||||||
|
entry::setWindowTitle(handle, title.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t now = bx::getHPCounter();
|
int64_t now = bx::getHPCounter();
|
||||||
|
|
Loading…
Reference in New Issue