Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: vertex skinning: error index expression must be constant

  1. #11
    Senior Member
    Join Date
    May 2010
    Posts
    207

    Re: vertex skinning: error index expression must be constant

    After linking the shader:
    Code :
      this.BindToModelLocn = gl.getUniformLocation ( this.programObject, "BindToModel" ) ;
    Then, before I call gl.drawElements to render the mesh:
    Code :
      if ( this.BindToModelLocn )
        gl.uniformMatrix4fv(this.BindToModelLocn, false, bones ) ;
    ...where "seq" is something like:
    Code :
    var bones = new Float32Array ([
    1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,.9,1,    // Bone 0
    1,0,0,0, 0,1,.1,0 ,0,-.1,1,0, 0,.02,.9,1,   // Bone 1
    ...
    .97,0,-.23,0, .02,.99,.1,0, .23,-.1,.97,0, -.1,.02,.92,1  // Bone 19
    ]) ;

  2. #12
    Junior Member
    Join Date
    Sep 2011
    Posts
    1

    Re: vertex skinning: error index expression must be constant

    I just want to say thank you for the information. It is very valuable for me..newbie here and encountering the same situation.
    Thanks and keep up the good work..

  3. #13
    Junior Member
    Join Date
    Oct 2011
    Posts
    1

    Re: vertex skinning: error index expression must be constant

    Great! I just found what I am looking for. Thanks for the post guys!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Texture coordinates per face-index, instead of per vertex
    By jfaassen in forum Developers Coding:Beginner
    Replies: 1
    Last Post: 12-30-2010, 06:24 AM
  2. matrix palettes for vertex skinning
    By Newbie in forum OpenGL ES general technical discussions
    Replies: 7
    Last Post: 07-26-2009, 03:58 AM

Posting Permissions

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