mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Merge pull request #2357 from degasus/ogl_efb_poke_merge
ogl: efb poke merge
This commit is contained in:
@ -1108,23 +1108,13 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||
|
||||
case POKE_COLOR:
|
||||
{
|
||||
ResetAPIState();
|
||||
|
||||
glClearColor(float((poke_data >> 16) & 0xFF) / 255.0f,
|
||||
float((poke_data >> 8) & 0xFF) / 255.0f,
|
||||
float((poke_data >> 0) & 0xFF) / 255.0f,
|
||||
float((poke_data >> 24) & 0xFF) / 255.0f);
|
||||
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
glScissor(targetPixelRc.left, targetPixelRc.bottom, targetPixelRc.GetWidth(), targetPixelRc.GetHeight());
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
RestoreAPIState();
|
||||
|
||||
// TODO: Could just update the EFB cache with the new value
|
||||
ClearEFBCache();
|
||||
|
||||
std::vector<EfbPokeData> vector;
|
||||
EfbPokeData d;
|
||||
d.x = x;
|
||||
d.y = y;
|
||||
d.data = poke_data;
|
||||
vector.push_back(d);
|
||||
PokeEFB(type, vector);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1155,6 +1145,22 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Renderer::PokeEFB(EFBAccessType type, const std::vector<EfbPokeData>& data)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case POKE_COLOR:
|
||||
{
|
||||
FramebufferManager::PokeEFB(type, data);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
::Renderer::PokeEFB(type, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
u16 Renderer::BBoxRead(int index)
|
||||
{
|
||||
int swapped_index = index;
|
||||
|
Reference in New Issue
Block a user