summaryrefslogtreecommitdiff
path: root/examples/heightmap/main.lua
diff options
context:
space:
mode:
authorjussi2023-04-06 19:19:44 +0300
committerjussi2023-04-06 19:19:44 +0300
commitfe15e836bd87963d10bd301a3a24652763059e0d (patch)
treea3bd6dbfcadfb3a5ba10a173d443da0595386d19 /examples/heightmap/main.lua
parent2526c9732e7ea35bc9ed3e43a4db77b7e6364c5a (diff)
downloadreilua-enhanced-fe15e836bd87963d10bd301a3a24652763059e0d.tar.gz
reilua-enhanced-fe15e836bd87963d10bd301a3a24652763059e0d.tar.bz2
reilua-enhanced-fe15e836bd87963d10bd301a3a24652763059e0d.zip
Switched to Raylib vertion 4.5. Removed some functions and added others. Main changes to camera3D.
Diffstat (limited to 'examples/heightmap/main.lua')
-rw-r--r--examples/heightmap/main.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/heightmap/main.lua b/examples/heightmap/main.lua
index 4c66dd6..d046d2a 100644
--- a/examples/heightmap/main.lua
+++ b/examples/heightmap/main.lua
@@ -31,7 +31,7 @@ function RL.init()
RL.SetCamera3DPosition( camera, { 0, 8, 16 } )
RL.SetCamera3DTarget( camera, { 0, 0, 0 } )
RL.SetCamera3DUp( camera, { 0, 1, 0 } )
- RL.SetCameraMode( camera, RL.CAMERA_FREE )
+ -- RL.SetCameraMode( camera, RL.CAMERA_FREE )
heigthImage = RL.LoadImage( RL.GetBasePath().."../resources/images/heightmap.png" )
@@ -58,7 +58,7 @@ function RL.init()
RL.DrawTextureRec( tilesetTex, dirtBottomRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, RL.WHITE )
else
RL.DrawTextureRec( tilesetTex, grassRec, { pos[1] * TILE_SIZE, pos[2] * TILE_SIZE }, RL.WHITE )
- end
+ end
end
end
@@ -67,7 +67,7 @@ function RL.init()
material = RL.LoadMaterialDefault()
RL.SetTextureSource( RL.TEXTURE_SOURCE_RENDER_TEXTURE )
-- RL.GenTextureMipmaps( groundTexture )
- -- RL.SetTextureFilter( groundTexture, TEXTURE_FILTER_TRILINEAR )
+ -- RL.SetTextureFilter( groundTexture, RL.TEXTURE_FILTER_TRILINEAR )
RL.SetMaterialTexture( material, RL.MATERIAL_MAP_ALBEDO, groundTexture )
RL.SetTextureSource( RL.TEXTURE_SOURCE_TEXTURE )
@@ -76,8 +76,8 @@ end
function RL.draw()
RL.ClearBackground( { 100, 150, 100 } )
- RL.UpdateCamera3D( camera )
-
+ RL.UpdateCamera3D( camera, RL.CAMERA_FIRST_PERSON )
+
RL.BeginMode3D( camera )
RL.DrawMesh( mesh, material, matrix )
RL.EndMode3D()