java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 at com.threed.jpct.CompiledInstance._fill(CompiledInstance.java:1206) at com.threed.jpct.CompiledInstance.fill(CompiledInstance.java:746) at com.threed.jpct.Object3DCompiler.compile(Object3DCompiler.java:148) at com.threed.jpct.World.compile(World.java:1951) at com.threed.jpct.World.renderScene(World.java:1046) at test.com.cameratest.MainRenderer.onDrawFrame(MainActivity.java:196) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)

That's not very helpful at all. Some stack trace might help, but to be honest, your code is a wild mix of jPCT-AE and direct GL calls. Even without the exception, it's very unlikely that this will work, because you are pulling the rug from under the engine that way and you'll most likely end up with a undefined state and all kinds of errors and rendering bugs. If you want to mix jPCT-AE and some external image, there's a method for this: http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Texture.html#setExternalId(int, int)

java.lang.RuntimeException: failed creating program at com.blogspot.geekonjava.dsmodel_ar.TextureRenderer.surfaceCreated(TextureRenderer.java:117) at com.blogspot.geekonjava.dsmodel_ar.MainActivity$MyRenderer.onSurfaceChanged(MainActivity.java:203) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1511) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)

And by the way: FrameBuffer has two getPixels()-methods. Use these to read the screen's content. There's no need to use glReadPixel directly, because as said: jPCT-AE manages it's own state. Fiddling around with GL directly might screw this up.

Ok, but that has nothing to do with jPCT-AE. If your shader doesn't compile because of a syntax error, you should actually get a human readable message about it. In your case, you are getting a 1280, which mean invalid enum. Something in your setup code is wrong.

I managed to render Android camera preiview texture to GLSurfaceView now. However, only camera content or 3d model can be shown but BOTH. The following code results only showing the 3d model,but what I want is the 3d model is shown on top of the camera preview.

You are clearing the buffer after rendering the quad (again: Why are you still mixing jPCT-AE and GL calls? That's asking for all kinds of trouble. You don't have to do that you are not supposed to do it either...anyway...).Try to replace

30 is the next step down from 60, because all Android devices are using vertical synchronization. That means: If your app can output 80 fps, it will display 60fps. If it can only output 59fps, it will output 30fps. There's nothing you can do about that.

It is because I only found this way to render camera texture to the GLSurfaceView. Is there are method like "addStreamingBackground()" in jPCT-AE?

No, but you could setup your external texture (in that case, you need some GL calls at setup time), assign it to a jPCT-AE managed texture (as mentioned earlier) and blit it to the background in each frame.

Anyway, as long as your code works on all devices, you might want to stick with it for now. Just don't expect me to offer support for the parts that are native GL calls or for any side-effects that may occur.