View Full Version : gl_ext.h, and arb_precision_hint

Mikkel Gjoel
03-30-2004, 05:22 AM

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?


03-30-2004, 07:38 AM
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. 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.

03-30-2004, 07:58 AM
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:

OPTION ARB_precision_hint_nicest;

Mikkel Gjoel
03-31-2004, 12:19 AM
Ah, that makes sense - a hint per program. I wonder how that works with CG though :)