mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: early bind vertex array object
Creation of buffer will generate a bind in BufferStorage mode. It is just to be safe.
This commit is contained in:
parent
15ae9996bb
commit
f2f59544d2
|
@ -283,6 +283,7 @@ public:
|
|||
GSVertexBufferStateOGL(size_t stride, GSInputLayoutOGL* layout, uint32 layout_nbr)
|
||||
{
|
||||
gl_GenVertexArrays(1, &m_va);
|
||||
bind();
|
||||
|
||||
m_vb = new GSBufferOGL(GL_ARRAY_BUFFER, stride);
|
||||
m_ib = new GSBufferOGL(GL_ELEMENT_ARRAY_BUFFER, sizeof(uint32));
|
||||
|
@ -299,6 +300,7 @@ public:
|
|||
void bind()
|
||||
{
|
||||
gl_BindVertexArray(m_va);
|
||||
if (m_vb)
|
||||
m_vb->bind();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue