problem in combining jpct with Qcar

Started by MrYogi, June 18, 2012, 07:46:53 AM

Previous topic - Next topic

MrYogi

framebuffer fill error when i tried to combine jpct with Qcar.
i used sample of jpct but following error comes while rendering

06-18 11:05:00.578: E/AndroidRuntime(6524): java.lang.ArrayIndexOutOfBoundsException
06-18 11:05:00.578: E/AndroidRuntime(6524): at com.threed.jpct.CompiledInstance.fill(CompiledInstance.java:1159)
06-18 11:05:00.578: E/AndroidRuntime(6524): at com.threed.jpct.Object3DCompiler.compile(Object3DCompiler.java:145)
06-18 11:05:00.578: E/AndroidRuntime(6524): at com.threed.jpct.World.compile(World.java:1911)
06-18 11:05:00.578: E/AndroidRuntime(6524): at com.threed.jpct.World.renderScene(World.java:1035)
06-18 11:05:00.578: E/AndroidRuntime(6524): at com.qualcomm.QCARSamples.ImageTargets.jpct.onDrawFrame(Jpct.java:85)


can anyone tell why this is happening ,since i am new to jpct.
Jpct is seemed to be very promising rendering library as far as i known yet,so plz help me out,i'm stuck at this
thanks in advance :-[

EgonOlsen

jPCT isn't thread-safe. Make sure that are not fiddling around with World, Object3D, Camera...from any other than the rendering thread. Or at least synchronize it with the rendering if you absolutely have to.

MrYogi

#2
Quote from: EgonOlsen on June 18, 2012, 08:22:47 AM
jPCT isn't thread-safe. Make sure that are not fiddling around with World, Object3D, Camera...from any other than the rendering thread. Or at least synchronize it with the rendering if you absolutely have to.
i'm just testing your cube sample ,no other rendering thread is there.
and on googling i found that some people had succeded in integrating Qcar and Jpct,and by passing matrix values from qcar to jpct model is positioned according the image detection,can you plz help me out in this

EgonOlsen

I'm wasn't taking about another rendering thread (which isn't possible anyway)...but you are implicitely using a second thread, if you do stuff in an onXXXX-method for example.

MrYogi

no i don't changed sample code for onDraw or any other,i am just using jpct render on separate GLSurfaceView that's all.

EgonOlsen

I think we are talking about different things...can you post your modified code, if it isn't too large?

MrYogi

hi EgonOlsen,
thanks for your help,now jpct is rendering on Qcar .
now for my final goal i like to know that ,to draw model according to the modelview matrix i get from Qcar ,where should i pass matrix values in jpct?
and modelview matrix is enough or projection is also needed,and finally is any transformation also needed before passing the values.?
i know some people done that but i got no idea.

EgonOlsen

Quote from: MrYogi on June 19, 2012, 06:39:16 AM
i know some people done that but i got no idea.
Neither do i...you should be able to find some working example in particular sticky thread.