You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
YoutubeOpenGL 13 - Model Loading/Texture.cpp: //========================================
// this function remains from the first part of the course
11 stbi_set_flip_vertically_on_load(true); // when creating an object JSON, texture orientation is already taken into account
// so you need to set a trigger to enable this feature if JSON is not used.
YoutubeOpenGL 13 - Model Loading/default.vert: //========================================
36 crntPos = vec3(model * translation * -rotation * scale * vec4(aPos, 1.0f)); // Now everything will work without "minus":
crntPos = vec3(model * translation * rotation * scale * vec4(aPos, 1.0f));
42 texCoord = mat2(0.0, -1.0, 1.0, 0.0) * aTex; // no longer needed
YoutubeOpenGL 16 - Face Culling & FPS Counter/Main.cpp: //========================================
71 glCullFace(GL_FRONT); // after all the fixes it no longer works
glCullFace (GL_BACK); // "the default" value is valid
//========================================
The text was updated successfully, but these errors were encountered:
YoutubeOpenGL 13 - Model Loading/Model.cpp: //========================================
22 meshes[i].Mesh::Draw(shader, camera, matricesMeshes[i]); // created matrices are not transferred
22 meshes[i].Mesh::Draw(shader, camera, matricesMeshes[i], translationsMeshes[i], rotationsMeshes[i], scalesMeshes[i]); // corrected
//--------------------------------------------------------------------
69 float rotValues[4] = // the function glm::make_quat() already contains a reduction to the "standard"
70 { // and does not expect manual rearrangement
71 node["rotation"][3], // fix to [0]
72 node["rotation"][0], // fix to [1]
73 node["rotation"][1], // fix to [2]
74 node["rotation"][2] // fix to [3]
75 };
76 rotation = glm::make_quat(rotValues);
//--------------------------------------------------------------------
108 glm::mat4 matNextNode = matrix * matNode * trans * rot * sca; // since it's fixed in sstring 22, it's redundant code
108 glm::mat4 matNextNode = matrix * matNode; // corrected
//--------------------------------------------------------------------
111 if (node.find("mesh") != node.end())
112 {
113 translationsMeshes.push_back(translation); // now these matrices may never appear
114 rotationsMeshes.push_back(rotation); //
115 scalesMeshes.push_back(scale); //
116 matricesMeshes.push_back(matNextNode); //
117 //
118 loadMesh(node["mesh"]); //
119 } //
translationsMeshes.push_back(translation); //
rotationsMeshes.push_back(rotation); // This is not a pretty fix at all,
scalesMeshes.push_back(scale); // but I haven’t come up with a better one yet
matricesMeshes.push_back(matNextNode); //
if (node.find("mesh") != node.end()) //
{ //
loadMesh(node["mesh"]); //
} //
//--------------------------------------------------------------------
172 unsigned char bytes[] = { data[i++], data[i++], data[i++], data[i++] }; //
201 unsigned char bytes[] = { data[i++], data[i++], data[i++], data[i++] }; //
211 unsigned char bytes[] = { data[i++], data[i++] }; //
221 unsigned char bytes[] = { data[i++], data[i++] }; //
310 vectors.push_back(glm::vec2(floatVec[i++], floatVec[i++])); // may not work
319 vectors.push_back(glm::vec3(floatVec[i++], floatVec[i++], floatVec[i++])); //
328 vectors.push_back(glm::vec4(floatVec[i++], floatVec[i++], floatVec[i++], floatVec[i++]));//
172 unsigned char bytes[] = { data[i ], data[i+1], data[i+2], data[i+3] }; // for(;i=i+4)
201 unsigned char bytes[] = { data[i ], data[i+1], data[i+2], data[i+3] }; // for(;i=i+4)
211 unsigned char bytes[] = { data[i ], data[i+1] }; // for(;i=i+2)
221 unsigned char bytes[] = { data[i ], data[i+1] }; // for(;i=i+2)
310 vectors.push_back(glm::vec2(floatVec[i ], floatVec[i+1])); // for(;i=i+2)
319 vectors.push_back(glm::vec3(floatVec[i ], floatVec[i+1], floatVec[i+2])); // for(;i=i+3)
328 vectors.push_back(glm::vec4(floatVec[i ], floatVec[i+1], floatVec[i+2], floatVec[i+3])); // for(_____;i=i+4)
YoutubeOpenGL 13 - Model Loading/Texture.cpp: //========================================
11 stbi_set_flip_vertically_on_load(true); // when creating an object JSON, texture orientation is already taken into account
// so you need to set a trigger to enable this feature if JSON is not used.
YoutubeOpenGL 13 - Model Loading/default.vert: //========================================
36 crntPos = vec3(model * translation * -rotation * scale * vec4(aPos, 1.0f)); // Now everything will work without "minus":
crntPos = vec3(model * translation * rotation * scale * vec4(aPos, 1.0f));
42 texCoord = mat2(0.0, -1.0, 1.0, 0.0) * aTex; // no longer needed
YoutubeOpenGL 16 - Face Culling & FPS Counter/Main.cpp: //========================================
71 glCullFace(GL_FRONT); // after all the fixes it no longer works
glCullFace (GL_BACK); // "the default" value is valid
The text was updated successfully, but these errors were encountered: