- use a software buffer for immediate mode rendering. This allows using the regular buffer code to collect data for both render modes and allows removal of a lot of duplicated code.
This commit is contained in:
parent
5b302ed3a6
commit
3644073bbd
12 changed files with 232 additions and 636 deletions
|
|
@ -617,28 +617,16 @@ static void FillScreen()
|
|||
gl_RenderState.EnableAlphaTest(false);
|
||||
gl_RenderState.EnableTexture(false);
|
||||
gl_RenderState.Apply();
|
||||
if (!gl_usevbo)
|
||||
{
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glVertex2f(0.0f, 0.0f);
|
||||
glVertex2f(0.0f, (float)SCREENHEIGHT);
|
||||
glVertex2f((float)SCREENWIDTH, 0.0f);
|
||||
glVertex2f((float)SCREENWIDTH, (float)SCREENHEIGHT);
|
||||
glEnd();
|
||||
}
|
||||
else
|
||||
{
|
||||
FFlatVertex *ptr = GLRenderer->mVBO->GetBuffer();
|
||||
ptr->Set(0, 0, 0, 0, 0);
|
||||
ptr++;
|
||||
ptr->Set(0, (float)SCREENHEIGHT, 0, 0, 0);
|
||||
ptr++;
|
||||
ptr->Set((float)SCREENWIDTH, 0, 0, 0, 0);
|
||||
ptr++;
|
||||
ptr->Set((float)SCREENWIDTH, (float)SCREENHEIGHT, 0, 0, 0);
|
||||
ptr++;
|
||||
GLRenderer->mVBO->RenderCurrent(ptr, GL_TRIANGLE_STRIP);
|
||||
}
|
||||
FFlatVertex *ptr = GLRenderer->mVBO->GetBuffer();
|
||||
ptr->Set(0, 0, 0, 0, 0);
|
||||
ptr++;
|
||||
ptr->Set(0, (float)SCREENHEIGHT, 0, 0, 0);
|
||||
ptr++;
|
||||
ptr->Set((float)SCREENWIDTH, 0, 0, 0, 0);
|
||||
ptr++;
|
||||
ptr->Set((float)SCREENWIDTH, (float)SCREENHEIGHT, 0, 0, 0);
|
||||
ptr++;
|
||||
GLRenderer->mVBO->RenderCurrent(ptr, GL_TRIANGLE_STRIP);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue