Hello,
I have found problem with envmap textures on compiled objects.
Basically if object is compiled it is not possible to change envmap texture using PolygonManager.setPolygonTexture() method.
Steps to recreate:
1. set Config.glForceEnvMapToSecondStage = true;
2. create sphere using Primitives class
3. call calcTextureWrapSpherical(), build(), setEnvmapped(true)
4. assign two textures (some texture and envmap one)
5. call compile()
6. try to change textures to different ones
Expected results:
Both textures are changed and displayed correctly
Actual results:
Only first texture has been changed. It is not possible to change envmapped texture. If shared is used, it also does not get new texture
Optional steps using ObjectsEditor:
1. Download editor from: http://www.wojtech.virthost.pl/oe/oe_envmap.zip (http://www.wojtech.virthost.pl/oe/oe_envmap.zip) and run it using run.bat or run.sh
2. Create sphere from primitives
3. select expo_bamboo.png as Texture1 and set it's TextureMode to Multiply
4. select _env.png as EnvmapTexture and set it's TextureMode to Add [Both textures are visible]
5. change EnvmapTexture to _env2.png [Texture has been updated]
6. click Compiled checkbox [Object has been compiled correctly, textures are working ok]
7. change Texture1 and EnvmapTexture to other values
Actual result:
Texture1 has been changed
EnvmapTexture has not been changed
Thanks,
Wojtek
PS. One additional update: Calling setEnvmapped() has also no effect on compiled object.
I'm not sure ATM if this is a bug or by design...i'll look into it.
Try this jar: http://www.jpct.net/download/beta/jpct.jar (http://www.jpct.net/download/beta/jpct.jar)
It should fix the problem. Please let me know if that helps.
And i don't get the PS...
It is much better :)
Thanks,
Wojtek