Added LOW/MEDIUM/HIGH settings

This commit is contained in:
Mathias Westerdahl
2017-02-24 11:06:19 +01:00
parent acbce5247f
commit d145c19de5
12 changed files with 12460 additions and 97 deletions

View File

@@ -8,15 +8,21 @@ function init(self)
go.set("#sprite", "scale", vmath.vector3(scale_width, scale_height, 1) )
if camera ~= nil and camera.start_capture(camera.CAMERA_TYPE_FRONT) then
self.cameraframe = camera.get_frame()
self.camerainfo = camera.get_info()
self.cameratextureheader = {width=self.camerainfo.width,
height=self.camerainfo.height,
type=resource.TEXTURE_TYPE_2D,
format=resource.TEXTURE_FORMAT_RGB,
num_mip_maps=1 }
if camera ~= nil then
--if camera.start_capture(camera.CAMERA_TYPE_FRONT, camera.CAPTURE_QUALITY_MEDIUM) then
if camera.start_capture(camera.CAMERA_TYPE_BACK, camera.CAPTURE_QUALITY_MEDIUM) then
self.cameraframe = camera.get_frame()
self.camerainfo = camera.get_info()
print("Initialized camera")
pprint(self.camerainfo)
self.cameratextureheader = {width=self.camerainfo.width,
height=self.camerainfo.height,
type=resource.TEXTURE_TYPE_2D,
format=resource.TEXTURE_FORMAT_RGB,
num_mip_maps=1 }
end
else
print("could not start camera capture")
end