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:
Gregory Hainaut 2015-04-25 12:48:47 +02:00
parent 15ae9996bb
commit f2f59544d2
1 changed files with 3 additions and 1 deletions

View File

@ -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();
}