Some work on the OpenGL 3 renderer.

This commit is contained in:
spartanj
2011-01-27 05:09:31 -03:00
parent a74fddc74c
commit c3ff9b474f
19 changed files with 335 additions and 119 deletions

View File

@@ -127,9 +127,15 @@ void cBatchRenderer::Flush() {
Uint32 alloc = sizeof(eeVertex) * NumVertex;
GLi->VertexPointer ( 2, GL_FLOAT , sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) , alloc );
GLi->TexCoordPointer( 2, GL_FLOAT , sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) + sizeof(eeVector2f) , alloc );
GLi->ColorPointer ( 4, GL_UNSIGNED_BYTE , sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) + sizeof(eeVector2f) + sizeof(eeTexCoord) , alloc );
if ( GLv_3 == GLi->Version() ) {
if ( NULL != mTexture )
GLi->TexCoordPointer( 2, GL_FLOAT , sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) + sizeof(eeVector2f) , alloc );
} else {
GLi->TexCoordPointer( 2, GL_FLOAT , sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) + sizeof(eeVector2f) , alloc );
}
#ifdef EE_GLES
if ( DM_QUADS == mCurrentMode ) {
GLi->DrawArrays( DM_TRIANGLES, 0, NumVertex );