Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - BeerMonkey88

#1
Support / Re: texture loading problem
April 17, 2012, 03:02:38 AM
Awsome that worked :D at least it wasnt something with my code :)

Thanks
#2
Support / texture loading problem
April 16, 2012, 05:26:07 PM
Hey guys im pretty new to android and jpct and im having some problems loading textures
i have 6.png files in my res/raw and im loading them into the texturemanager like this..

TextureManager tx = TextureManager.getInstance();
Resources res = getResources();

tx.flush();
tx.addTexture("left", new Texture(res.openRawResource(R.raw.left)));
tx.addTexture("front", new Texture(res.openRawResource(R.raw.front)));
tx.addTexture("right", new Texture(res.openRawResource(R.raw.right)));
tx.addTexture("back", new Texture(res.openRawResource(R.raw.back)));
tx.addTexture("up", new Texture(res.openRawResource(R.raw.up)));
tx.addTexture("down", new Texture(res.openRawResource(R.raw.down)));


04-16 16:03:16.610: I/jPCT-AE(30229): onSurfaceCreated
04-16 16:03:16.730: D/dalvikvm(30229): GC_FOR_ALLOC freed 345K, 6% free 6764K/7175K, paused 45ms
04-16 16:03:16.730: I/jPCT-AE(30229): Loading Texture...
04-16 16:03:16.740: W/ResourceType(30229): getEntry failing because entryIndex 3 is beyond type entryCount 2
04-16 16:03:16.740: W/ResourceType(30229): Failure getting entry for 0x7f040003 (t=3 e=3) in package 0 (error -2147483647)
04-16 16:03:16.790: W/dalvikvm(30229): threadid=9: thread exiting with uncaught exception (group=0x401a3760)
04-16 16:03:16.800: E/AndroidRuntime(30229): FATAL EXCEPTION: GLThread 10
04-16 16:03:16.800: E/AndroidRuntime(30229): android.content.res.Resources$NotFoundException: Resource ID #0x7f040003
04-16 16:03:16.800: E/AndroidRuntime(30229): at android.content.res.Resources.getValue(Resources.java:1010)
04-16 16:03:16.800: E/AndroidRuntime(30229): at android.content.res.Resources.openRawResource(Resources.java:935)
04-16 16:03:16.800: E/AndroidRuntime(30229): at android.content.res.Resources.openRawResource(Resources.java:917)
04-16 16:03:16.800: E/AndroidRuntime(30229): at com.jkh8.animationstudio.AnimationStudio$MyRenderer.onSurfaceCreated(AnimationStudio.java:373)
04-16 16:03:16.800: E/AndroidRuntime(30229): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1414)
04-16 16:03:16.800: E/AndroidRuntime(30229): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1184)


Getting a resource not found exception but the files are there?
this is to load to a skybox btw if that makes any difference.?
any help would be great thanks.

Josh