-
Hello there! I`ve just started learning the engine and I want to ask if it is possible to create an AR mode with it. |
Beta Was this translation helpful? Give feedback.
Answered by
soywiz
Jan 30, 2024
Replies: 1 comment 5 replies
-
@RjvPivs by AR do you mean Augmented Reality? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh I see. No, I didn't meant it was not possible, just that there is nothing specific implemented in KorGE about that.
You can use the camera API for the operating systems you are using and place them into a texture; for example Android and iOS and grab the image sequences and use them in code.
For example: https://developer.android.com/media/camera/camera-deprecated/camera-api
To avoid fetching pixels from the camera, if there is an API to get an OpenGL texture from the camera:
https://stackoverflow.com/questions/57331861/get-the-opengl-texture-handle-from-a-surfacetexture
Then you can use
ForcedTexNativeImage
:korge/korge/test/korlibs/korge/render/AgBitmapTextureManagerTest.kt
Line…