Results 1 to 4 of 4

Thread: GPU terrain rendering

  1. #1

    GPU terrain rendering

    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..

  2. #2
    Junior Member
    Join Date
    Apr 2010
    Posts
    22

    Re: GPU terrain rendering

    FireFox Error Console message:
    DrawElements: bound element array buffer is too small for given count and offset
    You can try draw e.g. 8 elements.

  3. #3

    Re: GPU terrain rendering

    Quote Originally Posted by enot
    FireFox Error Console message:
    DrawElements: bound element array buffer is too small for given count and offset
    You can try draw e.g. 8 elements.
    thanks,...but this ´message´(its not warning or error) is displayed also on other examples from webgl wiki. I wil try to get glGetError and see.
    For example in chrome I´m not getting errors at all.

  4. #4

    Re: GPU terrain rendering

    figured it out - not correct IBO values

    - if anybody is interested here is the link - just finished with first block 64x64

Similar Threads

  1. Frustum culling in Terrain rendering
    By jonasgutvik in forum OpenGL ES general technical discussions
    Replies: 4
    Last Post: 04-20-2010, 09:37 AM
  2. GPGPU and rendering calculations on same GPU?
    By garydeng in forum OpenCL
    Replies: 4
    Last Post: 12-05-2009, 09:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •