Implementing fixed function support

I’ve only begun to learn about how OpenGL works and how jME3 materials work internally, but I’ve noticed some things in the MatDefs that I’d like to ask about and perhaps see if I could help implementing more support for the OpenGL1 renderer.



So far I’ve noticed there are fixed function bindings for some material parameters, specified inside parentheses in the j3md files (like ( Color )) and of course the FixedFunc technique (which is usually empty).



Some material parameters don’t make use of the ( fixedfuncbinding ) even though there seems to be one in the FixedFuncBinding.java, namely UseVertexColor. Is this by intention or could it be added to improve functionality?



The FixedFunc technique is usually empty, but it seems it can contain the statement RenderState and LightMode FixedPipeline. What statements are supported in the FixedFunc technique and is there any way I could help by tracking down what statements would improve OpenGL1 rendering if added?



Two of the main problems I’ve found with the OpenGL1 renderer are:

  1. Skybox - using a skybox produces a full white background that shows some black parts at the edges.
  2. Text has no colour in Nifty.

    Why could this be and could you give me a hint as to where this could possibly be fixed with fixed function pipeline calls?
1 Like
@Tumaini said:
Two of the main problems I've found with the OpenGL1 renderer are:
1) Skybox - using a skybox produces a full white background that shows some black parts at the edges.
2) Text has no colour in Nifty.
Why could this be and could you give me a hint as to where this could possibly be fixed with fixed function pipeline calls?

For #1, this is an old issue. Our OpenGL1 renderer supports opengl 1.1 only, while cubemap skyboxes require 1.3 or higher.
For #2, this might have to do with the recent nifty material changes, @nehon: you may need to specify the fixed function binding for certain parameters in the material to make sure they are passed correctly to the opengl1 renderer.
@Momoko_Fan said:
For #2, this might have to do with the recent nifty material changes, @nehon: you may need to specify the fixed function binding for certain parameters in the material to make sure they are passed correctly to the opengl1 renderer.

ok will do