Recent Posts

Pages: 1 ... 7 8 [9] 10
81
Projects / Re: Instrument Cluster for a Muscle Car
« Last post by Melssj5 on March 30, 2018, 03:07:08 pm »
Here is a pic of the app.
82
Projects / Instrument Cluster for a Muscle Car
« Last post by Melssj5 on March 30, 2018, 02:56:59 pm »
Hi friends, I am in a project building a custom cluster for the classic car I am restoring.

The idea is to do a digital instrument cluster using an android device with a jpct app and Arduino to link the Electronic with the app. Hope I can receive help for my project as I always have had.

Geetings from Ecuador.
83
Support / Re: Documentation Error
« Last post by EgonOlsen on March 29, 2018, 09:02:45 pm »
But that would just screw up the coordinates. I'm using the array as u1,v1,U2,v2...etc. Adding a w to that will just mix the uvs wildly.
84
Support / Re: Hello World - Demo
« Last post by EgonOlsen on March 29, 2018, 09:01:19 pm »
I can't check out the code ATM...but it might help to know what kind of crash (stack trace) you are getting.
85
Support / Hello World - Demo
« Last post by Varanda on March 27, 2018, 02:34:37 pm »
Hello All,

I am teaching Android UI development at a college in Canada and I would like to provide a very simplified demo of JPCL. It is not part of the curriculum but I thought that would be nice demo.

The idea was inspired on Prof. Giovanni Malnati  video:
https://youtu.be/6SLz7tMBA8k

However, I am having a hard time to make my demo to work. The App crashes while creating a framebuffer object. I tried GL ver 1 and a couple of other things and did not help. Following is the link for my App; in case someone would have some time to help would be great.

https://drive.google.com/open?id=1rAW3ybhmK9lNBX7wTG3dZ1bhu_2L-SWI


Thanks in advance,
Marcelo Varanda
86
Support / Re: Documentation Error
« Last post by AGP on March 22, 2018, 04:41:14 am »
They made more sense when I added them, though, if still not perfect.
87
Support / Re: Documentation Error
« Last post by EgonOlsen on March 20, 2018, 10:24:45 pm »
Well...no, it doesn't. jPCT has no concept of w? when it comes to texture coordinates.
88
Support / Documentation Error
« Last post by AGP on March 20, 2018, 09:40:16 pm »
The docs for Object3D state:

Quote
public Object3D(float[] coordinates,
                float[] normals,
                float[] uvs,
                int[] indices,
                int textureId)
uvs - the texture coordinates [u1,v1,u2,v2,...]

When in fact it seems to read ws too (thus being u1, v1, w1, u2, v2, w2...).
89
Support / Re: Crash (native)
« Last post by EgonOlsen on March 18, 2018, 08:36:56 pm »
Interesting...maybe I'm stripping dummy texture layers away...I'm not sure ATM, but if it works now... ;)
90
Support / Re: Crash (native)
« Last post by AeroShark333 on March 18, 2018, 04:38:30 pm »
Yes, it's save and it's cheap. However, compiling the object fixes the texture stage count for it. That's why you are getting that exception with the TextureInfo. YOu could assign a TextureInfo with the same amount of stage but using some dummy textures, compile, assing the actual textures. That should actually work.
So I tried this with two TextureInfo's (one 3-layered with dummy textureID and one 3-layered with the actual textureID's) but I am still getting the Exception.

Code: [Select]
final int dummyID = textureManager.getTextureID(textureManager.getNameByTexture(textureManager.getDummyTexture()));
final TextureInfo ti = new TextureInfo(dummyID);
ti.add(dummyID, TextureInfo.MODE_ADD);
ti.add(dummyID, TextureInfo.MODE_ADD);

obj.setTexture(ti);
obj.build();
obj.compile();
obj.strip();

world.addObject(obj);
world.renderScene(frameBuffer);
world.draw(frameBuffer);

This is how I first load the Object3D with 3 (not even sure if it actually gives 3...) texturelayers.

But when I apply the real TextureInfo (after loading Textures and getting their ID's) it will crash:
Code: [Select]
03-18 11:35:18.768: E/AndroidRuntime(4487): java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
03-18 11:35:18.768: E/AndroidRuntime(4487): at com.threed.jpct.Object3D.setTexture(Object3D.java:3660)
When the real TextureInfo only holds one texture(layer) it won't crash... So it doesn't really seem to set 3 layers using the dummy textures or something..?

EDIT:
I moved the obj.strip() line to after applying the real TextureInfo, which seemed to fix it...
Pages: 1 ... 7 8 [9] 10