must check gl extensions first

This commit is contained in:
David Rose 2004-03-03 06:53:39 +00:00
parent 69ffcae6ff
commit 49b7ac2fac
1 changed files with 21 additions and 19 deletions

View File

@ -263,6 +263,27 @@ reset() {
free_pointers();
GraphicsStateGuardian::reset();
// Output the vendor and version strings.
show_gl_string("GL_VENDOR", GL_VENDOR);
show_gl_string("GL_RENDERER", GL_RENDERER);
get_gl_version();
// Save the extensions tokens.
save_extensions((const char *)glGetString(GL_EXTENSIONS));
get_extra_extensions();
report_extensions();
_supports_bgr = has_extension("GL_EXT_bgra");
_supports_multisample = has_extension("GL_ARB_multisample");
_edge_clamp = GL_CLAMP;
if (has_extension("GL_SGIS_texture_edge_clamp") ||
is_at_least_version(1, 2)) {
_edge_clamp = GL_CLAMP_TO_EDGE;
}
report_my_gl_errors();
_buffer_mask = 0;
// All GL implementations have the following buffers. (?)
@ -418,25 +439,6 @@ reset() {
}
}
// Output the vendor and version strings.
show_gl_string("GL_VENDOR", GL_VENDOR);
show_gl_string("GL_RENDERER", GL_RENDERER);
get_gl_version();
// Save the extensions tokens.
save_extensions((const char *)glGetString(GL_EXTENSIONS));
get_extra_extensions();
report_extensions();
_supports_bgr = has_extension("GL_EXT_bgra");
_supports_multisample = has_extension("GL_ARB_multisample");
_edge_clamp = GL_CLAMP;
if (has_extension("GL_SGIS_texture_edge_clamp") ||
is_at_least_version(1, 2)) {
_edge_clamp = GL_CLAMP_TO_EDGE;
}
_error_count = 0;
report_my_gl_errors();