Results 1 to 2 of 2

Thread: question about uniformMatrix4fv

  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    1

    question about uniformMatrix4fv

    In my code at some point I try to upload a matrix by using:

    gl.uniformMatrix4fv(rotationMatrix, true, new WebGLFloatArray(mrot));

    foolishly I had assumed that the second argument (set to true here) meant that the matrix was transposed before being uploaded (which amounts to using the normal mathematical convention for matrices and not the messed up convention of openGL).
    however it does not seem to produce the desired effect. I've been unable to figure out what it really does,
    and I fixed the problem by implementing a procedure transpose() to manually transpose my matrix.
    but what is the meaning of the second argument, then? or is it an implementation bug? (I'm using chrome under linux)

    Thanks for the help

  2. #2
    Member
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    90

    Re: question about uniformMatrix4fv

    That's interesting! I'd not looked at that before, and here's what the OpenGL ES 2.0 spec says:

    If the transpose parameter to any of the UniformMatrix* commands is
    not FALSE, an INVALID_VALUE error is generated, and no uniform values are
    changed.
    Very odd. Perhaps it's there for future use?

Posting Permissions

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