Skip to content
Browse files

Add: glFinish() and print out the status of the implementation after …

…r triangle.js has been run
  • Loading branch information...
1 parent 7bc78af commit a3a4432896086124aee29872497b72e6f3cacb59 @tmpvar committed Aug 24, 2011
Showing with 5 additions and 2 deletions.
  1. +3 −0 example/triangle.js
  2. +2 −2 src/js/spidermonkey.cc
View
3 example/triangle.js
@@ -109,3 +109,6 @@ while(a--) {
e('draw arrays', gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4));
e('flush', gl.flush());
}
+
+
+console.log(gl.notImplemented + '/' + gl.totalMethods + " (" + Math.floor(((gl.totalMethods - gl.notImplemented)/gl.totalMethods)*100) + "%)");
View
4 src/js/spidermonkey.cc
@@ -410,8 +410,8 @@ JSBool webgl_rendering_context_enableVertexAttribArray(JSContext *cx, uintN argc
}
JSBool webgl_rendering_context_finish(JSContext *cx, uintN argc, jsval *argv) {
- JS_ReportError(cx, "method not implemented");
- return JS_FALSE;
+ glFinish();
+ return JS_TRUE;
}
JSBool webgl_rendering_context_flush(JSContext *cx, uintN argc, jsval *argv) {

0 comments on commit a3a4432

Please sign in to comment.
Something went wrong with that request. Please try again.