mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Fixed PrimitiveDrawable rendering on GLES2.
--HG-- branch : dev
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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() ) {
|
||||
|
||||
Reference in New Issue
Block a user