The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

glMatrix - Stupidly fast WebGL matricies

I've just released a new javascript matrix library for use with WebGL called glMatrix. Though it wasn't an initial goal of the library, when all was said and done it appears to be the fastest matrix library available. (Though I would love for someone to prove me wrong on that!)

As a first release I fully expect a random bug or two to crop up, but I'm committed to squashing them as quickly as possible. Outside of that, though, I would love any feedback on ways that this library could be improved! Please take a moment and check it out!

Users will expect m1 to still have the value it had before the previous line, however m1 and m3 now point to the same object. This should not be the default behavior, and no parameters other than dest should be modified inside the function.

If the user wanted to explicitly use m1 to store the final value he could simply have done:

Code :

mat4.multiply(m1, m2, m1);

This way it's much clearer what he meant to do. It also makes the objects themselves behave as if they were immutable in some sense, since they are never modified inside the functions unless explicitly told to. No functionality or performance is lost, and it should make for a much safer coding practice. The solution is simple, instead of setting "dest = mat;" (or equivalent) it should set it to "mat4.create();" (or equivalent)

Re: glMatrix - Stupidly fast WebGL matricies

For all functions following this format the operation will be applied to the values in srcMatrix and the result will be written into destMatrix, which will also be returned. If destMatrix is not specified the result will be written into srcMatrix, if destMatrix is specified srcMatrix will not be altered.