Hi All,
I would like to ask you for following help. I’m trying to make a GPU terrain rendering (algorithm from NVIDIA Gems). Currently now I’m just porting code from OpenGL to WebGL and I’m having following issue:
- VBO is loaded
- IBO is also loaded
but nothing is drew.
I’m using 2D arrays to store VBO and IBO (this everything worked well in OpenGL) + when I check the values they are correct.
I think that the problem can be in: - is the size in bufferData set correctly?
gl.bufferData(gl.ARRAY_BUFFER, new WebGLFloatArray(vboBuffer), gl.STATIC_DRAW);
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new WebGLUnsignedShortArray(iboBuffer), gl.STATIC_DRAW);
or here: - value 8193 is used in OpenGL
gl.drawElements(gl.TRIANGLE_STRIP, 8193, gl.UNSIGNED_SHORT, 0);
The code is here: http://eisbergstudio.com/dev/
any help more than welcome…