modules/world: scissor the view when attaching the camera
This commit is contained in:
parent
bc0b1bb87b
commit
1ba74a534d
1 changed files with 3 additions and 0 deletions
|
@ -177,7 +177,9 @@ function CameraSystem:attachView(id)
|
|||
if (id ~= nil) then
|
||||
local cam = self:getViewCam(id)
|
||||
|
||||
local viewx, viewy, vieww, viewh = self:getOnScreenViewCoordinate(id)
|
||||
cam:attach()
|
||||
love.graphics.setScissor(viewx, viewy, vieww, viewh)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -185,6 +187,7 @@ function CameraSystem:detachView(id)
|
|||
if (id ~= nil) then
|
||||
local cam = self:getViewCam(id)
|
||||
|
||||
love.graphics.setScissor( )
|
||||
cam:detach()
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue