We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes the engine fails to init, crashing with a null gl:
// voxel-mesher // load combined porous mesh into GL var gl = this.shell.gl; var verticesBuf = createBuffer(gl, new Float32Array(vertices)); … // gl-buffer function createBuffer(gl, data, type, usage) { type = type || gl.ARRAY_BUFFER // gl is undefined
WebGL not yet properly initialized? (race condition?)
The text was updated successfully, but these errors were encountered:
Called from:
// voxel-engine-stackgl Game.prototype.showChunk = function(chunk, optionalPosition) { if (optionalPosition) chunk.position = optionalPosition var chunkIndex = chunk.position.join('|') var bounds = this.voxels.getBounds.apply(this.voxels, chunk.position) //console.log('showChunk',chunkIndex,'density=',JSON.stringify(chunkDensity(chunk))) var voxelArray = isndarray(chunk) ? chunk : ndarray(chunk.voxels, chunk.dims) var mesh = this.mesherPlugin.createVoxelMesh(this.shell.gl, voxelArray, this.stitcher.voxelSideTextureIDs, this.stitcher.voxelSideTextureSizes, chunk.position, this.chunkPad)
gl comes from this.shell.gl = https://www.npmjs.com/package/game-shell, or more specifically the extension https://www.npmjs.com/package/gl-now. gl is supposed to be ready when gl-init is fired:
shell.on("gl-init", function() { var gl = shell.gl
is this code executed before gl-init, or gl-init is fired before gl is ready?
Sorry, something went wrong.
No branches or pull requests
Sometimes the engine fails to init, crashing with a null gl:
WebGL not yet properly initialized? (race condition?)
The text was updated successfully, but these errors were encountered: