From 9fe6d6c1a229cbe2d6e44a6d7e093e7124df24c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=C2=ADn=20Lucas=20Golini?= Date: Fri, 8 Dec 2017 00:52:37 -0300 Subject: [PATCH] Fixed PrimitiveDrawable rendering on GLES2. --HG-- branch : dev --- src/eepp/graphics/primitivedrawable.cpp | 2 +- src/eepp/graphics/vertexbuffervbo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/eepp/graphics/primitivedrawable.cpp b/src/eepp/graphics/primitivedrawable.cpp index b4eec29cd..12bf0316d 100644 --- a/src/eepp/graphics/primitivedrawable.cpp +++ b/src/eepp/graphics/primitivedrawable.cpp @@ -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; } diff --git a/src/eepp/graphics/vertexbuffervbo.cpp b/src/eepp/graphics/vertexbuffervbo.cpp index 514d36616..c9c266ad6 100644 --- a/src/eepp/graphics/vertexbuffervbo.cpp +++ b/src/eepp/graphics/vertexbuffervbo.cpp @@ -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() ) {