Dav1dde / gl3n

OpenGL Maths for D (not glm for D).
http://dav1dde.github.com/gl3n/
Other
104 stars 49 forks source link

Transposed matrixes not supported on every system #68

Open mkalte666 opened 8 years ago

mkalte666 commented 8 years ago

Hello,

i am currently writing a rpg engine in D. I recently ran into a confusing problem caused by the following:

In older OpenGL versions, especially when you only have access to ES Core 2.0 contexts, glUniformMatrix only accepts GL_FALSE as transpose argument and otherwise generates a GL_INVALID_VALUE [1]. While i can simply call transpose() on the matrix, thats extra-stuff that needs be done every time i submit matrixes to the pipeline.

Is there an alternative way? [1] https://www.khronos.org/opengles/sdk/docs/man/xhtml/glUniform.xml

Dav1dde commented 8 years ago

Unfortunatly not, I made a (in hindsight) bad decision in choosing the matrix layout. I think @Extrawurst is working on a column major Matrix!() implementation, until that is done there is unfortunately no solution other than transposing manually.

mkalte666 commented 8 years ago

Hmm ok. Thanks for the reply though, ill take a look at this in the future.