New object types for Image, Texture, RenderTexture, Camera2D, Camera3D and Shader.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user