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

Commit 36dc1b4

Browse files
committed
test.pl check for errors at end
1 parent 9007df2 commit 36dc1b4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test.pl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,7 @@ sub ourBuildTextures
507507
$Tex_Width, $Tex_Height, $Tex_Format, $Tex_Size,
508508
$Tex_Pixels->ptr())))
509509
{
510-
printf STDERR "GLULib%s\n", gluErrorString($gluerr);
511-
exit(-1);
510+
die sprintf "GLULib%s\n", gluErrorString($gluerr);
512511
}
513512

514513
# Benchmarks for Image Loading
@@ -662,7 +661,7 @@ sub ourInitShaders
662661
print "Vertex Prog: $vprog\n";
663662
}
664663

665-
# Lazy Metalic Fragment shader
664+
# Lazy Metallic Fragment shader
666665
my $FragProg = qq
667666
{uniform vec4 surfacecolor;
668667
void main (void)
@@ -1580,5 +1579,12 @@ sub quit {
15801579
print "Returned from glutMainLoop\n";
15811580

15821581
print "Exiting in main thread\n";
1582+
if ($^O ne 'MSWin32') {
1583+
my $errors = '';
1584+
while((my $err = glGetError()) != 0) {
1585+
$errors .= "glError: " . gluErrorString($err) . "\n";
1586+
}
1587+
die $errors if $errors;
1588+
}
15831589

15841590
__END__

0 commit comments

Comments
 (0)