Jump to content

[SOLVED] why mat4 and dmat4 construct parameter different?


photo

Recommended Posts

hi .

   When i use mat4 it's like mat4(const vec4 &col0,const vec4 &col1,const vec4 &col2,const vec4 &col3);

    but when use dmat4 it's like dmat4(const dvec3 &col0,const dvec3 &col1,const dvec3 &col2,const dvec3 &col3);

   one is vec4 another is vec3. which is right? the problem is i couldn't use Mat4 to correctly construct for both double and float precision anymore.

Yes, i could use something like Mat4(mat4(Vec4,Vec4,Vec4,Vec4)), but hope this could be clearify

 

thanks

Link to comment

Hello there!

 

That's because dmat4 is actually 3x4 matrix, not 4x4 (like mat4). In terms of performance and memory that's a good solution yet it introduces a little inconsistency.

Link to comment
×
×
  • Create New...