Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit 6563318

Browse files
committed
always error-check framebuffer status
1 parent 11eb236 commit 6563318

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test.pl

+3-6
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ sub ourInit
380380
printf("\nUsing POGL v$OpenGL::VERSION\n");
381381

382382
# Build texture.
383-
($TextureID_image,$TextureID_FBO) = glGenTextures_p(2);
384383
ourBuildTextures();
385384
glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_DECAL);
386385

@@ -612,11 +611,9 @@ sub ourBuildTextures
612611
GL_RENDERBUFFER_EXT, $RenderBufferID);
613612

614613
# Test status
615-
if (DO_TESTS)
616-
{
617-
my $stat = glCheckFramebufferStatusEXT(GL_RENDERBUFFER_EXT);
618-
printf("FBO Status: %04X\n",$stat);
619-
}
614+
my $stat = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
615+
die "FBO Status error: " . gluErrorString(glGetError()) if !$stat;
616+
die sprintf "FBO Status: %04X", $stat if $stat != GL_FRAMEBUFFER_COMPLETE_EXT;
620617
}
621618

622619
# Select active texture

0 commit comments

Comments
 (0)