summaryrefslogtreecommitdiff
path: root/examples/heightmap
diff options
context:
space:
mode:
authorjussi2023-10-29 13:21:42 +0200
committerjussi2023-10-29 13:21:42 +0200
commit76911d45a879838047b2845cd6124e9ca3af083a (patch)
tree2ff82956451818faaa8956fa2af543fc32646a03 /examples/heightmap
parentfd49d806cf1f54fb86c3ed7b9db499f473a3ef1d (diff)
downloadreilua-enhanced-76911d45a879838047b2845cd6124e9ca3af083a.tar.gz
reilua-enhanced-76911d45a879838047b2845cd6124e9ca3af083a.tar.bz2
reilua-enhanced-76911d45a879838047b2845cd6124e9ca3af083a.zip
New object types for all types.
Diffstat (limited to 'examples/heightmap')
-rw-r--r--examples/heightmap/main.lua6
1 files changed, 4 insertions, 2 deletions
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