|
@ -13,7 +13,7 @@ FullScreenQuad *fsq; |
|
|
void Init() |
|
|
void Init() |
|
|
{ |
|
|
{ |
|
|
model.Init("Res/Sphere.obj"); |
|
|
model.Init("Res/Sphere.obj"); |
|
|
model.mShader->Init("Res/diffuse.vs", "Res/diffuse.fs"); |
|
|
|
|
|
|
|
|
model.mShader->Init("Res/specular.vs", "Res/specular.fs"); |
|
|
model.SetPosition(0.0f, 0.0f, 0.0f); |
|
|
model.SetPosition(0.0f, 0.0f, 0.0f); |
|
|
|
|
|
|
|
|
//设置环境光参数
|
|
|
//设置环境光参数
|
|
@ -27,7 +27,7 @@ void Init() |
|
|
|
|
|
|
|
|
//设置高光参数
|
|
|
//设置高光参数
|
|
|
model.SetSpecularMaterial(1.0f, 1.0f, 1.0f, 1.0f); |
|
|
model.SetSpecularMaterial(1.0f, 1.0f, 1.0f, 1.0f); |
|
|
model.mShader->SetVec4("U_SpecualrLight", 1.0f, 1.0f, 1.0f, 1.0f); |
|
|
|
|
|
|
|
|
model.mShader->SetVec4("U_SpecularLight", 1.0f, 1.0f, 1.0f, 1.0f); |
|
|
|
|
|
|
|
|
viewMatrix = glm::lookAt(cameraPos, glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f)); |
|
|
viewMatrix = glm::lookAt(cameraPos, glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f)); |
|
|
fsq = new FullScreenQuad(); |
|
|
fsq = new FullScreenQuad(); |
|
|