Removed redundant changes from glew patchset

This commit is contained in:
Kacper Kasper
2014-04-07 16:55:05 +02:00
parent cf1fd87f3a
commit 1ba1ff42cd

View File

@@ -1,50 +1,13 @@
From 00fdc98132634a72cf5b3f6b2f1fd3088374c5d8 Mon Sep 17 00:00:00 2001
From 9e62b8084f970f94b9df86f0764284b042bf822b Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Mon, 7 Apr 2014 07:04:04 +0200
Date: Mon, 7 Apr 2014 16:48:59 +0200
Subject: Haiku support
diff --git a/Makefile b/Makefile
index e6f08a7..1e57596 100644
index e6f08a7..24b9d22 100644
--- a/Makefile
+++ b/Makefile
@@ -4,24 +4,24 @@
## Copyright (C) 2002-2008, 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
+##
+## 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,
+##
+## * 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
+## * 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
+## * 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
+## 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
+## 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)
@@ -179,12 +179,15 @@ glewmx.pc: glew.pc.in
# GLEW utility programs
@@ -62,14 +25,7 @@ index e6f08a7..1e57596 100644
VISUALINFO.BIN := visualinfo$(BIN.SUFFIX)
VISUALINFO.BIN.SRC := src/visualinfo.c
@@ -196,14 +199,14 @@ VISUALINFO.BIN.OBJ := $(VISUALINFO.BIN.OBJ:.c=.o)
ifneq ($(filter nacl%,$(SYSTEM)),)
glew.bin: glew.lib bin
else
-glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
+glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
endif
@@ -202,8 +205,8 @@ endif
bin:
mkdir bin
@@ -91,15 +47,6 @@ index e6f08a7..1e57596 100644
$(VISUALINFO.BIN.OBJ): $(VISUALINFO.BIN.SRC) include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
@mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
@@ -328,7 +335,7 @@ dist-win32:
cp -a bin $(DIST_DIR)
cp -a lib $(DIST_DIR)
$(RM) -f $(DIST_DIR)/bin/*/*/*.pdb $(DIST_DIR)/bin/*/*/*.exp
- $(RM) -f $(DIST_DIR)/bin/*/*/glewinfo-*.exe $(DIST_DIR)/bin/*/*/visualinfo-*.exe
+ $(RM) -f $(DIST_DIR)/bin/*/*/glewinfo-*.exe $(DIST_DIR)/bin/*/*/visualinfo-*.exe
$(RM) -f $(DIST_DIR)/lib/*/*/*.pdb $(DIST_DIR)/lib/*/*/*.exp
unix2dos $(DIST_DIR)/include/GL/*.h
unix2dos $(DIST_DIR)/doc/*.txt
diff --git a/config/Makefile.haiku b/config/Makefile.haiku
new file mode 100644
index 0000000..57bf3d6
@@ -213,46 +160,9 @@ index d075b52..daff07d 100644
#if defined(GLEW_MX)
GLboolean glxewContextIsSupported (const GLXEWContext* ctx, const char* name)
diff --git a/src/glewinfo.c b/src/glewinfo.c
index ad44f72..ca065d1 100644
index ad44f72..d65d702 100644
--- a/src/glewinfo.c
+++ b/src/glewinfo.c
@@ -4,24 +4,24 @@
** Copyright (C) 2002-2008, 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
+**
+** 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,
+**
+** * 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
+** * 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
+** * 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
+** 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
+** 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)
@@ -35,7 +35,7 @@
#include <GL/glew.h>
#if defined(_WIN32)
@@ -280,28 +190,6 @@ index ad44f72..ca065d1 100644
GLboolean glewCreateContext (const char* display, int* visual);
#else
GLboolean glewCreateContext ();
@@ -10468,10 +10468,10 @@ int main (void)
#if defined(_WIN32)
fprintf(f, "Reporting capabilities of pixelformat %d\n", visual);
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
- fprintf(f, "Reporting capabilities of display %s, visual 0x%x\n",
+ fprintf(f, "Reporting capabilities of display %s, visual 0x%x\n",
display == NULL ? getenv("DISPLAY") : display, visual);
#endif
- fprintf(f, "Running on a %s from %s\n",
+ fprintf(f, "Running on a %s from %s\n",
glGetString(GL_RENDERER), glGetString(GL_VENDOR));
fprintf(f, "OpenGL version %s is supported\n", glGetString(GL_VERSION));
glewInfo();
@@ -10540,7 +10540,7 @@ GLboolean glewCreateContext (int* pixelformat)
wc.lpszClassName = "GLEW";
if (0 == RegisterClass(&wc)) return GL_TRUE;
/* create window */
- wnd = CreateWindow("GLEW", "GLEW", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+ wnd = CreateWindow("GLEW", "GLEW", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, NULL, NULL, GetModuleHandle(NULL), NULL);
if (NULL == wnd) return GL_TRUE;
/* get the device context */
@@ -10613,6 +10613,13 @@ void glewDestroyContext ()
/* ------------------------------------------------------------------------ */
@@ -316,17 +204,6 @@ index ad44f72..ca065d1 100644
#else /* __UNIX || (__APPLE__ && GLEW_APPLE_GLX) */
Display* dpy = NULL;
@@ -10658,8 +10665,8 @@ GLboolean glewCreateContext (const char* display, int* visual)
cmap = XCreateColormap(dpy, RootWindow(dpy, vi->screen), vi->visual, AllocNone);
swa.border_pixel = 0;
swa.colormap = cmap;
- wnd = XCreateWindow(dpy, RootWindow(dpy, vi->screen),
- 0, 0, 1, 1, 0, vi->depth, InputOutput, vi->visual,
+ wnd = XCreateWindow(dpy, RootWindow(dpy, vi->screen),
+ 0, 0, 1, 1, 0, vi->depth, InputOutput, vi->visual,
CWBorderPixel | CWColormap, &swa);
/* make context current */
if (!glXMakeCurrent(dpy, wnd, ctx)) return GL_TRUE;
diff --git a/src/glewinfo_haiku.cpp b/src/glewinfo_haiku.cpp
new file mode 100644
index 0000000..3d32d00