There's a lot of learning material in the DirectX world that uses .fx files to manage shaders, and .fx seems to be well integrated with 3D packages such as Maya and 3D Studio Max

What do larger OpenGL projects use? Do they all have a bespoke format or are there any common standards in use that might have some tools to go with them?

I have found a 404 page on http://www.khronos.org/glfx/ and http://sourceforge.net/projects/glfx/files/ has no files at all in the download section.

Can you use .fx files with Cg as the languages are so close syntactically? I hear that Cg has poor performance on the ATI Linux drivers but at least it my help me get going on my own Nvidia system.


2 Answers 2


The Cg toolkit supports its own version of effect files, CgFX. These support techniques, states, annotations...

I don't have any experience with them personally, but they are supported by FX Composer, at least.

CGeffect cgCreateEffectFromFile( CGcontext context,
                                 const char * filename,
                                 const char ** args );

According to the Cg Toolkit 2.2 manual, "cgCreateEffectFromFile was introduced in Cg 1.4."


There is nothing equivalent in the OpenGL world, rolling your own format and loader is fine.

A effect format/library for OpenGL is lacking, and would make a good (FOSS) development.

  • \$\begingroup\$ I am happy to parse a simple text file format of my own, but I really don't wan't to write a plugin for something like Maya or Blender :) \$\endgroup\$
    – Bob Hazard
    Commented Jul 17, 2010 at 0:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .