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

Integrating JPCT-AE with Vuforia

(1/2) > >>

ashunkhs:
Hi Sir

 I am working fro Integrating JPCT-AE with Vuforia.  And  follow this link ....for help
 
 http://www.jpct.net/wiki/index.php/Integrating_JPCT-AE_with_Vuforia

 I did every thing same . I replace the letest  JPCT library also But my app is being cress in following line .

if (fb != null) {
         fb.dispose();
      }
      fb = new FrameBuffer(width, height);

 in  onSurfaceChanged(GL10 gl, int width, int height) methord.    and the error is  as................

04-09 08:16:48.110: E/AndroidRuntime(10749): FATAL EXCEPTION: GLThread 648
04-09 08:16:48.110: E/AndroidRuntime(10749): java.lang.RuntimeException: [ 1365495408106 ] - ERROR: java.lang.RuntimeException: [ 1365495408102 ] - ERROR: java.lang.RuntimeException: [ 1365495408100 ] - ERROR: Shaders are not supported when using OpenGL ES 1.x!
04-09 08:16:48.110: E/AndroidRuntime(10749):    at com.threed.jpct.Logger.log(Logger.java:189)
04-09 08:16:48.110: E/AndroidRuntime(10749):    at com.threed.jpct.GLSLShader.check20(GLSLShader.java:266)
04-09 08:16:48.110: E/AndroidRuntime(10749):    at com.threed.jpct.GLSLShader.<init>(GLSLShader.java:217)
04-09 08:16:48.110: E/AndroidRuntime(10749):    at com.threed.jpct.GL20.<init>(GL20.java:117)
04-09 08:16:48.110: E/AndroidRuntime(10749):    at java.lang.Class.newInstanceImpl(Native Method)
04-09 08:16:48.110: E/AndroidRuntime(10749):    at java.lang.Class.newInstance(Class.java:1319)




please check it out . what i have to do next..........?


regards
ashutosh

EgonOlsen:
Obviously, you are trying to use an OpenGL ES 2.0 renderer in a 1.x context. You should somehow check if your context is 1.x or 2.0 and create the framebuffer accordingly. Like the wiki says:


--- Quote ---NOTE: You can use OpenGL 1.0 or 2.0. If you have a phone that supports 2.0, Vuforia will fire a 2.0 surface and thus creating a framebuffer for 1.0 will cause the app to crash. For simplicity I am posting here the code that corresponds to OpenGLES 2.0 framebuffer initialization. You can add a OGL version check here and create the FB in consequence. If you want to use 1.0 only, you can force Vuforia to do so by going into Android.mk file under jni folder and setting the USE_OPENGL_ES_1_1 directive to true. Then use the FrameBuffer(gl, width, height) constructor instead of the one I used (which corresponds to OGLES2.0)

--- End quote ---

ashunkhs:
Hi ,

 as  we know  the following constructor

          fb = new FrameBuffer(width, height); for Gl 2.0.
i do't need to pass the gl context to  FrameBuffer() constructor.
then why i am getting this error.

check out my  onSurfaceChanged methord(); where i am doing mistake

/** Called when the surface changed size. */
   public void onSurfaceChanged(GL10 gl, int width, int height)
   {
      // Call native function to update rendering when render surface parameters have changed:
      updateRendering(width, height);

      // Call QCAR function to handle render surface size changes:
      QCAR.onSurfaceChanged(width, height); .................................case 1

             QCAR.onSurfaceChanged(gl, width, height);............................................case2
      
      if (fb != null) {
           fb.dispose();
      }
      fb = new FrameBuffer(width, height);
   }

both cases i am getting error.pls check it out.

EgonOlsen:
There's nothing for me to check out, i'm afraid. The constructor you are using is for 2.0. You obviously have no 2.0 context, but providing the context is out of the scope of the engine. It's up to you to check which kind of context you are getting from Vuforia and initialize the proper FrameBuffer.

ashunkhs:
 HI ,

   Now i a am able to render the cube on the surface in ImageTarget sample , but is still not same as tea-port model.
   it is still rotate there and there on the screen . i follow the all tricks provided by u by the following link.....
    http://www.jpct.net/wiki/index.php/Integrating_JPCT-AE_with_Vuforia
   
   i have set the FOV and FOVY also and further all the process i did i cube is not rendering as tea-port model.
   please help me out.

Navigation

[0] Message Index

[#] Next page

Go to full version