|
@ -98,15 +98,16 @@ INT WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _ |
|
|
float ambientLightColor[] = {0.4f,0.4f,0.4f,1.0f}; |
|
|
float ambientLightColor[] = {0.4f,0.4f,0.4f,1.0f}; |
|
|
float ambientMaterial[] = { 0.2f,0.2f,0.2f,1.0f }; |
|
|
float ambientMaterial[] = { 0.2f,0.2f,0.2f,1.0f }; |
|
|
float diffuseLightColor[] = { 1.0f,1.0f,1.0f,1.0f }; |
|
|
float diffuseLightColor[] = { 1.0f,1.0f,1.0f,1.0f }; |
|
|
float diffuseMaterial[] = { 0.6f,0.6f,0.6f,1.0f }; |
|
|
|
|
|
float lightPos[] = {0.0f,1.5f,-3.0f,0.0f}; |
|
|
|
|
|
float spotLightDirection[] = {0.0f, -1.0f, 0.0f, 64.0f};//把最后一位改成......
|
|
|
|
|
|
float spotLightCutoff = 30.0f; |
|
|
|
|
|
|
|
|
float diffuseMaterial[] = { 0.6f, 0.6f, 0.6f, 1.0f }; |
|
|
|
|
|
float lightPos[] = {0.0f,1.5f,-3.0f,1.0f}; |
|
|
|
|
|
|
|
|
|
|
|
float spotLightDirection[] = {0.0f, -1.0f, 0.0f, 110.0f};//把最后一位改成......
|
|
|
|
|
|
float spotLightCutoff = 15.0f; |
|
|
float specularLightColor[] = { 1.0f,1.0f,1.0f,1.0f }; |
|
|
float specularLightColor[] = { 1.0f,1.0f,1.0f,1.0f }; |
|
|
float specularMaterial[] = { 1.0f,1.0f,1.0f,1.0f }; |
|
|
float specularMaterial[] = { 1.0f,1.0f,1.0f,1.0f }; |
|
|
float eyePos[] = { 0.0f,0.0f,0.0f }; |
|
|
float eyePos[] = { 0.0f,0.0f,0.0f }; |
|
|
|
|
|
|
|
|
glm::mat4 modelMatrix = glm::translate<float>(0.0f, -0.5f, -3.0f) * glm::rotate(-90.0f, 1.0f, 0.0f, 0.0f)*glm::scale(2.0f,2.0f,2.0f); |
|
|
|
|
|
|
|
|
glm::mat4 modelMatrix = glm::translate<float>(0.0f, -0.5f, -3.0f) * glm::rotate(-90.0f, 1.0f, 0.0f, 0.0f) * glm::scale(2.0f, 2.0f, 2.0f); |
|
|
glm::mat4 projectionMatrix = glm::perspective(50.0f, 800.0f / 600.0f, 0.1f, 1000.0f); |
|
|
glm::mat4 projectionMatrix = glm::perspective(50.0f, 800.0f / 600.0f, 0.1f, 1000.0f); |
|
|
|
|
|
|
|
|
glm::mat4 normalMatrix = glm::inverseTranspose(modelMatrix); |
|
|
glm::mat4 normalMatrix = glm::inverseTranspose(modelMatrix); |
|
|