Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: samples/o3d-webgl/primitive.js

Issue 1092003: Fixed a lot of bugs with render surfaces and bitmaps. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/o3d-webgl/param.js ('k') | samples/o3d-webgl/render_surface_set.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3d-webgl/primitive.js
===================================================================
--- samples/o3d-webgl/primitive.js (revision 40133)
+++ samples/o3d-webgl/primitive.js (working copy)
@@ -124,6 +124,8 @@
var streamBank = this.streamBank;
var indexBuffer = this.indexBuffer;
+ var enabled_attribs = [];
+
for (var semantic = 0;
semantic < streamBank.vertexStreams.length;
++semantic) {
@@ -139,6 +141,7 @@
this.gl.bindBuffer(this.gl.ARRAY_BUFFER, buffer.gl_buffer_);
this.gl.enableVertexAttribArray(gl_index);
+ enabled_attribs.push(gl_index);
// TODO(petersont): Change that hard-coded 4 down there.
this.gl.vertexAttribPointer(
@@ -154,4 +157,8 @@
this.numberPrimitives * 3,
this.gl.UNSIGNED_SHORT,
0);
+
+ for (var i = 0; i < enabled_attribs.length; ++i) {
+ this.gl.disableVertexAttribArray(enabled_attribs[i]);
+ }
};
« no previous file with comments | « samples/o3d-webgl/param.js ('k') | samples/o3d-webgl/render_surface_set.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698