Silverfrost Logo About Us | Contact Us
 

Argument types

Some OpenGL functions take single precision arguments, others double precision. In many cases it is possible to determine the argument type from the variant of the name. For example, glColor3f requires single precision arguments whereas, glColor3d requires double precision arguments.

With other OpenGL functions, the name does not help. For example, glAccum and glClearColor require single precision arguments whereas, glOrtho takes double precision arguments.

Unlike OpenGL functions, all GLAUX functions that take floating-point arguments require the arguments to be double precision.

You should carefully check the types of the arguments to any function before using it.

You must specify a double precision constant by using a 'D' exponent. Any constants for which you use neither 'D' nor DBLE( ) will be regarded as single precision and will yield unexpected results.

When linking, you are recommended to link directly with the import libraries rather than the DLLs. Using the import library will cause mismatched arguments to result in a link failure and enable you to quickly correct any errors.

 

 

Copyright © 1999-2017 Silverfrost Limited