mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- removed several unused variables from OpenGLFrameBuffer.
- removed the LastCamera logic in RenderView. This code predates the first GZDoom release and apparently was only added because back then R_SetupFrame was not fully compatible with the hardware renderer. Today it is not needed anymore.
This commit is contained in:
parent
9e70771da3
commit
8e2ebe15fe
3 changed files with 6 additions and 36 deletions
|
@ -897,17 +897,8 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo
|
|||
|
||||
void FGLRenderer::RenderView (player_t* player)
|
||||
{
|
||||
OpenGLFrameBuffer* GLTarget = static_cast<OpenGLFrameBuffer*>(screen);
|
||||
AActor *&LastCamera = GLTarget->LastCamera;
|
||||
|
||||
checkBenchActive();
|
||||
if (player->camera != LastCamera)
|
||||
{
|
||||
// If the camera changed don't interpolate
|
||||
// Otherwise there will be some not so nice effects.
|
||||
R_ResetViewInterpolation();
|
||||
LastCamera=player->camera;
|
||||
}
|
||||
|
||||
gl_RenderState.SetVertexBuffer(mVBO);
|
||||
GLRenderer->mVBO->Reset();
|
||||
|
|
|
@ -93,7 +93,6 @@ OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, int width, int height, int
|
|||
memcpy (SourcePalette, GPalette.BaseColors, sizeof(PalEntry)*256);
|
||||
UpdatePalette ();
|
||||
ScreenshotBuffer = NULL;
|
||||
LastCamera = NULL;
|
||||
|
||||
InitializeState();
|
||||
mDebug = std::make_shared<FGLDebug>();
|
||||
|
@ -101,8 +100,6 @@ OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, int width, int height, int
|
|||
gl_SetupMenu();
|
||||
gl_GenerateGlobalBrightmapFromColormap();
|
||||
DoSetGamma();
|
||||
needsetgamma = true;
|
||||
swapped = false;
|
||||
Accel2D = true;
|
||||
}
|
||||
|
||||
|
@ -178,7 +175,6 @@ void OpenGLFrameBuffer::Update()
|
|||
GLRenderer->Flush();
|
||||
|
||||
Swap();
|
||||
swapped = false;
|
||||
Unlock();
|
||||
CheckBench();
|
||||
|
||||
|
@ -215,15 +211,9 @@ void OpenGLFrameBuffer::Swap()
|
|||
Finish.Reset();
|
||||
Finish.Clock();
|
||||
if (swapbefore) glFinish();
|
||||
if (needsetgamma)
|
||||
{
|
||||
//DoSetGamma();
|
||||
needsetgamma = false;
|
||||
}
|
||||
SwapBuffers();
|
||||
if (!swapbefore) glFinish();
|
||||
Finish.Unclock();
|
||||
swapped = true;
|
||||
camtexcount = 0;
|
||||
FHardwareTexture::UnbindAll();
|
||||
mDebug->Update();
|
||||
|
@ -565,7 +555,6 @@ void OpenGLFrameBuffer::GameRestart()
|
|||
memcpy (SourcePalette, GPalette.BaseColors, sizeof(PalEntry)*256);
|
||||
UpdatePalette ();
|
||||
ScreenshotBuffer = NULL;
|
||||
LastCamera = NULL;
|
||||
gl_GenerateGlobalBrightmapFromColormap();
|
||||
}
|
||||
|
||||
|
|
|
@ -85,18 +85,13 @@ public:
|
|||
|
||||
void SetVSync(bool vsync);
|
||||
|
||||
int palette_brightness; // brightness of the active palette - this is used for screen blends
|
||||
bool HWGammaActive = false; // Are we using hardware or software gamma?
|
||||
std::shared_ptr<FGLDebug> mDebug; // Debug API
|
||||
private:
|
||||
PalEntry Flash;
|
||||
|
||||
// Texture creation info
|
||||
int cm;
|
||||
int translation;
|
||||
bool iscomplex;
|
||||
bool needsetgamma;
|
||||
bool swapped;
|
||||
|
||||
PalEntry SourcePalette[256];
|
||||
uint8_t *ScreenshotBuffer;
|
||||
PalEntry Flash; // Only needed to support some cruft in the interface that only makes sense for the software renderer
|
||||
PalEntry SourcePalette[256]; // This is where unpaletted textures get their palette from
|
||||
uint8_t *ScreenshotBuffer; // What the name says. This must be maintained because the software renderer can return a locked canvas surface which the caller cannot release.
|
||||
|
||||
class Wiper
|
||||
{
|
||||
|
@ -120,13 +115,8 @@ private:
|
|||
FHardwareTexture *wipestartscreen;
|
||||
FHardwareTexture *wipeendscreen;
|
||||
|
||||
bool HWGammaActive = false;
|
||||
|
||||
std::shared_ptr<FGLDebug> mDebug;
|
||||
|
||||
public:
|
||||
AActor * LastCamera;
|
||||
int palette_brightness;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue