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

@@ -216,9 +216,7 @@ function RL.draw()
RL.DrawText( 0, "Press Enter to\nrestart", { 10, 10 }, 10, 2, RL.WHITE )
end
RL.EndTextureMode()
-- Draw framebuffer to window.
RL.SetTextureSource( RL.TEXTURE_SOURCE_RENDER_TEXTURE )
RL.DrawTexturePro( framebuffer, { 0, 0, RESOLUTION[1], -RESOLUTION[2] }, { 0, 0, winSize[1], winSize[2] }, { 0, 0 }, 0.0, RL.WHITE )
RL.SetTextureSource( RL.TEXTURE_SOURCE_TEXTURE )
end