[Misc]: minor fixes

This commit is contained in:
2025-06-25 23:49:43 +08:00
parent 1e6f91809e
commit fa6ace0955
3 changed files with 2 additions and 6 deletions
@@ -430,7 +430,6 @@ namespace MG_GL::GL {
auto& programInfo = MG_Diligent::g_ProgramMap[program];
GLuint drawFB = MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER];
if (drawFB == 0) drawFB = 0;
auto itFB = MG_Diligent::g_FramebufferMap.find(drawFB);
if (itFB == MG_Diligent::g_FramebufferMap.end()) {
@@ -474,8 +473,6 @@ namespace MG_GL::GL {
return;
}
std::unordered_map<GLuint, Diligent::IBuffer*> createdBuffers;
// for (const auto& [attribIndex, attrib] : pVAO->attribs) {
for (uint32_t attribIndex = 0; attribIndex < MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS; ++attribIndex) {
const auto& attrib = pVAO->attribs[attribIndex];
@@ -562,7 +559,6 @@ namespace MG_GL::GL {
MG_Diligent::g_pContext->UnmapBuffer(pBuffer, Diligent::MAP_WRITE);
bufferObj.dirty = false;
MG_Util::Debug::LogD("Successfully updated data for dynamic buffer %u.", bufferID);
createdBuffers[bufferID] = pBuffer;
} else {
MG_Util::Debug::LogE("Failed to map dynamic buffer %u for data update.", bufferID);
}