JoeyDeVries / LearnOpenGL

Code repository of all OpenGL chapters from the book and its accompanying website https://learnopengl.com
https://learnopengl.com
Other
11.03k stars 2.8k forks source link

why cannot I import other .obj model? #29

Open bryant24hao opened 8 years ago

bryant24hao commented 8 years ago

Dear sir, I want to use your example program to import my own model,but when I adjust the file path and run the program.It displays an error like '0x00D44BDB has unhandled exception(in 1.model_loading.exe ): 0xC0000005: 'Could you tell me how to import my own model correctly?Thanks in advance.

wowk commented 6 years ago

because the model matrix used in the code was not initialized, in glm0.9.8, it's fine, the constructor method of glm::mat4 will do it for you, glm::mat4 model is equal to glm::mat4 model(1.0f); however, in glm0.9.9 , the default constructor method wont initialize the model matrix, users need to do it maunally : glm::mat4 model(1.0f); or the value of matrix user defined will be undefined.