- cleanup of the 2D interface.
Lots of this was still laid out for DirectDraw. This removes most of Begin2D so that it can be done more cleanlz. Note that this commit renders weapon sprites and screen blends incorrectly. Those will be fixed in an upcoming commit.
This commit is contained in:
parent
1345c8e7b4
commit
67cb6e63b5
10 changed files with 42 additions and 89 deletions
|
|
@ -44,8 +44,6 @@
|
|||
|
||||
EXTERN_CVAR (Bool, vid_vsync)
|
||||
|
||||
CVAR(Bool, gl_aalines, false, CVAR_ARCHIVE)
|
||||
|
||||
FGLRenderer *GLRenderer;
|
||||
|
||||
void gl_LoadExtensions();
|
||||
|
|
@ -140,7 +138,6 @@ void OpenGLFrameBuffer::InitializeState()
|
|||
|
||||
GLRenderer->Initialize(GetWidth(), GetHeight());
|
||||
GLRenderer->SetOutputViewport(nullptr);
|
||||
Begin2D(false);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -157,8 +154,6 @@ void OpenGLFrameBuffer::Update()
|
|||
return;
|
||||
}
|
||||
|
||||
Begin2D(false);
|
||||
|
||||
DrawRateStuff();
|
||||
GLRenderer->Flush();
|
||||
|
||||
|
|
@ -442,32 +437,10 @@ void OpenGLFrameBuffer::SetClearColor(int color)
|
|||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
void OpenGLFrameBuffer::Begin2D(bool copy3d)
|
||||
void OpenGLFrameBuffer::BeginFrame()
|
||||
{
|
||||
Super::Begin2D(copy3d);
|
||||
gl_RenderState.mViewMatrix.loadIdentity();
|
||||
gl_RenderState.mProjectionMatrix.ortho(0, GetWidth(), GetHeight(), 0, -1.0f, 1.0f);
|
||||
gl_RenderState.ApplyMatrices();
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
// Korshun: ENABLE AUTOMAP ANTIALIASING!!!
|
||||
if (gl_aalines)
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
else
|
||||
{
|
||||
glDisable(GL_MULTISAMPLE);
|
||||
glDisable(GL_LINE_SMOOTH);
|
||||
glLineWidth(1.0);
|
||||
}
|
||||
|
||||
if (GLRenderer != NULL)
|
||||
GLRenderer->Begin2D();
|
||||
if (GLRenderer != nullptr)
|
||||
GLRenderer->BeginFrame();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue