Log supported OpenGL extensions if VAO is in doubt.
This commit is contained in:
parent
ea9393aa9b
commit
85e3ec5027
1 changed files with 9 additions and 6 deletions
|
@ -123,8 +123,9 @@ fn supports_vao(gl: &glow::Context) -> bool {
|
|||
let version_str = &version_string[pos + WEBGL_PREFIX.len()..];
|
||||
if version_str.contains("1.0") {
|
||||
// need to test OES_vertex_array_object .
|
||||
gl.supported_extensions()
|
||||
.contains("OES_vertex_array_object")
|
||||
let supported_extensions = gl.supported_extensions();
|
||||
tracing::debug!("Supported OpenGL extensions: {:?}", supported_extensions);
|
||||
supported_extensions.contains("OES_vertex_array_object")
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
@ -132,8 +133,9 @@ fn supports_vao(gl: &glow::Context) -> bool {
|
|||
// glow targets es2.0+ so we don't concern about OpenGL ES-CM,OpenGL ES-CL
|
||||
if version_string.contains("2.0") {
|
||||
// need to test OES_vertex_array_object .
|
||||
gl.supported_extensions()
|
||||
.contains("OES_vertex_array_object")
|
||||
let supported_extensions = gl.supported_extensions();
|
||||
tracing::debug!("Supported OpenGL extensions: {:?}", supported_extensions);
|
||||
supported_extensions.contains("OES_vertex_array_object")
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
@ -142,8 +144,9 @@ fn supports_vao(gl: &glow::Context) -> bool {
|
|||
if version_string.starts_with('2') {
|
||||
// I found APPLE_vertex_array_object , GL_ATI_vertex_array_object ,ARB_vertex_array_object
|
||||
// but APPLE's and ATI's very old extension.
|
||||
gl.supported_extensions()
|
||||
.contains("ARB_vertex_array_object")
|
||||
let supported_extensions = gl.supported_extensions();
|
||||
tracing::debug!("Supported OpenGL extensions: {:?}", supported_extensions);
|
||||
supported_extensions.contains("ARB_vertex_array_object")
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue