GLSL vs CgFX

i was implementing CgFX (GLSL profile) a year ago but noticed that is does hell of alot glGet() calls internally to update the render states thus being sometimes amazingly slow. i tried out GLeffect which implements GLSL effect files and runs alot faster using GL lists for render state updates and restores so i kept it as my effect files solution.
i would like to support this and that but don’t know if its really worth it or CgFX got any better. Someone has any experience on that topic?

display lists are deprecated in GL 3.0.

JoeDoe: display lists are deprecated in GL 3.0.:
dammit! thanks for the info.

ok maybe khronos will come up with another effect solution aka glFX. http://khronos.org/glfx/

There’s a tool for converting hlsl to glsl

http://sourceforge.net/projects/hlsl2glsl

Haven’t looked at it myself, but seems like a good starting point for a custom effect system. Reckon it depends on how much work you’re willing to put into it. Not that it’s terribly difficult to write an FX-like system from scratch, but can be time consuming…

modus: There’s a tool for converting hlsl to glsl
have looked into it. kinda sucks. didn’t let me convert any HLSL code. was also in 0.9 state AFAIK.

modus: but can be time consuming …
that’s the problem. also display lists seem like an excellent thing for setting/restoring render states.

waiting …

Re. the HLSL > GLSL converter:
You’re much better off just converting it by hand yourself. I looked into this tool a while back, but I never got it to produce anything useful, to be honest.

a|x
http://machinesdontcare.wordpress.com

i assume everybody is setting render states in the code itself rather then using existing/selfmade effect files? for example using stencil shadows in one effect file with two passes (if two sided stencil is not supported) is fairly easy two write in one file and adjusting renderstates for each pass right in the file.
anyways, i guess im just a big fan of those effect files.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.