Skip to content

Commit

Permalink
Added Camera sample and fixed RayCast3D sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinnegatamante committed Jul 3, 2022
1 parent 777fb33 commit eeb0c77
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
28 changes: 28 additions & 0 deletions samples/Camera/index.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
local white = Color.new(255,255,255)

-- Initializing outer camera at 640x480@30
Camera.init(OUTER_CAM, VGA_RES, 30)

-- Main loop
while true do

-- Getting current camera output
scene = Camera.getOutput()

-- Blend camera scene
Graphics.initBlend()
Screen.clear()
Graphics.drawImage(160, 32, scene)
Graphics.debugPrint(5, 5, "Press TRIANGLE to return to the sample selector.",white)
Graphics.termBlend()

-- Check for input
if Controls.check(Controls.read(), SCE_CTRL_TRIANGLE) then
Camera.term()
break
end

-- Flip screen
Screen.flip()

end
2 changes: 2 additions & 0 deletions samples/RayCasting/index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ skybox = Graphics.loadImage("ux0:/data/lpp-vita/samples/RayCasting/skybox.png")
RayCast3D.useShading(true)
RayCast3D.setDepth(300)

local pad = 0

while true do

-- Rendering scene
Expand Down

0 comments on commit eeb0c77

Please sign in to comment.