diff options
| author | jussi | 2023-10-27 22:53:56 +0300 |
|---|---|---|
| committer | jussi | 2023-10-27 22:53:56 +0300 |
| commit | 7ef87c8e2f7824a8abfe715aef23b4a6d2e4db78 (patch) | |
| tree | a1a669e8af511c79657cbad1de69419c86212127 /examples/platformer/main.lua | |
| parent | 4cb4edcaf0d8b08d888a60d1a5d36f6e3690a4df (diff) | |
| download | reilua-enhanced-7ef87c8e2f7824a8abfe715aef23b4a6d2e4db78.tar.gz reilua-enhanced-7ef87c8e2f7824a8abfe715aef23b4a6d2e4db78.tar.bz2 reilua-enhanced-7ef87c8e2f7824a8abfe715aef23b4a6d2e4db78.zip | |
New object types for Image, Texture, RenderTexture, Camera2D, Camera3D and Shader.
Diffstat (limited to 'examples/platformer/main.lua')
| -rw-r--r-- | examples/platformer/main.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/platformer/main.lua b/examples/platformer/main.lua index f989aec..cee0627 100644 --- a/examples/platformer/main.lua +++ b/examples/platformer/main.lua @@ -16,6 +16,7 @@ local res = Vec2:new( 160, 144 ) local winScale = 5 local winSize = res:scale( winScale ) local framebuffer = RL.LoadRenderTexture( res ) +local framebufferTex = RL.GetRenderTextureTexture( framebuffer ) local monitor = 0 local tilemap = { size = Vec2:new( res.x / TILE_SIZE, res.y / TILE_SIZE ), @@ -293,7 +294,12 @@ function RL.draw() drawPlayer() RL.EndTextureMode() - RL.DrawTexturePro( framebuffer, { 0, 0, res.x, -res.y }, { 0, 0, winSize.x, winSize.y }, { 0, 0 }, 0.0, RL.WHITE ) + -- local framebufferTex = RL.GetRenderTextureTexture( framebuffer ) + -- local texId = RL.GetTextureId( framebufferTex ) + -- print( "texId", texId ) + RL.DrawTexturePro( framebufferTex, { 0, 0, res.x, -res.y }, { 0, 0, winSize.x, winSize.y }, { 0, 0 }, 0.0, RL.WHITE ) + + -- collectgarbage( "collect" ) -- RL.glBlitFramebuffer( framebuffer, -1, res, winSize, RL.GL_COLOR_BUFFER_BIT, RL.GL_NEAREST ) end |
