Begin2D doesn't need a return type anymore

This was to tell the caller that software 2D was in use, but that doesn't exist anymore
This commit is contained in:
Christoph Oelckers 2018-04-27 09:58:19 +02:00
parent 90a1614ac8
commit bbea6e7e3c
7 changed files with 9 additions and 8 deletions

View File

@ -11,7 +11,9 @@
#include "r_data/colormaps.h"
#include "hwrenderer/scene/hw_drawstructs.h"
#ifdef _MSC_VER
#pragma warning(disable:4244)
#endif
struct GLHorizonInfo;
struct F3DFloor;

View File

@ -153,7 +153,7 @@ bool GLWall::SetupLights(FDynLightData &lightdata)
void FDrawInfo::RenderWall(GLWall *wall, int textured)
{
assert(vertcount > 0);
assert(wall->vertcount > 0);
gl_RenderState.Apply();
gl_RenderState.ApplyLightIndex(wall->dynlightindex);
GLRenderer->mVBO->RenderArray(GL_TRIANGLE_FAN, wall->vertindex, wall->vertcount);

View File

@ -481,10 +481,9 @@ void OpenGLFrameBuffer::SetClearColor(int color)
//
//
//==========================================================================
bool OpenGLFrameBuffer::Begin2D(bool copy3d)
void OpenGLFrameBuffer::Begin2D(bool copy3d)
{
Super::Begin2D(copy3d);
ClearClipRect();
gl_RenderState.mViewMatrix.loadIdentity();
gl_RenderState.mProjectionMatrix.ortho(0, GetWidth(), GetHeight(), 0, -1.0f, 1.0f);
gl_RenderState.ApplyMatrices();
@ -503,7 +502,6 @@ bool OpenGLFrameBuffer::Begin2D(bool copy3d)
if (GLRenderer != NULL)
GLRenderer->Begin2D();
return true;
}
//===========================================================================

View File

@ -34,7 +34,7 @@ public:
PalEntry *GetPalette () override;
bool SetFlash(PalEntry rgb, int amount) override;
void GetFlash(PalEntry &rgb, int &amount) override;
bool Begin2D(bool copy3d) override;
void Begin2D(bool copy3d) override;
void GameRestart() override;
void InitForLevel() override;
void SetClearColor(int color) override;

View File

@ -9,7 +9,9 @@
#include "textures/textures.h"
#include "r_data/colormaps.h"
#ifdef _MSC_VER
#pragma warning(disable:4244)
#endif
struct GLHorizonInfo;
struct GLSkyInfo;

View File

@ -859,11 +859,10 @@ void DFrameBuffer::SetBlendingRect (int x1, int y1, int x2, int y2)
//
//==========================================================================
bool DFrameBuffer::Begin2D (bool copy3d)
void DFrameBuffer::Begin2D (bool copy3d)
{
isIn2D = true;
ClearClipRect();
return false;
}
//==========================================================================

View File

@ -385,7 +385,7 @@ public:
// Begin 2D drawing operations.
// Returns true if hardware-accelerated 2D has been entered, false if not.
virtual bool Begin2D(bool copy3d);
virtual void Begin2D(bool copy3d);
void End2D() { isIn2D = false; }
// Returns true if Begin2D has been called and 2D drawing is now active