… | |
… | |
54 | } |
54 | } |
55 | |
55 | |
56 | $GL_BFSEP = $GL_EXT{GL_EXT_blend_func_separate} || $GL_VERSION >= 2.0; |
56 | $GL_BFSEP = $GL_EXT{GL_EXT_blend_func_separate} || $GL_VERSION >= 2.0; |
57 | $GL_NPOT = $GL_EXT{GL_ARB_texture_non_power_of_two} || $GL_VERSION >= 2.0; |
57 | $GL_NPOT = $GL_EXT{GL_ARB_texture_non_power_of_two} || $GL_VERSION >= 2.0; |
58 | $GL_COMPRESS = $GL_EXT{GL_ARB_texture_compression} || $GL_VERSION >= 1.3; |
58 | $GL_COMPRESS = $GL_EXT{GL_ARB_texture_compression} || $GL_VERSION >= 1.3; |
59 | $GL_MULTITEX = $GL_VERSION >= 1.3; # ARB not supported, 1.3. implies 2+ units |
59 | $GL_MULTITEX = $GL_EXT{GL_ARB_multitexture} || $GL_VERSION >= 1.3; |
60 | |
60 | |
61 | $GL_COMPRESS = 0 if DC::OpenGL::gl_vendor eq "Apple Computer, Inc."; # there is no end to their suckage |
61 | $GL_COMPRESS = 0 if DC::OpenGL::gl_vendor eq "Apple Computer, Inc."; # there is no end to their suckage |
62 | |
62 | |
63 | $APPLE_NVIDIA_BUG = DC::OpenGL::gl_vendor eq "NVIDIA Corporation" && $^O eq "darwin"; |
63 | $APPLE_NVIDIA_BUG = DC::OpenGL::gl_vendor eq "NVIDIA Corporation" && $^O eq "darwin"; |
64 | apple_nvidia_bug $APPLE_NVIDIA_BUG; |
64 | apple_nvidia_bug $APPLE_NVIDIA_BUG; |
… | |
… | |
80 | glHint GL_GENERATE_MIPMAP_HINT , $hint; |
80 | glHint GL_GENERATE_MIPMAP_HINT , $hint; |
81 | glHint GL_TEXTURE_COMPRESSION_HINT , $hint; |
81 | glHint GL_TEXTURE_COMPRESSION_HINT , $hint; |
82 | #glDrawBuffer GL_BACK; |
82 | #glDrawBuffer GL_BACK; |
83 | #glReadBuffer GL_BACK; |
83 | #glReadBuffer GL_BACK; |
84 | |
84 | |
|
|
85 | c_init; |
85 | $_->() for values %INIT_HOOK; |
86 | $_->() for values %INIT_HOOK; |
86 | } |
87 | } |
87 | |
88 | |
88 | sub quit { |
89 | sub quit { |
89 | undef $GL_VERSION; |
90 | undef $GL_VERSION; |