Webgl2#3094
Conversation
…XT_frag_depth aren't supported.
|
|
There should be one test failure for materials because the |
|
@bagnell I added your comments to #797 (comment) |
|
Also changes indices to not use the maximum value of the index type. The maximum value of the index type is used for primitive restart. It may also be beneficial for WebGL 1.0 when using ANGLE. |
There was a problem hiding this comment.
We should also change COLLADA2GLTF and any terrain tools that break up meshes to use 64K - 1 vertices, right?
There was a problem hiding this comment.
I guess use CesiumMath.SIXTY_FOUR_KILOBYTES here (and anywhere else) like we do elsewhere.
There was a problem hiding this comment.
We should also change COLLADA2GLTF and any terrain tools that break up meshes to use 64K - 1 vertices, right?
Right, split them or use unsigned ints.
There was a problem hiding this comment.
Why minus 1? You can fit exactly 64k vertices using unsigned short and the comparison is checking the vertex count, not the max index.
|
There are JSHint errors: https://travis-ci.org/AnalyticalGraphicsInc/cesium/builds/85431116 |
|
Good start to WebGL 2. Just those comments. |
|
@pjcozzi This is ready for another review. |
|
@abwood see the WebGL 2 spec:
|
There was a problem hiding this comment.
I'd rather only assign to each context property once since I'm not 100% sure that all JavaScript engines will optimize (not enter dictionary mode) when we "create" properties in a branch (even though it is in both branches).
Instead, perhaps something like:
var glCreateVertexArray = undefined;
if (webgl2) {
glCreateVertexArray = // ...
} else {
glCreateVertexArray = // ...
}
this.glCreateVertexArray = glCreateVertexArray;Or leave it if someone can confirm the performance.
|
Looks good. Just that comment. |
|
@pjcozzi This is ready. |
|
JSHint is also failing: https://travis-ci.org/AnalyticalGraphicsInc/cesium/builds/85552141 |
|
@pjcozzi The jsHint errors are fixed. Fixing them fixed getting the extensions in WebGL 1.0. |
|
WebGL 1 looks good. On WebGL 2 in Canary, should this test fail? |
|
@pjcozzi I wasn't seeing that failure but it should be fixed. |
|
Looks good! |

For #797
Added preliminary WebGL2 support. Fixed any incompatibilities between WebGL1 extensions and WebGL2 core, though there are a few extensions that aren't supported right now.