glBlitFramebuffer.
This commit is contained in:
@@ -39,8 +39,8 @@ function RL.init()
|
||||
camera:setPosition( { 0, 8, 16 } )
|
||||
camera:setTarget( { 0, 0, 0 } )
|
||||
camera:setUp( { 0, 1, 0 } )
|
||||
-- camera.mode = camera.MODES.ORBITAL
|
||||
camera.mode = camera.MODES.FREE
|
||||
camera.mode = camera.MODES.ORBITAL
|
||||
-- camera.mode = camera.MODES.FREE
|
||||
-- camera.mode = camera.MODES.FIRST_PERSON
|
||||
|
||||
heigthImage = RL.LoadImage( RL.GetBasePath().."../resources/images/heightmap.png" )
|
||||
|
||||
@@ -300,7 +300,9 @@ function RL.draw()
|
||||
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.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.glBlitFramebuffer( framebuffer, -1, res, winSize, RL.GL_COLOR_BUFFER_BIT, RL.GL_NEAREST )
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user