From 76911d45a879838047b2845cd6124e9ca3af083a Mon Sep 17 00:00:00 2001 From: jussi Date: Sun, 29 Oct 2023 13:21:42 +0200 Subject: New object types for all types. --- examples/heightmap/main.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/heightmap/main.lua') diff --git a/examples/heightmap/main.lua b/examples/heightmap/main.lua index 1b194bb..aa693fb 100644 --- a/examples/heightmap/main.lua +++ b/examples/heightmap/main.lua @@ -9,6 +9,7 @@ local TILE_SIZE = 32 local monitor = 0 local camera = {} +local groundRenderTexture = -1 local groundTexture = -1 local tilesetTex = -1 local heigthImage = -1 @@ -47,10 +48,11 @@ function RL.init() mesh = RL.GenMeshHeightmap( heigthImage, { 16, 4, 16 } ) tilesetTex = RL.LoadTexture( RL.GetBasePath().."../resources/images/tiles.png" ) - groundTexture = RL.LoadRenderTexture( { TILE_SIZE * 16, TILE_SIZE * 16 } ) + groundRenderTexture = RL.LoadRenderTexture( { TILE_SIZE * 16, TILE_SIZE * 16 } ) + groundTexture = RL.GetRenderTextureTexture( groundRenderTexture ) -- Draw to ground texture. - RL.BeginTextureMode( groundTexture ) + RL.BeginTextureMode( groundRenderTexture ) for x = 1, 16 do for y = 1, 16 do -- cgit v1.2.3