Merge pull request #32 from tsauerwein/webgl-point-offset
[webgl-point] Fix call to drawElements
This commit is contained in:
@@ -610,8 +610,10 @@ ol.render.webgl.ImageReplay.prototype.replay = function(context,
|
|||||||
for (i = 0, ii = this.textures_.length, start = 0; i < ii; ++i) {
|
for (i = 0, ii = this.textures_.length, start = 0; i < ii; ++i) {
|
||||||
gl.bindTexture(goog.webgl.TEXTURE_2D, this.textures_[i]);
|
gl.bindTexture(goog.webgl.TEXTURE_2D, this.textures_[i]);
|
||||||
var end = this.groupIndices_[i];
|
var end = this.groupIndices_[i];
|
||||||
gl.drawElements(goog.webgl.TRIANGLES, end - start,
|
var numItems = end - start;
|
||||||
goog.webgl.UNSIGNED_SHORT, start);
|
var offsetInBytes = start * 2; // 2 Bytes for UNSIGNED_SHORT
|
||||||
|
gl.drawElements(goog.webgl.TRIANGLES, numItems,
|
||||||
|
goog.webgl.UNSIGNED_SHORT, offsetInBytes);
|
||||||
start = end;
|
start = end;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user