Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor tweaks

  • Loading branch information...
commit 81a4d134455b8b8251529025d4358a5962e7e9ab 1 parent d573cac
@tmpvar authored
Showing with 4 additions and 3 deletions.
  1. +4 −2 example/triangle.js
  2. +0 −1  src/js/spidermonkey.cc
View
6 example/triangle.js
@@ -11,7 +11,7 @@ function e(name, result) {
console.log(name, 'failed!', e);
fail();
} else {
- console.log(name, 'passed!');
+ console.log(name, 'passed! (', result, ')');
}
return result;
}
@@ -45,7 +45,9 @@ var attr = e('attribute location', ctx.getAttribLocation(program, "pos"));
var vertexBuffer = e('create buffer', ctx.createBuffer());
e('bind buffer', ctx.bindBuffer(ctx.ARRAY_BUFFER, vertexBuffer));
-e('buffer data', ctx.bufferData(ctx.ARRAY_BUFFER, new Float32Array(vertexBuffer)));
+e('buffer data', ctx.bufferData(ctx.ARRAY_BUFFER, new Float32Array(vertices), ctx.STATIC_DRAW));
+
+e('viewport', ctx.viewport(0, 0, 300, 300));
var a = 10000;
while(a--) {
View
1  src/js/spidermonkey.cc
@@ -121,7 +121,6 @@ JSBool webgl_rendering_context_bufferData(JSContext *cx, uintN argc, jsval *argv
js::TypedArray *tarray = js::TypedArray::fromJSObject(array);
JS_ASSERT(tarray);
- cout << "data " << tarray->data << " type:" << tarray->type << endl;
uintN srclen = tarray->length;
glBufferData(target, srclen, tarray->data, usage);
Please sign in to comment.
Something went wrong with that request. Please try again.