Material States not showing

Hi All.

I've come back to my jME project(s) after a brief moment of distraction, and have come across a somewhat fatal problem for my game.

MaterialStates are not working… Always rendering as that mid grey.

It did prompt a brief look into textrues, but they don't have the same effect.

First thing, switch between LWJGL and JOGL… no good.

I thought it could be normals… so I changed from using a cusom 'column' class to using jme's box… and no change.

Then I re-implemented my game engines into the different types in jme (Standard, Basic, what a mess…), and tried them… and aside from discovering a new problem (offsets not working… very odd), there was no difference to the render.

This was getting painful. and the… I stumbled across this via google:

Ha! My nice new toy (MacBook Pro) was probably to blame. So now I'll have to try it in windows… could be a while for that.

If anyone has any suggestions, that would be cool.

Otherwise, just a word of warning… OS 10.7 (and 10.8, apparently) don't seem work as well as they could.



ran tests & more dev…

I can material states to show correctly with a direct coded app for both LWJGL and JOGL, so… it must be a code issue. I remember it working, but as its greyscale in jme 1 as well as 2, well, I guess that I need a later version of my code (which is on a dead laptop - no thanks to dell & nVidia).

Same hardware in windows has the same issues - old 'working' code in greyscale, and simple test code works.

The only thing that I can think of that might be different is that for my game, I create more render states.

2 scenes, only 1 of which is enabled & visible at a time, 2nd one created is displayed first. Render states are cached - which is pointless for lights, and useful for the floor & walls.

More investigations when I get time… which may be a while, as I might wait till I can repair my laptop.

Hmm… additional question - I noticed a post where the RenderStates were being created in the GL thread. This isn't the for either of my apps - marble game or test app - and the test app works.

Is it likely this will make a difference?

i think everything which calls lwjgl's GL* functions should happen inside the same thread.

sorry… life has been too busy happening for jme to get very far along…

changed the locking & used a game task callable to get the render state… and it made no difference.

also, it works from a different thread in my test program… sigh… and I can't see any (real) differences between the two when it comes to render states.

Thanks for the help. I'll just keep on looking (when I can).


Finally managed to ressurect my aircraft carrier (17" xps)… El Cheapo 'Repairs' didn't actually bother to put anything other than a token amount of thermal grease on the gpu.

copied the eclipse projects onto my mac… and spent a while sorting out classpath issues (sun.* has to be loaded as a protected package, as to apple.* and* in SO X… and on XP, lwjgl is loaded by a javax.* class, so I cant just locate the library manually)

And then, finally… no problems. No need to do extra work in the graphics thread.

I don't remember going through and changing much in that area, but I must have been in the middle of an attempt when my backup was made. Since then, I had completed a basic level editor, and put in a little more work into a viable multi threaded framework.

I'm not going to pour over files from a year old backup to look for a difference (no source control), I'm just going to say 'cool' and move along.

Thanks for al the suggestions though people. I appreciate it.