抛出异常:类型错误:对象不支持属性或方法"createVertexArray"(emscripten)

exception thrown: TypeError: Object doesn't support property or method 'createVertexArray' (emscripten)

本文关键字:createVertexArray emscripten 方法 属性 错误 类型 对象 不支持 抛出异常      更新时间:2023-10-16

我创建了一个简单的SDL2和Opengl ES2演示。它可以在Chrome和Firefox中工作,但是在Edge中我收到此错误:

exception thrown: TypeError: Object doesn't support property or method 'createVertexArray'

引发异常的C++代码:

// Create Vertex Array Object
GLuint vao;
glGenVertexArraysOES(1, &vao);
glBindVertexArrayOES(vao);

是我的错,还是 Edge 浏览器或 Emscripten 的错误?

如果打开控制台并键入

document.createElement('canvas').getContext("webgl").getSupportedExtensions();

它打印什么?

边缘可能不支持OES_vertex_array_object扩展。

这里有一个填充物

https://github.com/greggman/oes-vertex-array-object-polyfill

相关文章:
  • 没有找到相关文章