View Full Version : GLSL vs CgFX
11-10-2008, 04:40 AM
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?
11-11-2008, 12:02 AM
display lists are deprecated in GL 3.0.
11-11-2008, 01:15 AM
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/
11-11-2008, 01:40 AM
There's a tool for converting hlsl to glsl
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...
11-11-2008, 01:54 AM
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.
11-11-2008, 06:19 AM
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.
11-12-2008, 07:40 AM
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.