pass vertex attribute matrix through

    Jul 24 2012 | 3:07 pm
    Hi all,
    I am rendering a geometry twice in the screen using a named and a
    The mesh geometry is being processed by a shader, which is bound and unbound through OpenGL commands in the command list.
    The shader is taken from Pelado's morph shader example, and it is intended to deform geometry vertices by means of a noise matrix, which is passed to the shader through as vertex attribute matrix.
    My question is: how can I pass this vertex attribute matrix to when I pass it through, as in Pelado's example, it doesn't work.
    here is my code, thanks in advance

    • Jul 25 2012 | 2:14 pm
      I forgot to include the shader:
      /////dShader.txt /////////////////////////////////////////////////////////////
    • Jul 25 2012 | 3:04 pm
      i'm not sure if it's possible to pass vertex attributes to a gl.mesh that is drawn by a gl.sketch.
      is there any particular reason you need to use sketch to do your drawing?
    • Jul 25 2012 | 3:42 pm
      Thanks for your answer Robert! I am using to draw the geometry because I thought that this method would spare a lot of resources when rendering the same vertices ( twice... but maybe there are other options?
    • Jul 25 2012 | 4:22 pm
      should be no more efficient than setting @automatic 0 on your gl.mesh and banging it twice each frame.
    • Jul 25 2012 | 6:06 pm
      SOLVED - Thank you Robert, you gave me the right clue!!
      I finally made it work with In my earlier patch, I was giving unnecessary openGL commands, but it was as simple as treating the as any other object, independently of its having a shader or not.
      The binding and unbinding of texture and shader programs is already handled automatically by Jitter in the [] object, so why outhink the smart Cycling74 programmers? :p.
      Below the corrected, working patch, the shader is the same I posted earlier.
      For anyone interested, the 2 bang method Robert was talking about is in this post: