Roman Grigoriev wrote:
I second what Erik said, extract your code from render.cxx and put them
in separates files.
Then it will be easier to use your code for new effects, no need for me
to reinvente the wheel :-)
I would like to add support for them, just in the proper way. That's why
it is still in my TODO box. It's just the time ...
Here are a few things to consider:
1. Move the Shader class over to a new file (probably shader.cxx and
shader.hxx) in SimGear/simgear/screen
2. Use the SimGear extension header files (you will probably need to
extend them (see FlightGear/docs-mini/README.extensions)
I think that you are right Erik!
But I propose a technique and you Erik - fgfs maitainer, so you can decide
where to put this classes
since you allready have exprerience with shaders.
I think this shader method have advantages that shaders are in text files
that can be changed by users without compiling all simgear and flightgear
Ok, but we must at least have a generic hardware independant shader (arb
This framework add you functionality to optimize shaders to you
current architecture (NV/ATI or other machines) so we have higher
framerates. because you can specify shaders that can be loaded to NV only or
ATI only and during fgfs startup we can detect archtecture and load proper
shader. for example using NV shaders on NV hardware can get 20% boost to
and detection of hardware is so easy you can only querry about
NV_fragment_program extension - so you have NV hardware overwise -ATI or
And of course shaders don't replace existing code (they can replace
existing effect), they are allways optional.
I'll have a deeper look at your code in a few days, I need to finish the
shadow code atm.
But I don't know about SGI - does this architecture support shaders at all?
So I think that if you add new classes to simgear people can start using
them and mekes things better.
Flightgear-devel mailing list