This commit is contained in:
bkaradzic 2012-06-26 22:37:08 -07:00
Родитель 8dd523fa67
Коммит 1b0f2b6cbc
5 изменённых файлов: 13 добавлений и 11 удалений

Просмотреть файл

@ -345,7 +345,7 @@ namespace bgfx
///
void destroyDynamicIndexBuffer(DynamicIndexBufferHandle _handle);
//
///
DynamicVertexBufferHandle createDynamicVertexBuffer(uint16_t _num, const VertexDecl& _decl);
///

Просмотреть файл

@ -341,8 +341,6 @@ namespace bgfx
}
}
TextVideoMemBlitter g_textVideoMemBlitter;
static const char* s_predefinedName[PredefinedUniform::Count] =
{
"u_viewRect",
@ -662,7 +660,7 @@ namespace bgfx
getCommandBuffer(CommandBuffer::RendererInit);
g_textVideoMemBlitter.init();
m_textVideoMemBlitter.init();
m_submit->m_transientVb = createTransientVertexBuffer(BGFX_CONFIG_TRANSIENT_VERTEX_BUFFER_SIZE);
m_submit->m_transientIb = createTransientIndexBuffer(BGFX_CONFIG_TRANSIENT_INDEX_BUFFER_SIZE);

Просмотреть файл

@ -290,8 +290,6 @@ namespace bgfx
bgfx::MaterialHandle m_material;
};
extern TextVideoMemBlitter g_textVideoMemBlitter;
struct PredefinedUniform
{
enum Enum
@ -2714,6 +2712,8 @@ namespace bgfx
uint32_t m_frames;
uint32_t m_debug;
TextVideoMemBlitter m_textVideoMemBlitter;
#if BX_PLATFORM_WINDOWS
struct Window
{

Просмотреть файл

@ -2255,11 +2255,15 @@ namespace bgfx
next = now + bx::getHPFrequency();
double freq = double(bx::getHPFrequency() );
double toMs = 1000.0/freq;
double elapsedCpuMs = double(elapsed)*toMs;
tvm.clear();
uint16_t pos = 10;
tvm.printf(10, pos++, 0x8e, " Frame: %3.4f [ms] / %3.2f", frameTime*toMs, freq/frameTime);
tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / %3.4f [ms]", m_render->m_num, elapsed*toMs);
tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / CPU %3.4f [ms]"
, m_render->m_num
, elapsedCpuMs
);
tvm.printf(10, pos++, 0x8e, " Prims: %7d", statsNumPrims);
tvm.printf(10, pos++, 0x8e, " Indices: %7d", statsNumIndices);
tvm.printf(10, pos++, 0x8e, " DVB size: %7d", m_render->m_vboffset);
@ -2272,7 +2276,7 @@ namespace bgfx
tvm.printf(10, pos++, attr[(attrIndex+1)&1], "Render wait: %3.4f [ms]", m_render->m_waitRender*toMs);
}
g_textVideoMemBlitter.blit(tvm);
m_textVideoMemBlitter.blit(tvm);
PIX_ENDEVENT();
}
@ -2280,7 +2284,7 @@ namespace bgfx
{
PIX_BEGINEVENT(D3DCOLOR_RGBA(0x40, 0x40, 0x40, 0xff), "debugtext");
g_textVideoMemBlitter.blit(m_render->m_textVideoMem);
m_textVideoMemBlitter.blit(m_render->m_textVideoMem);
PIX_ENDEVENT();
}

Просмотреть файл

@ -2428,11 +2428,11 @@ namespace bgfx
tvm.printf(10, pos++, attr[(attrIndex+1)&1], "Render wait: %3.4f [ms]", double(m_render->m_waitRender)*toMs);
}
g_textVideoMemBlitter.blit(tvm);
m_textVideoMemBlitter.blit(tvm);
}
else if (m_render->m_debug & BGFX_DEBUG_TEXT)
{
g_textVideoMemBlitter.blit(m_render->m_textVideoMem);
m_textVideoMemBlitter.blit(m_render->m_textVideoMem);
}
GREMEDY_FRAMETERMINATOR();