surfaceview + glsurfaceview + framelayout

后端 未结 4 1554
傲寒
傲寒 2021-02-04 14:07

I\'m new at java and OpenGL.

I\'m trying to get a camera preview screen with the ability to display 3d objects simultaneously. Having gone through the samples at the a

4条回答
  •  你的背包
    2021-02-04 14:37

    This is very simple actually...if you want to define your view in XML you just have to implement

    Public GLSurfaceView(Context context, AttributeSet attrs) {
    ...
    super(context, attrs);
    }
    

    instead of GLSurfaceView(Context context)

    That's the one that gets called automatically when the view is initialized from the XML. I had the same problem and that's how it was fixed.

提交回复
热议问题