mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +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
|
@ -143,6 +143,9 @@ void FGLRenderBuffers::Setup(int width, int height, int sceneWidth, int sceneHei
|
||||||
{
|
{
|
||||||
if (!IsEnabled())
|
if (!IsEnabled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (width <= 0 || height <= 0)
|
||||||
|
I_FatalError("Requested invalid render buffer sizes: screen = %dx%d", width, height);
|
||||||
|
|
||||||
int samples = GetCvarSamples();
|
int samples = GetCvarSamples();
|
||||||
|
|
||||||
|
@ -226,6 +229,10 @@ void FGLRenderBuffers::CreatePipeline(int width, int height)
|
||||||
void FGLRenderBuffers::CreateBloom(int width, int height)
|
void FGLRenderBuffers::CreateBloom(int width, int height)
|
||||||
{
|
{
|
||||||
ClearBloom();
|
ClearBloom();
|
||||||
|
|
||||||
|
// No scene, no bloom!
|
||||||
|
if (width <= 0 || height <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
int bloomWidth = MAX(width / 2, 1);
|
int bloomWidth = MAX(width / 2, 1);
|
||||||
int bloomHeight = MAX(height / 2, 1);
|
int bloomHeight = MAX(height / 2, 1);
|
||||||
|
|
Loading…
Reference in a new issue