diff options
| author | raysan5 <[email protected]> | 2016-09-26 19:15:44 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2016-09-26 19:15:44 +0200 |
| commit | 978c49472a1cdffa0bf12aba1638806c65e3f8ba (patch) | |
| tree | 53081835a4626e7a97948996a5bee4fcdcece4c1 /examples/shaders_model_shader.c | |
| parent | 753b549aa5c6a010fc4de8acc2f64afdfce69cee (diff) | |
| download | raylib-978c49472a1cdffa0bf12aba1638806c65e3f8ba.tar.gz raylib-978c49472a1cdffa0bf12aba1638806c65e3f8ba.zip | |
Working on camera system...
Diffstat (limited to 'examples/shaders_model_shader.c')
| -rw-r--r-- | examples/shaders_model_shader.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/examples/shaders_model_shader.c b/examples/shaders_model_shader.c index a1e00671..a5516eba 100644 --- a/examples/shaders_model_shader.c +++ b/examples/shaders_model_shader.c @@ -37,25 +37,22 @@ int main() Shader shader = LoadShader("resources/shaders/glsl330/base.vs", "resources/shaders/glsl330/grayscale.fs"); // Load model shader - dwarf.material.shader = shader; // Set shader effect to 3d model - dwarf.material.texDiffuse = texture; // Bind texture to model + dwarf.material.shader = shader; // Set shader effect to 3d model + dwarf.material.texDiffuse = texture; // Bind texture to model - Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position + Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position - // Setup orbital camera - SetCameraMode(CAMERA_ORBITAL); // Set an orbital camera mode - SetCameraPosition(camera.position); // Set internal camera position to match our camera position - SetCameraTarget(camera.target); // Set internal camera target to match our camera target + SetCameraMode(camera, CAMERA_ORBITAL); // Set an orbital camera mode - SetTargetFPS(60); // Set our game to run at 60 frames-per-second + SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- // Main game loop - while (!WindowShouldClose()) // Detect window close button or ESC key + while (!WindowShouldClose()) // Detect window close button or ESC key { // Update //---------------------------------------------------------------------------------- - UpdateCamera(&camera); // Update internal camera and our camera + UpdateCamera(&camera); // Update internal camera and our camera //---------------------------------------------------------------------------------- // Draw |
