gl_ext.h, and arb_precision_hint

Hi…

Do Nvidia rely on oss.sgi.com to provide gl_ext.h header-files, or are they available from a different source?
I heard about the ARB_PRECISION_HINT about half a year ago but it still hasn’t shown up in the gl_ext.h - even though it is mentioned in the GDC04-papers from nvidia.

So, in any case, how do I get access to the defines for this hint?

\hornet

The only precision hint I know of is via glHint. It’s a global hint for fragment programs that became available with ARB_fragment_program.

3.11.4.5.2 Precision Hint Options

Fragment program computations are carried out at an implementation-dependent precision. However, some implementations may be able to perform fragment program computations at more than one precision, and may be able to trade off computation precision for performance.

If a fragment program specifies the “ARB_precision_hint_fastest” program option, implementations should select precision to minimize program execution time, with possibly reduced precision. If a fragment program specifies the “ARB_precision_hint_nicest” program option, implementations should maximize the precision, with possibly increased execution time.

Only one precision control option may be specified by any given fragment program. A fragment program that specifies both the “ARB_precision_hint_fastest” and “ARB_precision_hint_nicest” program options will fail to load.

This hint is not used via glHint. It is a option that is directly written into the fragment program. Because of that there is no define necessary.
You just put it at the top of your fragment program:

!!ARBfp1.0
OPTION ARB_precision_hint_nicest; 
...

Lars

Ah, that makes sense - a hint per program. I wonder how that works with CG though :slight_smile:

\hornet