mirror of
				https://github.com/Perlmint/glew-cmake.git
				synced 2025-11-04 06:15:10 +00:00 
			
		
		
		
	Merge https://github.com/nigels-com/glew.git into master HEAD at Sun Nov 13 17:45:14 GMT 2016
This commit is contained in:
		
						commit
						74c6c8f89a
					
				
							
								
								
									
										15
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								README.md
									
									
									
									
									
								
							@ -28,12 +28,11 @@ Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of
 | 
			
		||||
[glew-20160708.tgz](http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20160708.tgz/download)
 | 
			
		||||
*GLEW 2.0.0 RC: Core context, EGL support, no MX*
 | 
			
		||||
 | 
			
		||||
[glew-20160402.tgz](http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20160402.tgz/download)
 | 
			
		||||
*GLEW 2.0.0 RC: Core context, EGL support, no MX*
 | 
			
		||||
 | 
			
		||||
## Build
 | 
			
		||||
 | 
			
		||||
From a downloaded tarball or zip archive:
 | 
			
		||||
It is highly recommended to build from a tgz or zip release snapshot.
 | 
			
		||||
The code generation workflow is a complex brew of gnu make, perl and python, that works best on Linux or Mac.
 | 
			
		||||
For most end-users of GLEW the official releases are the best choice, with first class support.
 | 
			
		||||
 | 
			
		||||
### Linux and Mac
 | 
			
		||||
 | 
			
		||||
@ -41,9 +40,9 @@ From a downloaded tarball or zip archive:
 | 
			
		||||
 | 
			
		||||
##### Install build tools
 | 
			
		||||
 | 
			
		||||
Debian/Ubuntu/Mint:    `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev libosmesa-dev git`
 | 
			
		||||
Debian/Ubuntu/Mint:    `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev libosmesa-dev`
 | 
			
		||||
 | 
			
		||||
RedHat/CentOS/Fedora:  `$ sudo yum install libXmu-devel libXi-devel libGL-devel git`
 | 
			
		||||
RedHat/CentOS/Fedora:  `$ sudo yum install libXmu-devel libXi-devel libGL-devel`
 | 
			
		||||
 | 
			
		||||
##### Build
 | 
			
		||||
 | 
			
		||||
@ -61,9 +60,9 @@ Variables:  `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=`
 | 
			
		||||
 | 
			
		||||
##### Install build tools
 | 
			
		||||
 | 
			
		||||
Debian/Ubuntu/Mint:   `$ sudo apt-get install build-essential libXmu-dev libXi-dev libgl-dev git cmake`
 | 
			
		||||
Debian/Ubuntu/Mint:   `$ sudo apt-get install build-essential libXmu-dev libXi-dev libgl-dev cmake`
 | 
			
		||||
 | 
			
		||||
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel git cmake`
 | 
			
		||||
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel cmake`
 | 
			
		||||
 | 
			
		||||
##### Build
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -14,9 +14,13 @@ GLboolean glxewGetExtension (const char* name)
 | 
			
		||||
 | 
			
		||||
GLenum glxewInit ()
 | 
			
		||||
{
 | 
			
		||||
  Display* display;
 | 
			
		||||
  int major, minor;
 | 
			
		||||
  const GLubyte* extStart;
 | 
			
		||||
  const GLubyte* extEnd;
 | 
			
		||||
  /* check for a display */
 | 
			
		||||
  display = glXGetCurrentDisplay();
 | 
			
		||||
  if (display == NULL) return GLEW_ERROR_NO_GLX_DISPLAY;
 | 
			
		||||
  /* initialize core GLX 1.2 */
 | 
			
		||||
  if (_glewInit_GLX_VERSION_1_2()) return GLEW_ERROR_GLX_VERSION_11_ONLY;
 | 
			
		||||
  /* initialize flags */
 | 
			
		||||
@ -26,7 +30,7 @@ GLenum glxewInit ()
 | 
			
		||||
  GLXEW_VERSION_1_3 = GL_TRUE;
 | 
			
		||||
  GLXEW_VERSION_1_4 = GL_TRUE;
 | 
			
		||||
  /* query GLX version */
 | 
			
		||||
  glXQueryVersion(glXGetCurrentDisplay(), &major, &minor);
 | 
			
		||||
  glXQueryVersion(display, &major, &minor);
 | 
			
		||||
  if (major == 1 && minor <= 3)
 | 
			
		||||
  {
 | 
			
		||||
    switch (minor)
 | 
			
		||||
@ -46,7 +50,7 @@ GLenum glxewInit ()
 | 
			
		||||
  /* query GLX extension string */
 | 
			
		||||
  extStart = 0;
 | 
			
		||||
  if (glXGetCurrentDisplay != NULL)
 | 
			
		||||
    extStart = (const GLubyte*)glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS);
 | 
			
		||||
    extStart = (const GLubyte*)glXGetClientString(display, GLX_EXTENSIONS);
 | 
			
		||||
  if (extStart == 0)
 | 
			
		||||
    extStart = (const GLubyte *)"";
 | 
			
		||||
  extEnd = extStart + _glewStrLen(extStart);
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
/*
 | 
			
		||||
** The OpenGL Extension Wrangler Library
 | 
			
		||||
** Copyright (C) 2008-2015, Nigel Stewart <nigels[]users sourceforge net>
 | 
			
		||||
** Copyright (C) 2008-2016, Nigel Stewart <nigels[]users sourceforge net>
 | 
			
		||||
** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
 | 
			
		||||
** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
 | 
			
		||||
** Copyright (C) 2002, Lev Povalahev
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,7 @@
 | 
			
		||||
#define GLEW_ERROR_NO_GL_VERSION 1  /* missing GL version */
 | 
			
		||||
#define GLEW_ERROR_GL_VERSION_10_ONLY 2  /* Need at least OpenGL 1.1 */
 | 
			
		||||
#define GLEW_ERROR_GLX_VERSION_11_ONLY 3  /* Need at least GLX 1.2 */
 | 
			
		||||
#define GLEW_ERROR_NO_GLX_DISPLAY 4  /* Need GLX display for GLX support */
 | 
			
		||||
 | 
			
		||||
/* string codes */
 | 
			
		||||
#define GLEW_VERSION 1
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@ NAME = $(GLEW_NAME)
 | 
			
		||||
CC = cc
 | 
			
		||||
LD = cc
 | 
			
		||||
CFLAGS.EXTRA = -dynamic -fno-common
 | 
			
		||||
CFLAGS.EXTRA += -ansi -pedantic
 | 
			
		||||
CFLAGS.EXTRA += -std=c89 -pedantic
 | 
			
		||||
#CFLAGS.EXTRA += -no-cpp-precomp
 | 
			
		||||
LDFLAGS.EXTRA =
 | 
			
		||||
ifneq (undefined, $(origin GLEW_APPLE_GLX))
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,5 @@
 | 
			
		||||
# Note: PPC is no longer actively maintained for GLEW, but this configuration
 | 
			
		||||
#       is here for reference.
 | 
			
		||||
GLEW_DEST = /usr/local
 | 
			
		||||
NAME = $(GLEW_NAME)
 | 
			
		||||
CC = cc
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,7 @@ AR =
 | 
			
		||||
LIBTOOL = libtool -static -o
 | 
			
		||||
STRIP = 
 | 
			
		||||
CFLAGS.EXTRA = -dynamic -fno-common
 | 
			
		||||
CFLAGS.EXTRA += -std=c89 -pedantic
 | 
			
		||||
#CFLAGS.EXTRA += -no-cpp-precomp
 | 
			
		||||
CFLAGS.EXTRA += -arch i386 -arch x86_64
 | 
			
		||||
LDFLAGS.EXTRA = -arch i386 -arch x86_64
 | 
			
		||||
 | 
			
		||||
@ -3,6 +3,7 @@ NAME = $(GLEW_NAME)
 | 
			
		||||
CC = cc
 | 
			
		||||
LD = cc
 | 
			
		||||
CFLAGS.EXTRA = -arch x86_64 -dynamic -fno-common
 | 
			
		||||
CFLAGS.EXTRA += -std=c89 -pedantic
 | 
			
		||||
#CFLAGS.EXTRA += -no-cpp-precomp
 | 
			
		||||
LDFLAGS.EXTRA = -arch x86_64
 | 
			
		||||
ifneq (undefined, $(origin GLEW_APPLE_GLX))
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user