Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@vividsnow
Last active December 12, 2015 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vividsnow/8f861f609939c9d55334 to your computer and use it in GitHub Desktop.
Save vividsnow/8f861f609939c9d55334 to your computer and use it in GitHub Desktop.
opengl w/ threaded perl
Bareword "GLUT_RGBA" not allowed while "strict subs" in use at tmp/req_opengl.pl line 10.
Bareword "GLUT_DOUBLE" not allowed while "strict subs" in use at tmp/req_opengl.pl line 10.
Bareword "GLUT_ALPHA" not allowed while "strict subs" in use at tmp/req_opengl.pl line 10.
Bareword "GLUT_DEPTH" not allowed while "strict subs" in use at tmp/req_opengl.pl line 10.
use strict;
use warnings;
require OpenGL;
OpenGL->import(':all');
glutInit();
glutInitDisplayMode(GLUT_RGBA|GLUT_DOUBLE|GLUT_ALPHA|GLUT_DEPTH);
use strict;
use warnings;
use threads;
threads->create(sub {
require OpenGL;
OpenGL->import(':all');
glutInit();
glutInitDisplayMode(GLUT_RGBA|GLUT_DOUBLE|GLUT_ALPHA|GLUT_DEPTH);
})->detach;
# adding () after constant names or
require OpenGL;
OpenGL->import(qw(:glfunctions :glconstants));
require subs;
subs->import(@{$OpenGL::EXPORT_TAGS{glconstants}});
# not worked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment