Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 and 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.

share|improve this question
up vote 2 down vote accepted

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."

share|improve this answer
Thank you I will look into that – Bob Hazard Jul 17 '10 at 0:13

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.

share|improve this answer
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 :) – Bob Hazard Jul 17 '10 at 0:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.