mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-01 02:56:28 +03:00
I made some structural changes, and i'm trying to encapsulate a little the renderer to in a future implement an OpenGL3 render, and remove the fixed pipeline.
This commit is contained in:
@@ -105,15 +105,15 @@ void cBatchRenderer::Flush() {
|
||||
}
|
||||
|
||||
if ( CreateMatrix ) {
|
||||
glLoadIdentity();
|
||||
glPushMatrix();
|
||||
GLi->LoadIdentity();
|
||||
GLi->PushMatrix();
|
||||
|
||||
glTranslatef( mPosition.x, mPosition.y, 0.0f);
|
||||
GLi->Translatef( mPosition.x, mPosition.y, 0.0f);
|
||||
|
||||
glTranslatef( mCenter.x, mCenter.y, 0.0f);
|
||||
glRotatef( mRotation, 0.0f, 0.0f, 1.0f );
|
||||
glScalef( mScale, mScale, 1.0f );
|
||||
glTranslatef( -mCenter.x, -mCenter.y, 0.0f);
|
||||
GLi->Translatef( mCenter.x, mCenter.y, 0.0f);
|
||||
GLi->Rotatef( mRotation, 0.0f, 0.0f, 1.0f );
|
||||
GLi->Scalef( mScale, mScale, 1.0f );
|
||||
GLi->Translatef( -mCenter.x, -mCenter.y, 0.0f);
|
||||
}
|
||||
|
||||
glVertexPointer(2, GL_FLOAT, sizeof(eeVertex), reinterpret_cast<char*> ( &mVertex[0] ) );
|
||||
@@ -130,7 +130,7 @@ void cBatchRenderer::Flush() {
|
||||
}
|
||||
|
||||
if ( CreateMatrix )
|
||||
glPopMatrix();
|
||||
GLi->PopMatrix();
|
||||
|
||||
if ( mCurrentMode == DM_POINTS && mTexture > 0 ) {
|
||||
glDisable( GL_POINT_SPRITE_ARB );
|
||||
|
||||
Reference in New Issue
Block a user