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