Skip to content

Order of buffers cause error #7

Open

Description

@z3t0

https://gist.github.com/z3t0/57153d776d1637b00988

In the gist above I have to make cubeVertices AFTER cubeOutline. Otherwise I get out of range exception with the drawCall... no idea why.

Please help

Activity

  1. z3t0 commented on Jun 11, 2015

    @z3t0
    Author

    I have figured out that it may just be the buffer that isnt working.. No idea why.

    var cubeOutline = createBuffer(gl, [
      // Front
      +l, +l, +l,
      -l, +l, +l,
      -l, -l, +l,
      +l, -l, +l,
      +l, +l, +l,
    
      // Back
      +l, +l, -l,
      -l, +l, -l,
      -l, -l, -l,
      +l, -l, -l,
      +l, +l, -l,
    
      // Bottom
      +l, -l, -l,
      -l, -l, -l,
      -l, -l, +l,
      +l, -l, +l,
      +l, -l, -l,
    
      // Top
      +l, +l, -l,
      -l, +l, -l,
      -l, +l, +l,
      +l, +l, +l,
      +l, +l, -l,
    
      // Left
      -l, +l, +l,
      -l, +l, -l,
      -l, -l, -l,
      -l, -l, +l,
      -l, +l, +l,
    
      // Right
      +l, +l, +l,
      +l, +l, -l,
      +l, -l, -l,
      +l, -l, +l,
      +l, +l, +l
      ])
  2. mattdesl commented on Jun 11, 2015

    @mattdesl
    Member

    l is undefined in your gist when creating the first buffer

  3. z3t0 commented on Jun 11, 2015

    @z3t0
    Author

    Changing the order still has no effect however.

  4. z3t0 commented on Jun 11, 2015

    @z3t0
    Author

    I've updated the gist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions