Texture now can be either Texture or RenderTexture. No need to change texture source anymore.

This commit is contained in:
jussi
2023-05-01 18:23:36 +03:00
parent 8b6337446d
commit acc56fc7c2
18 changed files with 160 additions and 251 deletions

View File

@@ -288,15 +288,12 @@ end
function RL.draw()
RL.ClearBackground( RL.RED )
RL.SetTextureSource( RL.TEXTURE_SOURCE_TEXTURE )
RL.BeginTextureMode( framebuffer )
drawMap()
drawPlayer()
RL.EndTextureMode()
-- RL.SetTextureSource( RL.TEXTURE_SOURCE_RENDER_TEXTURE )
-- RL.DrawTexturePro( framebuffer, { 0, 0, res.x, -res.y }, { 0, 0, winSize.x, winSize.y }, { 0, 0 }, 0.0, RL.WHITE )
-- RL.SetTextureSource( RL.TEXTURE_SOURCE_TEXTURE )
RL.DrawTexturePro( framebuffer, { 0, 0, res.x, -res.y }, { 0, 0, winSize.x, winSize.y }, { 0, 0 }, 0.0, RL.WHITE )
RL.glBlitFramebuffer( framebuffer, -1, res, winSize, RL.GL_COLOR_BUFFER_BIT, RL.GL_NEAREST )
end