Skip to content

Commit

Permalink
refact: Cleanup WebGLRenderer#bufferData args
Browse files Browse the repository at this point in the history
It's confusing that this methods accepts a path, since it is simply being
ignored. Also it doesn't behave as documented (returns this).
  • Loading branch information
alexanderGugel authored and Michael O'Brien committed Jul 20, 2015
1 parent 3c00040 commit fdb019d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion renderers/Context.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ function glUniforms (context, path, commands, iterator) {
function glBufferData (context, path, commands, iterator) {
if (!context._webGLRenderer) context._initWebGLRenderer();
context._webGLRenderer.bufferData(
path,
commands[++iterator],
commands[++iterator],
commands[++iterator],
Expand Down
8 changes: 2 additions & 6 deletions webgl-renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,10 @@ WebGLRenderer.prototype.setMeshUniform = function setMeshUniform(path, uniformNa
};

/**
* Triggers the 'draw' phase of the WebGLRenderer. Iterates through registries
* to set uniforms, set attributes and issue draw commands for renderables.
* Allocates a new buffer using the internal BufferRegistry.
*
* @method
*
* @param {String} path Path used as id of mesh in mesh registry
* @param {Number} geometryId Id of geometry in geometry registry
* @param {String} bufferName Attribute location name
* @param {Array} bufferValue Vertex data
Expand All @@ -510,10 +508,8 @@ WebGLRenderer.prototype.setMeshUniform = function setMeshUniform(path, uniformNa
*
* @return {undefined} undefined
*/
WebGLRenderer.prototype.bufferData = function bufferData(path, geometryId, bufferName, bufferValue, bufferSpacing, isDynamic) {
WebGLRenderer.prototype.bufferData = function bufferData(geometryId, bufferName, bufferValue, bufferSpacing, isDynamic) {
this.bufferRegistry.allocate(geometryId, bufferName, bufferValue, bufferSpacing, isDynamic);

return this;
};

/**
Expand Down

0 comments on commit fdb019d

Please sign in to comment.