Replies: 1 comment 5 replies
-
Can you try and run the tests under wsl? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
As I run "npm run test-render" I see a few fails there, and I'm trying to fix them.
"npm run test-render custom-layer-js/depth" is the one I'm working on.
The test draws 3 Layers:
1, The green Background Layer
2, The white square Fill Layer
3, The red point Custom Layer.
Only the Custom Layer is not seen from WebGL color buffer. We read it back from Canvas with gl.readPixels() to do the images comparison.
Custom Layer is rendered here: maplibre-gl-js\test\integration\render\custom_layer_implementations.ts
I added following code to the Class:
And we can see gl.drawElements() works well:

If I change the code in render() method into:
// Draw //gl.drawElements(gl.TRIANGLES, n, gl.UNSIGNED_SHORT, 0); gl.drawArrays(gl.TRIANGLES, 0, 1);
We should see 1 triangle, but not:

We can see from the indices order the triangle is not in the opposite side.
I tried to catch exceptions from gl.drawArrays(), but see nothing:
// Draw //gl.drawElements(gl.TRIANGLES, n, gl.UNSIGNED_SHORT, 0); try { gl.drawArrays(gl.TRIANGLES, 0, 1); } catch (e) { console.info(e); }
So, any suggestions for me? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions