mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
First render may not have known scene dimensions
This commit is contained in:
parent
af62352860
commit
94b72d25e9
1 changed files with 7 additions and 0 deletions
|
@ -144,6 +144,9 @@ void FGLRenderBuffers::Setup(int width, int height, int sceneWidth, int sceneHei
|
|||
if (!IsEnabled())
|
||||
return;
|
||||
|
||||
if (width <= 0 || height <= 0)
|
||||
I_FatalError("Requested invalid render buffer sizes: screen = %dx%d", width, height);
|
||||
|
||||
int samples = GetCvarSamples();
|
||||
|
||||
if (width == mWidth && height == mHeight && mSamples != samples)
|
||||
|
@ -227,6 +230,10 @@ void FGLRenderBuffers::CreateBloom(int width, int height)
|
|||
{
|
||||
ClearBloom();
|
||||
|
||||
// No scene, no bloom!
|
||||
if (width <= 0 || height <= 0)
|
||||
return;
|
||||
|
||||
int bloomWidth = MAX(width / 2, 1);
|
||||
int bloomHeight = MAX(height / 2, 1);
|
||||
for (int i = 0; i < NumBloomLevels; i++)
|
||||
|
|
Loading…
Reference in a new issue