@hawkwind:
I really don't understand, why you did this. All effect factories are replaceable. You can simply do the following in your game's initialization code to replace the default BumpMappingFactory and it will be automatically selected by the setBumpMappingEnabled() method of Shape3D:
EffectFactory.getInstance().registerBumpMappingFactory( myCustomBumpMappingFactory );
I don't see the need to modify the code like this.
Do you wante to recreate all the fixed pipeline with a shader-base pipeline?
OK. I think, I rushed the yesterday's post a little bit too much. I will try to explain it more in detail now.
Let's say, you have a Shape3D with some non-default settings like two textures, a special blending function, transparency settings, etc. These settings are passed to OpenGL the regular way. Now you want a certain custom effect on the shape, that can only be done through shaders. Then you have the problem, that you need to rebuild all the standard effects in a shader, since from the moment a shader program is used, the fixed function pipeline is completely ignored. You shader program would have to care for the correct handling of multitexturing for at least your two textures, your blending function, your transparency settings, etc. These shaders are not very complicated each for its own. But it would be pretty lame, if anyone would have to rewrite these shaders and customize them to fit in their own system.
What we need is a set of shaders, that do vertex-transformation, multi-texturnig, blending, etc. These shaders would have to be build in layers and push all the necessary (uniform) variables down to the next layer-shader, so that they all build a complete shader program to correctly render your shape with al the well known effects.
These layers would have to be accessible through the API to configure each layer through uniforms, to disable certain layers or replace them with custom shader code AND to put custom effect shaders between these layers like a bump mapping shader without losing the other layers' functionality and without having to rewrite any effect, that is currently available by default through fixed-function.
@Mathias: Did I forget anything to describe or to mention? Would be nice, if you could put your three cents into this discussion.
Marvin