mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: extend device to support an offset for normal draw
This commit is contained in:
parent
cabd7409e5
commit
e972f4f4dd
|
@ -419,6 +419,13 @@ void GSDeviceOGL::DrawPrimitive()
|
|||
AfterDraw();
|
||||
}
|
||||
|
||||
void GSDeviceOGL::DrawPrimitive(int offset, int count)
|
||||
{
|
||||
BeforeDraw();
|
||||
m_va->DrawPrimitive(offset, count);
|
||||
AfterDraw();
|
||||
}
|
||||
|
||||
void GSDeviceOGL::DrawIndexedPrimitive()
|
||||
{
|
||||
BeforeDraw();
|
||||
|
|
|
@ -598,6 +598,7 @@ class GSDeviceOGL : public GSDevice
|
|||
void SetVSync(bool enable);
|
||||
|
||||
void DrawPrimitive();
|
||||
void DrawPrimitive(int offset, int count);
|
||||
void DrawIndexedPrimitive();
|
||||
void DrawIndexedPrimitive(int offset, int count);
|
||||
void BeforeDraw();
|
||||
|
|
|
@ -226,6 +226,12 @@ class GSBufferOGL {
|
|||
glDrawArrays(mode, m_start, m_count);
|
||||
}
|
||||
|
||||
void Draw(GLenum mode, int offset, int count)
|
||||
{
|
||||
glDrawArrays(mode, m_start + offset, count);
|
||||
}
|
||||
|
||||
|
||||
void Draw(GLenum mode, GLint basevertex)
|
||||
{
|
||||
gl_DrawElementsBaseVertex(mode, m_count, GL_UNSIGNED_INT, (void*)(m_start * m_stride), basevertex);
|
||||
|
@ -302,6 +308,8 @@ public:
|
|||
|
||||
void DrawPrimitive() { m_vb->Draw(m_topology); }
|
||||
|
||||
void DrawPrimitive(int offset, int count) { m_vb->Draw(m_topology, offset, count); }
|
||||
|
||||
void DrawIndexedPrimitive() { m_ib->Draw(m_topology, m_vb->GetStart() ); }
|
||||
|
||||
void DrawIndexedPrimitive(int offset, int count) { m_ib->Draw(m_topology, m_vb->GetStart(), offset, count ); }
|
||||
|
|
Loading…
Reference in New Issue