glew: Initial import.

From glew 1.5.1 release.
This commit is contained in:
José Fonseca
2009-01-23 12:32:35 +00:00
parent d150e6a2e6
commit 57d00016ca
21 changed files with 35552 additions and 14 deletions

View File

@@ -90,7 +90,7 @@ else
endif
# Directories
SRC_DIRS = gallium mesa glu glut/beos
SRC_DIRS = gallium mesa glu glut/beos glew
GLU_DIRS = sgi
DRIVER_DIRS = beos
PROGRAM_DIRS = beos samples redbook demos tests

View File

@@ -47,7 +47,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now:
SRC_DIRS = glx/x11 mesa glu glut/glx
SRC_DIRS = glx/x11 mesa glu glut/glx glew
GLU_DIRS = sgi
DRIVER_DIRS = osmesa
#DRIVER_DIRS = dri

View File

@@ -29,5 +29,5 @@ GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now:
SRC_DIRS = gallium mesa glu glut/glx
SRC_DIRS = gallium mesa glu glut/glx glew

View File

@@ -48,6 +48,7 @@ INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
GL_LIB = GL
GLU_LIB = GLU
GLUT_LIB = glut
GLEW_LIB = GLEW
GLW_LIB = GLw
OSMESA_LIB = OSMesa
@@ -56,6 +57,7 @@ OSMESA_LIB = OSMesa
GL_LIB_NAME = lib$(GL_LIB).so
GLU_LIB_NAME = lib$(GLU_LIB).so
GLUT_LIB_NAME = lib$(GLUT_LIB).so
GLEW_LIB_NAME = lib$(GLEW_LIB).so
GLW_LIB_NAME = lib$(GLW_LIB).so
OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
@@ -77,7 +79,7 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2
# Directories to build
LIB_DIR = lib
SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glw
SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw
GLU_DIRS = sgi
DRIVER_DIRS =
# Which subdirs under $(TOP)/progs/ to enter:

View File

@@ -41,7 +41,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11
# Directories
SRC_DIRS = glx/x11 gallium mesa glu glut/glx glw
SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw
DRIVER_DIRS = dri
PROGRAM_DIRS =
WINDOW_SYSTEM=dri

View File

@@ -33,7 +33,7 @@ CFLAGS = $(OPT_FLAGS) -Wall -Winline -Wmissing-prototypes \
CXXFLAGS = $(CFLAGS)
# Omitting glw here:
SRC_DIRS = gallium mesa gallium/winsys glu glut/glx
SRC_DIRS = gallium mesa gallium/winsys glu glut/glx glew
MKDEP_OPTIONS = -fdepend -Y

View File

@@ -26,7 +26,7 @@ ifeq ($(HAVE_X86), yes)
endif
# Directories
SRC_DIRS = gallium mesa glu glut/directfb
SRC_DIRS = gallium mesa glu glut/directfb glew
GLU_DIRS = sgi
DRIVER_DIRS = directfb
PROGRAM_DIRS = demos directfb

View File

@@ -56,10 +56,10 @@ USING_EGL=0
# Directories
ifeq ($(USING_EGL), 1)
SRC_DIRS = egl glx/x11 gallium mesa glu glut/glx glw
SRC_DIRS = egl glx/x11 gallium mesa glu glut/glx glew glw
PROGRAM_DIRS = egl
else
SRC_DIRS = glx/x11 gallium mesa glu glut/glx glw
SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw
PROGRAM_DIRS = xdemos
endif

View File

@@ -9,7 +9,7 @@ CFLAGS = -O3 -ffast-math -ansi -pedantic -fPIC -D_POSIX_C_SOURCE=199309L -D_SVID
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
SRC_DIRS = gallium mesa glu glut/fbdev
SRC_DIRS = gallium mesa glu glut/fbdev glew
DRIVER_DIRS = fbdev osmesa
PROGRAM_DIRS = fbdev demos redbook samples

View File

@@ -47,7 +47,7 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
# Directories
SRC_DIRS = glx/x11 glu glut/glx glw
SRC_DIRS = glx/x11 glu glut/glx glew glw
DRIVER_DIRS =
PROGRAM_DIRS =
WINDOW_SYSTEM=dri

View File

@@ -46,7 +46,7 @@ GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
# Directories
SRC_DIRS = glx/mini gallium mesa glu glut/mini
SRC_DIRS = glx/mini gallium mesa glu glut/mini glew
DRIVER_DIRS = dri
PROGRAM_DIRS = miniglx

12262
include/GL/glew.h Normal file

File diff suppressed because it is too large Load Diff

1397
include/GL/glxew.h Normal file

File diff suppressed because it is too large Load Diff

1165
include/GL/wglew.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -5,6 +5,7 @@ SConscript('gallium/SConscript')
if 'mesa' in env['statetrackers']:
SConscript('mesa/SConscript')
SConscript('glut/glx/SConscript')
SConscript('gallium/winsys/SConscript')
SConscript('glut/glx/SConscript')
SConscript('glew/SConscript')

73
src/glew/LICENSE.txt Normal file
View File

@@ -0,0 +1,73 @@
The OpenGL Extension Wrangler Library
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
Copyright (C) 2002, Lev Povalahev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name of the author may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Mesa 3-D graphics library
Version: 7.0
Copyright (C) 1999-2007 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.
Copyright (c) 2007 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are 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 Materials.
THE MATERIALS ARE 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 THE AUTHORS OR COPYRIGHT HOLDERS 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
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.

55
src/glew/Makefile Normal file
View File

@@ -0,0 +1,55 @@
# src/glew/Makefile
TOP = ../..
include $(TOP)/configs/current
##### MACROS #####
GLEW_LIB_NAME = libglew.a
MAJOR = 1
MINOR = 5
TINY = 0
SOURCES = \
glew.c
OBJECTS = $(SOURCES:.c=.o)
##### RULES #####
.c.o:
$(CC) -c -I$(TOP)/include $(X11_INCLUDES) $(CFLAGS) $<
##### TARGETS #####
default: $(TOP)/$(LIB_DIR)/$(GLEW_LIB_NAME)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLEW_LIB_NAME): depend $(OBJECTS)
$(MKLIB) -o $(GLEW_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
-id $(INSTALL_LIB_DIR)/lib$(GLEW_LIB).$(MAJOR).dylib \
$(GLEW_LIB_DEPS) $(OBJECTS)
clean:
-rm -f *.o *~
-rm -f depend depend.bak
depend: $(SOURCES)
@ rm -f depend
@ touch depend
@ $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(SOURCES) \
$(X11_INCLUDES) > /dev/null
include depend

50
src/glew/SConscript Normal file
View File

@@ -0,0 +1,50 @@
Import('*')
if env['platform'] not in ['windows', 'linux']:
Return()
env = env.Clone()
env.Append(CPPDEFINES = [
'GLEW_BUILD',
'GLEW_STATIC',
#'GLEW_MX', # Multiple Rendering Contexts support
])
env.PrependUnique(CPPPATH = [
'#/include',
])
glew = env.StaticLibrary(
target = 'glew',
source = [
'glew.c',
],
)
env = env.Clone()
if env['platform'] == 'windows':
env.PrependUnique(LIBS = [
'glu32',
'opengl32',
'gdi32',
'user32',
])
else:
env.PrependUnique(LIBS = [
'GLU',
'GL',
'X11',
])
env.Prepend(LIBS = [glew])
env.Program(
target = 'glewinfo',
source = ['glewinfo.c'],
)
env.Program(
target = 'visualinfo',
source = ['visualinfo.c'],
)

12180
src/glew/glew.c Normal file

File diff suppressed because it is too large Load Diff

7180
src/glew/glewinfo.c Normal file

File diff suppressed because it is too large Load Diff

1173
src/glew/visualinfo.c Normal file

File diff suppressed because it is too large Load Diff