From 2c5f93784ea1ba28ae15181917ff3e47656a93ad Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 27 May 2003 21:24:40 +0000 Subject: Version defines. include "version.h" in a few files. --- src/mesa/drivers/x11/fakeglx.c | 5 ++--- src/mesa/main/get.c | 8 ++++---- src/mesa/main/version.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 src/mesa/main/version.h diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 59f2ab04b9..84a5f5c84c 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -1,5 +1,3 @@ -/* $Id: fakeglx.c,v 1.82 2003/04/01 17:28:10 brianp Exp $ */ - /* * Mesa 3-D graphics library * Version: 5.1 @@ -50,6 +48,7 @@ #include "macros.h" #include "imports.h" #include "mtypes.h" +#include "version.h" #include "xfonts.h" #include "xmesaP.h" @@ -65,7 +64,7 @@ #define SERVER_MINOR_VERSION 4 /* This is appended onto the glXGetClient/ServerString version strings. */ -#define MESA_GLX_VERSION "Mesa 5.1" +#define MESA_GLX_VERSION "Mesa " MESA_VERSION_STRING /* Who implemented this GLX? */ #define VENDOR "Brian Paul" diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 7d61d49b85..999adcc84f 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -33,10 +33,10 @@ #include "macros.h" #include "mtypes.h" #include "texcompress.h" +#include "version.h" #include "math/m_matrix.h" - #define FLOAT_TO_BOOL(X) ( (X)==0.0F ? GL_FALSE : GL_TRUE ) #define INT_TO_BOOL(I) ( (I)==0 ? GL_FALSE : GL_TRUE ) #define ENUM_TO_BOOL(E) ( (E)==0 ? GL_FALSE : GL_TRUE ) @@ -6158,9 +6158,9 @@ _mesa_GetString( GLenum name ) GET_CURRENT_CONTEXT(ctx); static const char *vendor = "Brian Paul"; static const char *renderer = "Mesa"; - static const char *version_1_2 = "1.2 Mesa 5.1"; - static const char *version_1_3 = "1.3 Mesa 5.1"; - static const char *version_1_4 = "1.4 Mesa 5.1"; + static const char *version_1_2 = "1.2 Mesa " MESA_VERSION_STRING; + static const char *version_1_3 = "1.3 Mesa " MESA_VERSION_STRING; + static const char *version_1_4 = "1.4 Mesa " MESA_VERSION_STRING; ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h new file mode 100644 index 0000000000..92c71b3bf4 --- /dev/null +++ b/src/mesa/main/version.h @@ -0,0 +1,42 @@ +/* + * Mesa 3-D graphics library + * Version: 5.1 + * + * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef VERSION_H +#define VERSION_H + + +/* Mesa version */ +#define MESA_MAJOR 5 +#define MESA_MINOR 1 +#define MESA_PATCH 0 +#define MESA_VERSION_STRING "5.1" + +/* OpenGL API version */ +#define OPENGL_MAJOR 1 +#define OPENGL_MINOR 4 +#define OPENGL_VERSION_STRING "1.4" + + +#endif /* VERSION_H */ -- cgit v1.2.3