From 1b5284aee01b8159bfb2d12cd1af3a45e81b76df Mon Sep 17 00:00:00 2001 From: Plagman Date: Fri, 26 Jan 2007 20:29:36 +0000 Subject: [PATCH] Fixes blending in drawrooms and dynamic GLU not compiling in Win32. git-svn-id: https://svn.eduke32.com/eduke32@473 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/include/glbuild.h | 8 +++++++- polymer/build/include/polymer.h | 6 ------ polymer/build/src/glbuild.c | 2 +- polymer/build/src/polymost.c | 1 + 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/polymer/build/include/glbuild.h b/polymer/build/include/glbuild.h index 263c3d152..6d982751b 100644 --- a/polymer/build/include/glbuild.h +++ b/polymer/build/include/glbuild.h @@ -30,6 +30,12 @@ # define APIENTRY #endif +# ifdef _WIN32 +# define PR_CALLBACK __stdcall +# else +# define PR_CALLBACK +# endif + // those defines are somehow missing from glext.h #define GL_FRAMEBUFFER_EXT 0x8D40 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 @@ -159,7 +165,7 @@ extern void (APIENTRY * bglDeleteFramebuffersEXT)(GLsizei n, const GLuint *frame // GLU extern void (APIENTRY * bgluTessBeginContour) (GLUtesselator* tess); extern void (APIENTRY * bgluTessBeginPolygon) (GLUtesselator* tess, GLvoid* data); -extern void (APIENTRY * bgluTessCallback) (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); +extern void (APIENTRY * bgluTessCallback) (GLUtesselator* tess, GLenum which, void (PR_CALLBACK CallBackFunc)()); extern void (APIENTRY * bgluTessEndContour) (GLUtesselator* tess); extern void (APIENTRY * bgluTessEndPolygon) (GLUtesselator* tess); extern void (APIENTRY * bgluTessNormal) (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ); diff --git a/polymer/build/include/polymer.h b/polymer/build/include/polymer.h index 2618ef194..207d2aca3 100644 --- a/polymer/build/include/polymer.h +++ b/polymer/build/include/polymer.h @@ -23,12 +23,6 @@ #ifndef _polymer_h_ # define _polymer_h_ -# ifdef _WIN32 -# define PR_CALLBACK __stdcall -# else -# define PR_CALLBACK -# endif - # include "compat.h" # include "build.h" # include "glbuild.h" diff --git a/polymer/build/src/glbuild.c b/polymer/build/src/glbuild.c index 03666271f..3af43c085 100644 --- a/polymer/build/src/glbuild.c +++ b/polymer/build/src/glbuild.c @@ -136,7 +136,7 @@ void (APIENTRY * bglDeleteFramebuffersEXT)(GLsizei n, const GLuint *framebuffers // GLU void (APIENTRY * bgluTessBeginContour) (GLUtesselator* tess); void (APIENTRY * bgluTessBeginPolygon) (GLUtesselator* tess, GLvoid* data); -void (APIENTRY * bgluTessCallback) (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); +void (APIENTRY * bgluTessCallback) (GLUtesselator* tess, GLenum which, void (PR_CALLBACK CallBackFunc)()); void (APIENTRY * bgluTessEndContour) (GLUtesselator* tess); void (APIENTRY * bgluTessEndPolygon) (GLUtesselator* tess); void (APIENTRY * bgluTessNormal) (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ); diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index 61cd3d796..384225a1e 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -3658,6 +3658,7 @@ void polymost_drawrooms () resizeglcheck(); //bglClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); + bglDisable(GL_BLEND); bglEnable(GL_TEXTURE_2D); //bglTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE); //default anyway bglEnable(GL_DEPTH_TEST);