Remove verbose debug logs from drawText
Eliminate periodic and per-frame debug prints to reduce console noise and apply minor whitespace/formatting cleanup across VulkanRenderer.cpp
This commit is contained in:
parent
6722ed4d5c
commit
cfd97e76ba
|
|
@ -2651,11 +2651,6 @@ void VulkanRenderer::drawText(VkCommandBuffer commandBuffer, int frameCount,
|
|||
bool paintingEnabled, const std::string& lockInfo)
|
||||
{
|
||||
static int textDebugCounter = 0;
|
||||
if (textDebugCounter++ % 300 == 0) { // Every ~5 seconds at 60fps
|
||||
std::cout << "drawText called: charMap=" << m_charInfoMap.size()
|
||||
<< " pipeline=" << (m_textPipeline != VK_NULL_HANDLE ? "OK" : "NULL")
|
||||
<< " fontTexView=" << (m_fontTextureView != VK_NULL_HANDLE ? "OK" : "NULL") << std::endl;
|
||||
}
|
||||
|
||||
if (m_charInfoMap.empty() || m_textPipeline == VK_NULL_HANDLE) {
|
||||
if (textDebugCounter % 300 == 1) {
|
||||
|
|
@ -2664,8 +2659,6 @@ void VulkanRenderer::drawText(VkCommandBuffer commandBuffer, int frameCount,
|
|||
return; // Text rendering not available
|
||||
}
|
||||
|
||||
// 使用 host-visible buffers 后,每帧更新成本很低(只是 memcpy),无需缓存
|
||||
|
||||
// Bind text pipeline
|
||||
vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_textPipeline);
|
||||
|
||||
|
|
@ -2781,17 +2774,6 @@ void VulkanRenderer::drawText(VkCommandBuffer commandBuffer, int frameCount,
|
|||
return;
|
||||
}
|
||||
|
||||
if (textDebugCounter % 300 == 1) {
|
||||
std::cout << "Drawing text with " << vertices.size() << " vertices, "
|
||||
<< indices.size() << " indices" << std::endl;
|
||||
std::cout << "Window size: " << m_width << "x" << m_height << std::endl;
|
||||
if (!vertices.empty()) {
|
||||
std::cout << "First vertex pos: (" << vertices[0].pos[0] << ", " << vertices[0].pos[1] << ")" << std::endl;
|
||||
std::cout << "First vertex color: (" << vertices[0].color[0] << ", " << vertices[0].color[1]
|
||||
<< ", " << vertices[0].color[2] << ", " << vertices[0].color[3] << ")" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// 首次创建 text buffers(使用 host-visible 内存)
|
||||
if (m_textVertexBuffer == VK_NULL_HANDLE) {
|
||||
VkDeviceSize textVertexSize = sizeof(Vertex) * 4096; // 预分配足够空间
|
||||
|
|
|
|||
Loading…
Reference in New Issue