jPCT-AE - a 3d engine for Android > Support

How to display 2D image to 3D screen

(1/1)

Hellfire:
Hello friends. How to display 2D Image to the camera?
I'am trying to make a Joystick

AeroShark333:
Hello welcome!


--- Quote from: Hellfire on November 21, 2022, 12:13:39 pm ---Hello friends. How to display 2D Image to the camera?
I'am trying to make a Joystick

--- End quote ---
I'd recommend the blitting functions of the FrameBuffer:
https://www.jpct.net/jpct-ae/doc/com/threed/jpct/FrameBuffer.html#blit-com.threed.jpct.Texture-float-float-float-float-float-float-float-float-int-boolean-

I hope this helps :)

Hellfire:

--- Quote from: AeroShark333 on November 21, 2022, 10:27:21 pm ---Hello welcome!


--- Quote from: Hellfire on November 21, 2022, 12:13:39 pm ---Hello friends. How to display 2D Image to the camera?
I'am trying to make a Joystick

--- End quote ---
I'd recommend the blitting functions of the FrameBuffer:
https://www.jpct.net/jpct-ae/doc/com/threed/jpct/FrameBuffer.html#blit-com.threed.jpct.Texture-float-float-float-float-float-float-float-float-int-boolean-

I hope this helps :)

--- End quote ---
Thank you, its working, i didn't have the perfect texture though  ::) ::)

AeroShark333:

--- Quote from: Hellfire on November 22, 2022, 12:39:50 pm ---Thank you, its working, i didn't have the perfect texture though  ::) ::)

--- End quote ---
Glad to hear!

For a joystick, I'd recommend a PNG file as texture (where the outside is transparent), otherwise a JPG texture (where the outside is black).
Make sure to use the constructors in Texture that have 'useAlpha' (which you should then set to true): https://www.jpct.net/jpct-ae/doc/com/threed/jpct/Texture.html#Texture-Bitmap-boolean-

Navigation

[0] Message Index

Go to full version