Projector class

Started by Thomas., November 07, 2012, 02:09:13 PM

Previous topic - Next topic

Thomas.

No, maxTextureLayers is set to 4

EgonOlsen

Strange then...it's this line that crashes:


myObj.multiTex[i][polyID] == TextureManager.TEXTURE_NOTFOUND


polyID is 0 in your case, so it can't be the problem. The length of multiTex should be maxTextureLayers-1, so if it crashes on index 1, it seems to me that the array has been created for only 2 texture layers. However, it's actually not supposed to crash...i've updated the beta jar with a version that should not crash but give a log output instead if it can't add another layer. It would be interesting to see what this prints out in your case.

Thomas.

Here is log. What is it mean?
11-11 12:05:12.101: I/jPCT-AE(15482): [ 1352631912106 ] - WARNING: No further texture stage available (2/1/4)!
11-11 12:05:12.101: I/jPCT-AE(15482): [ 1352631912106 ] - WARNING: No further texture stage available (2/3/4)!

EgonOlsen

It means that, while the config would allow for 4 stages, the actual arrays are smaller. Maybe i should modify the method to deal with this, but i would like to know the root cause. Are these serialized objects?

Thomas.

Particles and water-levels are created by code, everything else are serialized objects. 3DS and OBJ are no longer in use.

EgonOlsen

As a workaround, try to serialize them in unreduced, i.e. reduced set to false. I'll fix the method later to handle this case.

Thomas.

Oh, this is for testing purposes? Want to know if it will work? It is more than 50 objects. I'd rather wait for fix...

EgonOlsen

I've updated the beta, but haven't really tested the fix... ;) Please give it a try to see if it helps.

Thomas.

#23
It works ;) but projected shadows are shifted, I have to look where is problem

edit: game can be started, but there is still this:
11-11 14:32:38.082: I/jPCT-AE(19080): [ 1352640758087 ] - WARNING: No further texture stage available (2/3/4)!

EgonOlsen

How many layers are you using...looks like as if you've exceeded the maximum of 4 at least for some objects.