user1771808
user1771808

Reputation: 39

webGL texture extensions

I am really new to webGL and I don't know how to add an extension. I tried just doing "gl.enable(gl.OES_texture_float_linear)", but that seems to be wrong.

Could you please tell me how to get the extension to work?

Thank you, and sorry for my ignorant question.

Upvotes: 0

Views: 130

Answers (1)

Dragan Okanovic
Dragan Okanovic

Reputation: 7781

This might help: https://developer.mozilla.org/en-US/docs/Web/WebGL/Using_Extensions.

Basically, you do:

var ext = gl.getExtension('OES_vertex_array_object');
// or which ever gl.getExtension('extension_name');
if (ext) {
  // extension exists
} else {
  // extension does not exist
}

Latest available extensions can be seen on: http://www.khronos.org/registry/webgl/extensions/

Upvotes: 2

Related Questions