hxl0809 / caelum

Automatically exported from code.google.com/p/caelum
0 stars 0 forks source link

CaelumSample.cg fragment program fails to compile using the version of Cg included in Ogre 1.7.1 and above. #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Integrate Caelum into an Ogre 1.7.1 or above application.
2. Run the application.

What is the expected output? What do you see instead?

The expected output is success messages in the Ogre.log file mentioning loading 
and compiling Caelum's shaders.  What happens instead are fatal compile errors.

What version of the product are you using? On what operating system?

0.6 on Win32

Please provide any additional information below.

The Cg authors apparently tightened up Cg's handling of preprocessor directives 
in fragment programs.  Oddly enough this does not appear to apply to vertex 
programs.  The attached patch modifies only the directives present in the 
fragment programs, allowing a successful shader compilation under Ogre.  It may 
not go far enough, especially if the Cg authors further tighten preprocessor 
behavior.

Original issue reported on code.google.com by drag...@gmail.com on 11 May 2011 at 10:58

Attachments: