Setup for rcr to figure some stuff out.
This commit is contained in:
parent
5ce5b4dda4
commit
19a91bab18
3 changed files with 2 additions and 1 deletions
Binary file not shown.
BIN
08-colors-basic-light/assets/popcorn_model_a_bad_normals.glb
Normal file
BIN
08-colors-basic-light/assets/popcorn_model_a_bad_normals.glb
Normal file
Binary file not shown.
|
|
@ -21,6 +21,7 @@ void processInput(GLFWwindow *window);
|
||||||
|
|
||||||
const unsigned int SCR_WIDTH = 800;
|
const unsigned int SCR_WIDTH = 800;
|
||||||
const unsigned int SCR_HEIGHT = 600;
|
const unsigned int SCR_HEIGHT = 600;
|
||||||
|
const glm::vec3 POPCORN_SCALE{1.0f, 1.0f, 1.0f};
|
||||||
|
|
||||||
struct Config {
|
struct Config {
|
||||||
Shader shader;
|
Shader shader;
|
||||||
|
|
@ -239,7 +240,7 @@ void render(GLFWwindow* window, Config& config, BoxTest& box, b2World& world) {
|
||||||
|
|
||||||
model = glm::rotate(model, angle / 5.0f, glm::vec3(1.0f, 0.0f, 0.0f));
|
model = glm::rotate(model, angle / 5.0f, glm::vec3(1.0f, 0.0f, 0.0f));
|
||||||
model = glm::rotate(model, glm::radians(time * 10.0f), glm::vec3(0.0f, 1.0f, 1.0f));
|
model = glm::rotate(model, glm::radians(time * 10.0f), glm::vec3(0.0f, 1.0f, 1.0f));
|
||||||
model = glm::scale(model, glm::vec3(0.5f, 0.5f, 0.5f)); // it's a bit too big for our scene, so scale it down
|
model = glm::scale(model, POPCORN_SCALE); // it's a bit too big for our scene, so scale it down
|
||||||
config.shader.setMat4("model", model);
|
config.shader.setMat4("model", model);
|
||||||
config.model.Draw(config.shader);
|
config.model.Draw(config.shader);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue