mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +00:00
read front buffer
This commit is contained in:
parent
7456aa745c
commit
2785ecd25f
|
@ -459,6 +459,11 @@ static void TestPolygonHeaderBits(IEmulator *Emu)
|
||||||
0xffffff60,
|
0xffffff60,
|
||||||
0xff0300ff // not sure about contour and luminous
|
0xff0300ff // not sure about contour and luminous
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GLint readBuffer;
|
||||||
|
glGetIntegerv(GL_READ_BUFFER, &readBuffer);
|
||||||
|
glReadBuffer(GL_FRONT);
|
||||||
|
|
||||||
// Render separate image for each unknown bit
|
// Render separate image for each unknown bit
|
||||||
g_forceFlushModels = true;
|
g_forceFlushModels = true;
|
||||||
for (int idx = 0; idx < 7; idx++)
|
for (int idx = 0; idx < 7; idx++)
|
||||||
|
@ -471,13 +476,14 @@ static void TestPolygonHeaderBits(IEmulator *Emu)
|
||||||
if ((unknownPolyBits[idx] & mask))
|
if ((unknownPolyBits[idx] & mask))
|
||||||
{
|
{
|
||||||
Emu->RenderFrame();
|
Emu->RenderFrame();
|
||||||
SDL_GL_SwapBuffers(); // swap the buffer second time to get back rendered frame
|
|
||||||
std::string file = Util::Format() << "Analysis/" << GetFileBaseName(s_gfxStatePath) << "." << idx << "_" << Util::Hex(mask) << ".bmp";
|
std::string file = Util::Format() << "Analysis/" << GetFileBaseName(s_gfxStatePath) << "." << idx << "_" << Util::Hex(mask) << ".bmp";
|
||||||
SaveFrameBuffer(file);
|
SaveFrameBuffer(file);
|
||||||
SDL_GL_SwapBuffers(); // show some visual feedback
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glReadBuffer(readBuffer);
|
||||||
|
|
||||||
// Generate the HTML GUI
|
// Generate the HTML GUI
|
||||||
std::string file = Util::Format() << "Analysis/_" << GetFileBaseName(s_gfxStatePath) << ".html";
|
std::string file = Util::Format() << "Analysis/_" << GetFileBaseName(s_gfxStatePath) << ".html";
|
||||||
std::ofstream fs(file);
|
std::ofstream fs(file);
|
||||||
|
|
Loading…
Reference in a new issue