-
-
Save vividsnow/8f861f609939c9d55334 to your computer and use it in GitHub Desktop.
opengl w/ threaded perl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
require OpenGL; | |
OpenGL->import(':all'); | |
glutInit(); | |
glutInitDisplayMode(GLUT_RGBA|GLUT_DOUBLE|GLUT_ALPHA|GLUT_DEPTH); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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