mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Misc]: minor fixes
This commit is contained in:
@@ -198,7 +198,7 @@ namespace MG_GL::GL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PixelStorei(GLenum pname, GLint param) {
|
void PixelStorei(GLenum pname, GLint param) {
|
||||||
MG_Util::Debug::LogD("glPixelStorei, pname: %d, param: %d", pname, param);
|
MG_Util::Debug::LogD("glPixelStorei, pname: %s, param: %d", MG_Util::Debug::GLEnumToString(pname), param);
|
||||||
GLenum result = MG_State::SetPixelStoreInt(pname,param);
|
GLenum result = MG_State::SetPixelStoreInt(pname,param);
|
||||||
if (result == GL_NO_ERROR) {
|
if (result == GL_NO_ERROR) {
|
||||||
MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_);
|
MG_Diligent::g_PSOManager.MarkPSODirty(MG_State_T::programState->currentProgram_);
|
||||||
|
|||||||
@@ -430,7 +430,6 @@ namespace MG_GL::GL {
|
|||||||
auto& programInfo = MG_Diligent::g_ProgramMap[program];
|
auto& programInfo = MG_Diligent::g_ProgramMap[program];
|
||||||
|
|
||||||
GLuint drawFB = MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER];
|
GLuint drawFB = MG_State_T::framebufferState->currentBindings_[GL_DRAW_FRAMEBUFFER];
|
||||||
if (drawFB == 0) drawFB = 0;
|
|
||||||
|
|
||||||
auto itFB = MG_Diligent::g_FramebufferMap.find(drawFB);
|
auto itFB = MG_Diligent::g_FramebufferMap.find(drawFB);
|
||||||
if (itFB == MG_Diligent::g_FramebufferMap.end()) {
|
if (itFB == MG_Diligent::g_FramebufferMap.end()) {
|
||||||
@@ -474,8 +473,6 @@ namespace MG_GL::GL {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unordered_map<GLuint, Diligent::IBuffer*> createdBuffers;
|
|
||||||
|
|
||||||
// for (const auto& [attribIndex, attrib] : pVAO->attribs) {
|
// for (const auto& [attribIndex, attrib] : pVAO->attribs) {
|
||||||
for (uint32_t attribIndex = 0; attribIndex < MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS; ++attribIndex) {
|
for (uint32_t attribIndex = 0; attribIndex < MG_Constants::VertexArray::MAX_VERTEX_ATTRIBS; ++attribIndex) {
|
||||||
const auto& attrib = pVAO->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);
|
MG_Diligent::g_pContext->UnmapBuffer(pBuffer, Diligent::MAP_WRITE);
|
||||||
bufferObj.dirty = false;
|
bufferObj.dirty = false;
|
||||||
MG_Util::Debug::LogD("Successfully updated data for dynamic buffer %u.", bufferID);
|
MG_Util::Debug::LogD("Successfully updated data for dynamic buffer %u.", bufferID);
|
||||||
createdBuffers[bufferID] = pBuffer;
|
|
||||||
} else {
|
} else {
|
||||||
MG_Util::Debug::LogE("Failed to map dynamic buffer %u for data update.", bufferID);
|
MG_Util::Debug::LogE("Failed to map dynamic buffer %u for data update.", bufferID);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ namespace MG_Util::Program {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DumpUniforms(const ProgramState& state, GLuint program) {
|
void DumpUniforms(const ProgramState& state, GLuint program) {
|
||||||
if (MG_Global::Common::LogLevel > MG_Constants::Common::LOG_LEVEL_DEBUG)
|
if constexpr (MG_Global::Common::LogLevel > MG_Constants::Common::LOG_LEVEL_DEBUG)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto* prog = state.GetProgramObject(program);
|
auto* prog = state.GetProgramObject(program);
|
||||||
|
|||||||
Reference in New Issue
Block a user