Open dimitre opened 4 months ago
maybe, you need to add suffix of float?
i.e. glm::mat4 view{1.0f};
@dimitre is #define GLM_FORCE_CTOR_INIT
also present in the file where you use the glm::mat4?
because if it's for instance in an autonomous class (that does not import ofMain.h or something) there is no guarantee that the define is "picked-up" prior to your file.
it would be a good occasion to leave uninitialized and try adding a preprocessor define (#6530) and see if it fixes the problem. it creates an additional detail to compile OF, but since most/all people start with a template it's probably not a trouble — and it would be much cleaner than putting #define GLM_FORCE_CTOR_INIT
all over the source.
@dimitre
sorry, previous my pointing out is my misunderstand.
glm::mat4 view{1.0}
is no problem. 😉
Updating a project here I've noticed newer GLM versions got some problems when using an unitialized mat4, like:
and worked ok after I've updated to
I'm not sure if this will be corrected there in more recent versions, but I'm wondering if we should inspect the core to find some unitialized glm::mat4 and update them, like in ofShadow, ofMatrixStack and ofxAssimpMeshHelper.
PS: It seems #define GLM_FORCE_CTOR_INIT is used correctly in all OF Core.