diff options
| author | Ray <raysan5@gmail.com> | 2016-08-06 17:09:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-06 17:09:57 +0200 |
| commit | 7f9513fbf41e9d340307fc0f9aeed8e5f4293a96 (patch) | |
| tree | 197829790c7dd766f2b5f44df6e5b64d895b73e4 /examples/models_heightmap.lua | |
| parent | 3b80e2c1e03e0f87d50ca8876b50a11c7df1f56f (diff) | |
| parent | 4960e6b6d7b4cba6125cfb8bb2fef043db8e5ba5 (diff) | |
| download | raylib-7f9513fbf41e9d340307fc0f9aeed8e5f4293a96.tar.gz raylib-7f9513fbf41e9d340307fc0f9aeed8e5f4293a96.zip | |
Merge pull request #173 from ghassanpl/develop
Fixes for some Lua bugs
Diffstat (limited to 'examples/models_heightmap.lua')
| -rw-r--r-- | examples/models_heightmap.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/models_heightmap.lua b/examples/models_heightmap.lua index f78e3af5..6d7f6f3f 100644 --- a/examples/models_heightmap.lua +++ b/examples/models_heightmap.lua @@ -21,13 +21,13 @@ local camera = Camera(Vector3(18.0, 16.0, 18.0), Vector3(0.0, 0.0, 0.0), Vector3 local image = LoadImage("resources/heightmap.png") -- Load heightmap image (RAM) local texture = LoadTextureFromImage(image) -- Convert image to texture (VRAM) -local map = LoadHeightmap(image, Vector3(16, 8, 16) -- Load heightmap model with defined size +local map = LoadHeightmap(image, Vector3(16, 8, 16)) -- Load heightmap model with defined size map.material.texDiffuse = texture -- Set map diffuse texture local mapPosition = Vector3(-8.0, 0.0, -8.0) -- Set model position (depends on model scaling!) UnloadImage(image) -- Unload heightmap image from RAM, already uploaded to VRAM -SetCameraMode(CAMERA.ORBITAL) -- Set an orbital camera mode +SetCameraMode(CameraMode.ORBITAL) -- Set an orbital camera mode SetCameraPosition(camera.position) -- Set internal camera position to match our custom camera position SetTargetFPS(60) -- Set our game to run at 60 frames-per-second @@ -37,7 +37,7 @@ SetTargetFPS(60) -- Set our game to run at 60 frames-per-secon while not WindowShouldClose() do -- 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 |
