From fe15e836bd87963d10bd301a3a24652763059e0d Mon Sep 17 00:00:00 2001 From: jussi Date: Thu, 6 Apr 2023 19:19:44 +0300 Subject: Switched to Raylib vertion 4.5. Removed some functions and added others. Main changes to camera3D. --- examples/heightmap/main.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/heightmap') 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() -- cgit v1.2.3