Add RajawaliRenderer as a View

286 views Asked by At

I'm really new to Rajawali and was hoping to use a lot of their 3D functionality with the Android camera. My goal is to display a 3D object on a camera SurfaceView.

When doing this with a 2D object using native Android, the steps were:

  1. Get camera and a holder
  2. Create SurfaceView for the holder
  3. Display the camera preview
  4. Use a subclass of GLSurfaceView to draw stuff during the onDraw() call

My steps to do this using Rajawali are similar, except step 4. is now a subclass of RajawaliRenderer.

The problem is that the subclass of GLSurfaceView could be added as a child to the preview SurfaceView. RajawaliRendered has a method to getCurrentView(), but this returns null though the object has been constructed.

Any ideas?

0

There are 0 answers