mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
This should fix the bugs introduced by my last commit please retest the games that where showing graphical glitches.
This commit is contained in:
@ -238,7 +238,7 @@ int CD3DFont::DrawTextScaled(float x, float y, float fXScale, float fYScale, flo
|
||||
return 0;
|
||||
|
||||
SetRenderStates();
|
||||
D3D::SetStreamSource(0, m_pVB, 0, sizeof(FONT2DVERTEX));
|
||||
D3D::ChangeStreamSource(0, m_pVB, 0, sizeof(FONT2DVERTEX));
|
||||
|
||||
float vpWidth = 1;
|
||||
float vpHeight = 1;
|
||||
|
@ -203,6 +203,7 @@ void VertexManager::PrepareDrawBuffers(u32 stride)
|
||||
{
|
||||
memcpy(pIndices, PIBuffer, PDataSize * sizeof(u16));
|
||||
}
|
||||
m_index_buffers[m_current_index_buffer]->Unlock();
|
||||
if(m_current_stride != stride || m_vertex_buffer_cursor == 0)
|
||||
{
|
||||
m_current_stride = stride;
|
||||
@ -212,7 +213,7 @@ void VertexManager::PrepareDrawBuffers(u32 stride)
|
||||
{
|
||||
D3D::SetIndices(m_index_buffers[m_current_index_buffer]);
|
||||
}
|
||||
m_index_buffers[m_current_index_buffer]->Unlock();
|
||||
|
||||
}
|
||||
|
||||
void VertexManager::DrawVertexBuffer(int stride)
|
||||
@ -363,7 +364,14 @@ void VertexManager::vFlush()
|
||||
}
|
||||
PrepareDrawBuffers(stride);
|
||||
g_nativeVertexFmt->SetupVertexPointers();
|
||||
if(m_buffers_count){ DrawVertexBuffer(stride);} else { DrawVertexArray(stride);}
|
||||
if(m_buffers_count)
|
||||
{
|
||||
DrawVertexBuffer(stride);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawVertexArray(stride);
|
||||
}
|
||||
|
||||
bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate &&
|
||||
bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24;
|
||||
@ -376,7 +384,14 @@ void VertexManager::vFlush()
|
||||
}
|
||||
// update alpha only
|
||||
g_renderer->ApplyState(true);
|
||||
if(m_buffers_count){ DrawVertexBuffer(stride);} else { DrawVertexArray(stride);}
|
||||
if(m_buffers_count)
|
||||
{
|
||||
DrawVertexBuffer(stride);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawVertexArray(stride);
|
||||
}
|
||||
g_renderer->RestoreState();
|
||||
}
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true);
|
||||
|
Reference in New Issue
Block a user