Fixed PrimitiveDrawable rendering on GLES2.

--HG--
branch : dev
This commit is contained in:
Martí­n Lucas Golini
2017-12-08 00:52:37 -03:00
parent 947b81f069
commit 9fe6d6c1a2
2 changed files with 3 additions and 3 deletions

View File

@@ -85,7 +85,7 @@ void PrimitiveDrawable::onPositionChange() {
void PrimitiveDrawable::prepareVertexBuffer( const EE_DRAW_MODE& drawableType ) {
if ( mRecreateVertexBuffer ) {
eeSAFE_DELETE( mVertexBuffer );
mVertexBuffer = VertexBuffer::NewVertexArray( VERTEX_FLAGS_PRIMITIVE, drawableType );
mVertexBuffer = VertexBuffer::New( VERTEX_FLAGS_PRIMITIVE, drawableType );
mRecreateVertexBuffer = false;
}

View File

@@ -131,11 +131,11 @@ void VertexBufferVBO::draw() {
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER, mElementHandle );
glDrawElements( mDrawType, lSize, GL_UNSIGNED_INT, (char*)NULL );
GLi->drawElements( mDrawType, lSize, GL_UNSIGNED_INT, (char*)NULL );
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER, 0 );
} else {
glDrawArrays( mDrawType, 0, getVertexCount() );
GLi->drawArrays( mDrawType, 0, getVertexCount() );
}
if ( GLv_3CP == GLi->version() ) {