Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unsupported getParameter() option #37

Open
kbruneel opened this issue May 24, 2019 · 10 comments
Open

Error: Unsupported getParameter() option #37

kbruneel opened this issue May 24, 2019 · 10 comments

Comments

@kbruneel
Copy link

I'm trying to use node-gles with three.js and get the following error:
Error: Unsupported getParameter() option

I guess get Parameter is not implemented yet?

When do you think it's realistic for me to try my three.js experiment again?

@nkreeger
Copy link
Contributor

Looks like this is resolved from #34 ?

@kbruneel
Copy link
Author

No this is something else.

@nkreeger
Copy link
Contributor

OK - I'll need some more details here. Stack trace, what was the argument passed into getParameter etc.

@AlexVestin
Copy link
Contributor

I ran in to the same problem trying to use this project with three.js

		var maxVertexTextures = gl.getParameter( gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS );
		                           ^

Error: Unsupported getParameter() option
    at new WebGLCapabilities (/home/gaz/prog/native-threejs/node_modules/three/build/three.js:15851:30)
    at initGLContext (/home/gaz/prog/native-threejs/node_modules/three/build/three.js:23321:19)
    at new WebGLRenderer (/home/gaz/prog/native-threejs/node_modules/three/build/three.js:23370:3)
    at Object.<anonymous> (/home/gaz/prog/native-threejs/main.js:16:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)

at this location in the library: https://github.com/mrdoob/three.js/blob/c4b7b422b3f17900e530d27e3bbf0cdd76200cc1/src/renderers/webgl/WebGLCapabilities.js#L73

I commented out some to see which would work and

gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS
gl.MAX_CUBE_MAP_TEXTURE_SIZE
gl.MAX_VERTEX_ATTRIBS
gl.MAX_VERTEX_UNIFORM_VECTORS
gl.MAX_VARYING_VECTORS
gl.MAX_FRAGMENT_UNIFORM_VECTORS

threw errors when called with gl.getParameter

@AlexVestin
Copy link
Contributor

AlexVestin commented Aug 12, 2019

Guessing they need to have cases here:

edit: I created a pull request at #47

Next thing is that ANGLE_instanced_arrays is not implemented, which makes the code fail

@nkreeger
Copy link
Contributor

Hi @AlexVestin yeah we can change that block to not fail if the param is not implemented. It should be as easy as matching up context values.

I'll try and take a look this week at this. I'm behind on getting a new build out.

@Molay
Copy link

Molay commented Aug 25, 2019

Hi @nkreeger , is it still not supported for the parameters of extensions?

const ext = gl.getExtension('WEBGL_debug_renderer_info');
if (ext != null) {
  const rendererInfo = gl.getParameter(ext.UNMASKED_RENDERER_WEBGL);
  const vendorInfo = gl.getParameter(ext.UNMASKED_VENDOR_WEBGL);
  console.log(rendererInfo, vendorInfo);
}

@nkreeger
Copy link
Contributor

Params are supported - however those params are not implemented:
https://github.com/google/node-gles/blob/master/binding/webgl_rendering_context.cc#L2625

That block can probably be changed to not throw an exception. For node-gles - I'd recommend asking renderer info like so:
https://github.com/google/node-gles/blob/master/src/tests/float_texture_upload_test.ts#L11

@Molay
Copy link

Molay commented Aug 26, 2019

Hi @nkreeger . Unfortunately, there are some useful extension parameters that are not supported, such as EXT_texture_filter_anisotropic.

Could you extend the getParameter method more compatibly? It is very much appreciated.

@nkreeger
Copy link
Contributor

I just published 0.0.16 which has a fix for exception throwing with implemented extension support - #57

Thanks @rnconrad!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants