From 10067e464132e6d484c34dd277da5eb5e21cf491 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 28 Aug 2009 15:37:25 -0700 Subject: ARB sync: Add infrastructure for glGetInteger64v --- src/mesa/main/macros.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/main/macros.h') diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index 4ca7957ffad..3d9a1aba98d 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -99,6 +99,9 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256]; /* a close approximation: */ #define FLOAT_TO_INT(X) ( (GLint) (2147483647.0 * (X)) ) +/** Convert GLfloat in [-1.0,1.0] to GLint64 in [-(1<<63),(1 << 63) -1] */ +#define FLOAT_TO_INT64(X) ( (GLint64) (9223372036854775807.0 * (double)(X)) ) + /** Convert GLint in [-2147483648,2147483647] to GLfloat in [-1.0,1.0], texture/fb data */ #define INT_TO_FLOAT_TEX(I) ((I) == -2147483648 ? -1.0F : (I) * (1.0F/2147483647.0)) -- cgit v1.2.3