Skip to content

Commit

Permalink
croak if auto-glewInit fails - fix #43 fix #36
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Sep 16, 2024
1 parent cc91668 commit da61210
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/generate-XS.pl
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,12 @@ sub generate_glew_xs {
my $res = $decl . <<XS;
CODE:
if ( ! _done_glewInit ) {
GLenum err;
glewExperimental = GL_TRUE;
glewInit() || _done_glewInit++;
err = glewInit();
if (GLEW_OK != err)
croak("Error: %s", glewGetErrorString(err));
_done_glewInit++;
}
$error_check
XS
Expand Down

0 comments on commit da61210

Please sign in to comment.