texturev: Added texture info to title bar.

This commit is contained in:
Branimir Karadžić 2016-04-23 12:25:05 -07:00
parent c869e48248
commit f1501a686c
1 changed files with 12 additions and 2 deletions

View File

@ -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();