Coder Social home page Coder Social logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
One clarification above (logging this separately too): I commented out Line 17 
in DroidAR/src/gl2/GLSurfaceView.java:

//setEGLContextClientVersion(2);

Because this throws the error: 

Description Resource    Path    Location    Type
The method setEGLContextClientVersion(int) is undefined for the type 
GL2SurfaceView  GL2SurfaceView.java /DroidAR/src/gl2    line 17 Java Problem

Original comment by [email protected] on 18 Mar 2012 at 3:23

from droidar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Solved the undefined setEGLContextClientVersion(2) problem by recompiling with 
Android 3.1 (was using Android 1.6 before)

Recompiled ModelAdapters again as well with Android API 3.1 - crash is still 
there

Original comment by [email protected] on 18 Mar 2012 at 3:29

from droidar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Did you move the resources to the correct folder of your project? You need all 
ressources you want to use in your own project. Compare your project to 
ModelLoaderAdapters, there you can see where they are located

Original comment by simon.heinen on 18 Mar 2012 at 4:52

from droidar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
I did not create my own project - ran ModelLoaderAdapters directly - as soon as 
I click the "Cancel Accuracy test" icon, this exception appears... any model is 
not loaded at all

Original comment by [email protected] on 18 Mar 2012 at 4:55

from droidar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Ah right i'm sorry I didn't commit the libgdx models with the model loader. you 
will have to copy them from their projects to the ModelLoaderAdapters project 
manually. I didn't want to commit their 3d models to my repository without 
their permission, that's why you have to copy these files manually if you want 
to test it.

Original comment by simon.heinen on 18 Mar 2012 at 5:18

from droidar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Thanks - BTW what is the correct location to copy them? <root>/data/assets/ ? 

Original comment by [email protected] on 19 Mar 2012 at 6:31

from droidar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
If you don't want to change the code of the ModelLoaderAdapters project just 
create an assets folder in the project folder (ModelLoaderAdapters\assets) and 
put the models in there

Original comment by simon.heinen on 19 Mar 2012 at 8:06

  • Changed state: Done

from droidar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Well, it turned out libs/armeabi and armeabi-v7 folders were empty - putting 
the requisite library there resolved the crash

I can now see a circular shape (pedestal for demo'ing model?) but cannot load 
the shape itself - I copied robot-mesh.xml and robot.jpg from here:
http://libgdx.googlecode.com/svn/trunk/extensions/model-loaders/model-loaders-an
droid/assets/data/models/ and changed that line in the code

The apk is attached here

this is the output:


03-19 13:50:45.422: D/dalvikvm(19567): No JNI_OnLoad found in 
/data/data/de.rwth/lib/libgdx.so 0x4051d748, skipping init
03-19 13:50:45.422: D/WindowManagerImpl(19567): finishRemoveViewLocked, 
mViews[2]: com.android.internal.policy.impl.PhoneWindow$DecorView@40566c38
03-19 13:50:45.603: D/dalvikvm(19567): GC_CONCURRENT freed 196K, 46% free 
3096K/5639K, external 28K/512K, paused 7ms+40ms
03-19 13:50:45.783: D/ModelCreator(19567): Trying to load robot-mesh.xml
03-19 13:50:45.943: D/dalvikvm(19567): GC_FOR_MALLOC freed 211K, 47% free 
3157K/5895K, external 1K/512K, paused 22ms
03-19 13:50:46.263: I/dalvikvm(19567): Could not find method 
javax.xml.bind.JAXBContext.newInstance, referenced from method 
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadOgreMesh
03-19 13:50:46.263: W/dalvikvm(19567): VFY: unable to resolve static method 
11217: Ljavax/xml/bind/JAXBContext;.newInstance 
([Ljava/lang/Class;)Ljavax/xml/bind/JAXBContext;
03-19 13:50:46.263: D/dalvikvm(19567): VFY: replacing opcode 0x71 at 0x0008
03-19 13:50:46.263: D/dalvikvm(19567): VFY: dead code 0x000b-0038 in 
Lcom/badlogic/gdx/graphics/g3d/loaders/ogre/OgreXmlLoader;.loadOgreMesh 
(Ljava/io/InputStream;)Lcom/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Mesh;
03-19 13:50:46.263: I/dalvikvm(19567): Could not find method 
javax.xml.bind.JAXBContext.newInstance, referenced from method 
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadOgreSkeleton
03-19 13:50:46.263: W/dalvikvm(19567): VFY: unable to resolve static method 
11217: Ljavax/xml/bind/JAXBContext;.newInstance 
([Ljava/lang/Class;)Ljavax/xml/bind/JAXBContext;
03-19 13:50:46.263: D/dalvikvm(19567): VFY: replacing opcode 0x71 at 0x0008
03-19 13:50:46.263: D/dalvikvm(19567): VFY: dead code 0x000b-0038 in 
Lcom/badlogic/gdx/graphics/g3d/loaders/ogre/OgreXmlLoader;.loadOgreSkeleton 
(Ljava/io/InputStream;)Lcom/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Skel
eton;
03-19 13:50:46.273: D/szipinf(19567): Initializing inflate state
03-19 13:50:46.273: E/ModelCreator(19567): Could not load model
03-19 13:50:46.273: W/System.err(19567): 
com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file 'robot-mesh.xml'
03-19 13:50:46.273: W/System.err(19567):    at 
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadMeshes(OgreXmlLoade
r.java:68)
03-19 13:50:46.273: W/System.err(19567):    at 
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.load(OgreXmlLoader.java
:88)
03-19 13:50:46.283: W/System.err(19567):    at 
de.rwth.ModelLoader.loadModelFromFile(ModelLoader.java:94)
03-19 13:50:46.283: W/System.err(19567):    at 
de.rwth.ModelLoader.render(ModelLoader.java:126)
03-19 13:50:46.283: W/System.err(19567):    at 
gl.GL1Renderer.onDrawFrame(GL1Renderer.java:107)
03-19 13:50:46.283: W/System.err(19567):    at 
android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1367)
03-19 13:50:46.283: W/System.err(19567):    at 
android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1122)
03-19 13:50:46.283: W/System.err(19567): Caused by: 
com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load meshes
03-19 13:50:46.283: W/System.err(19567):    at 
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadMesh(OgreXmlLoader.
java:83)
03-19 13:50:46.283: W/System.err(19567):    at 
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadMeshes(OgreXmlLoade
r.java:66)
03-19 13:50:46.283: W/System.err(19567):    ... 6 more
03-19 13:50:46.283: W/System.err(19567): Caused by: 
java.lang.NoClassDefFoundError: javax.xml.bind.JAXBContext
03-19 13:50:46.283: W/System.err(19567):    at 
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadOgreMesh(OgreXmlLoa
der.java:347)
03-19 13:50:46.283: W/System.err(19567):    at 
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadMesh(OgreXmlLoader.
java:79)
03-19 13:50:46.283: W/System.err(19567):    ... 7 more
03-19 13:50:46.283: D/ModelCreator(19567): Result of trying is:
03-19 13:50:46.283: D/ModelCreator(19567): fileName=robot-mesh.xml
03-19 13:50:46.283: D/ModelCreator(19567): textureFileName=robot.jpg
03-19 13:50:46.283: D/ModelCreator(19567): model=null
03-19 13:50:46.283: D/ModelCreator(19567): keyFramedModel=null
03-19 13:50:46.283: D/ModelCreator(19567): skeletonModel=null
03-19 13:50:46.293: D/ModelCreator(19567): 
texture=com.badlogic.gdx.graphics.Texture@40524ae0

Original comment by [email protected] on 19 Mar 2012 at 8:52

Attachments:

from droidar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
knight.md2/knight.jpg loaded fine.. 

p.s. there was a typo in assets.txt - fix:

t:assets.txt
i:robot.jpg
b:robot-mesh.xml
i:knight.jpg
b:knight.md2

Original comment by [email protected] on 19 Mar 2012 at 10:41

from droidar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Ok I fixed the missing libs in the armeabi and armeabi-v7 folders, thanks for 
reporting this bug, I think I forgot to commit them.

I always had problems to load all the meshes, I think its a bug in the 
OgreXmlLoader of libgdx. It might also be that some initialization is missing 
from my side, I didn't have the time jet, to find it out. If you find a 
solution to load all model types correctly, let me know.

Original comment by simon.heinen on 19 Mar 2012 at 11:52

from droidar.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Sure, will do

Original comment by [email protected] on 19 Mar 2012 at 12:05

from droidar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.