summaryrefslogtreecommitdiff
path: root/examples/bunnymark
diff options
context:
space:
mode:
authorjussi2023-03-30 00:13:02 +0300
committerjussi2023-03-30 00:13:02 +0300
commit6a7c660f33e8ec4d351c63779df27874124597c6 (patch)
treeae9c4e88093b1e89a9ca3d2ce71d996862247f72 /examples/bunnymark
parent9df23e32b02167dd41c8b5c25b852717163dfeda (diff)
downloadreilua-enhanced-6a7c660f33e8ec4d351c63779df27874124597c6.tar.gz
reilua-enhanced-6a7c660f33e8ec4d351c63779df27874124597c6.tar.bz2
reilua-enhanced-6a7c660f33e8ec4d351c63779df27874124597c6.zip
GetKeyName and GetKeyScancode.
Diffstat (limited to 'examples/bunnymark')
-rw-r--r--examples/bunnymark/main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/bunnymark/main.lua b/examples/bunnymark/main.lua
index 8bdc9b9..52f8393 100644
--- a/examples/bunnymark/main.lua
+++ b/examples/bunnymark/main.lua
@@ -71,14 +71,14 @@ end
function draw()
RL_ClearBackground( RAYWHITE )
- for i = 1, #bunnies do
+ for _, bunny in ipairs( bunnies ) do
-- NOTE: When internal batch buffer limit is reached (MAX_BATCH_ELEMENTS),
-- a draw call is launched and buffer starts being filled again;
-- before issuing a draw call, updated vertex data from internal CPU buffer is send to GPU...
-- Process of sending data is costly and it could happen that GPU data has not been completely
-- processed for drawing while new data is tried to be sent (updating current in-use buffers)
-- it could generates a stall and consequently a frame drop, limiting the number of drawn bunnies
- RL_DrawTexture( texBunny, { bunnies[i].position[1], bunnies[i].position[2] }, bunnies[i].color );
+ RL_DrawTexture( texBunny, { bunny.position[1], bunny.position[2] }, bunny.color )
end
RL_DrawRectangle( { 0, 0, screenWidth, 40 }, BLACK)