… | |
… | |
26 | if /^(?:gl[A-Z_]|GL_)/; |
26 | if /^(?:gl[A-Z_]|GL_)/; |
27 | } |
27 | } |
28 | } |
28 | } |
29 | |
29 | |
30 | sub init { |
30 | sub init { |
|
|
31 | if ($::CFG->{opengl11}) { |
|
|
32 | $GL_VERSION = 1.1; |
|
|
33 | %GL_EXT = (); |
|
|
34 | } else { |
31 | $GL_VERSION = gl_version * 1; |
35 | $GL_VERSION = gl_version * 1; |
32 | %GL_EXT = map +($_ => 1), split /\s+/, gl_extensions; |
36 | %GL_EXT = map +($_ => 1), split /\s+/, gl_extensions; |
|
|
37 | } |
33 | |
38 | |
34 | $GL_NPOT = $GL_EXT{GL_ARB_texture_non_power_of_two} || $GL_VERSION >= 2; |
39 | $GL_NPOT = $GL_EXT{GL_ARB_texture_non_power_of_two} || $GL_VERSION >= 2; |
35 | $GL_NPOT = 0 if gl_vendor =~ /ATI Technologies/; # ATI doesn't get it right... |
|
|
36 | |
40 | |
37 | glDisable GL_COLOR_MATERIAL; |
41 | glDisable GL_COLOR_MATERIAL; |
38 | glShadeModel GL_FLAT; |
42 | glShadeModel GL_FLAT; |
39 | glDisable GL_DITHER; |
43 | glDisable GL_DITHER; |
40 | glDisable GL_DEPTH_TEST; |
44 | glDisable GL_DEPTH_TEST; |