@@ -233,7 +233,7 @@ void initOGL()
233
233
234
234
proj = glm::perspective (glm::radians (60 .0f ), 1 .0f , 1 .0f , 50 .0f );
235
235
view = glm::mat4 (1 .0f );
236
- view[3 ].z = -45 .0f ;
236
+ view[3 ].z = -80 .0f ;
237
237
}
238
238
239
239
@@ -435,7 +435,7 @@ void initObj()
435
435
{
436
436
437
437
const struct aiScene * scene = NULL ;
438
- scene = aiImportFile (R"( ../model/teapot .obj)" , aiProcess_GenNormals);
438
+ scene = aiImportFile (R"( ../model/sphere .obj)" , aiProcess_GenNormals);
439
439
auto scene2 = aiApplyPostProcessing (scene, aiProcess_CalcTangentSpace);
440
440
auto mesh = scene2->mMeshes [0 ];
441
441
@@ -681,7 +681,7 @@ void renderFunc()
681
681
682
682
model = glm::mat4 (2 .0f );
683
683
model[3 ].w = 1 .0f ;
684
- model = glm::rotate (model, angle, glm::vec3 (1 .0f , 1 .0f , 0 .0f ));
684
+ // model = glm::rotate(model, angle, glm::vec3(1.0f, 1.0f, 0.0f));
685
685
renderCube ();
686
686
renderCubeNormals ();
687
687
@@ -794,6 +794,8 @@ void renderCubeNormals()
794
794
glm::mat4 modelView = view * model;
795
795
glm::mat4 modelViewProj = proj * view * model;
796
796
glm::mat4 normal = glm::transpose (glm::inverse (modelView));
797
+ glDisable (GL_CULL_FACE);
798
+
797
799
798
800
if (uModelViewMatNormals != -1 )
799
801
glUniformMatrix4fv (uModelViewMatNormals, 1 , GL_FALSE,
0 commit comments