Continue with the preview (The picture taken is frozen on the screen until the preview is explicitly restarted) or hide the CameraSurface all together.After getting the picture date from the camera, merge it with the Libgdx screen-shot and write the result, this process is quite slow and can be done in a separate thread.For taking a picture the Camera has a specific state machine that should be followed.Interact with the DeviceCameraController from your application code, most of the camera functionality is called asynchronously according to:.Create the DeviceCameraController object responsible for the Camera surface where the preview is drawn.Create the Libgdx view with alpha channel (this is not the default), so that the camera preview will be shown behind it.This functionality can be used in order to let the user see what going on behind the device while playing and walking on the street, or even have some interaction between the game and the real world (FPS game using the face detection mechanism?) This article shows how to integrate the Android device camera with your Libgdx application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |