From e7c9ce862426168ba9985bb14ba0c0034cb5f6b0 Mon Sep 17 00:00:00 2001 From: plagman Date: Sun, 7 Mar 2010 01:09:39 +0000 Subject: [PATCH] Model specular map support and polymer fix for the OSX/ATI driver. git-svn-id: https://svn.eduke32.com/eduke32@1609 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymer.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index a36c307e3..3af4726da 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -1,4 +1,5 @@ // blah + #ifdef POLYMOST #define POLYMER_C @@ -2792,7 +2793,8 @@ static void polymer_updatewall(int16_t wallnum) bglBindBufferARB(GL_ARRAY_BUFFER_ARB, w->wall.vbo); bglBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, 4 * sizeof(GLfloat) * 5, w->wall.buffer); bglBindBufferARB(GL_ARRAY_BUFFER_ARB, w->over.vbo); - bglBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, 4 * sizeof(GLfloat) * 5, w->over.buffer); + if (w->over.buffer) + bglBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, 4 * sizeof(GLfloat) * 5, w->over.buffer); bglBindBufferARB(GL_ARRAY_BUFFER_ARB, w->mask.vbo); bglBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, 4 * sizeof(GLfloat) * 5, w->mask.buffer); bglBindBufferARB(GL_ARRAY_BUFFER_ARB, w->stuffvbo); @@ -3618,6 +3620,12 @@ static void polymer_drawmdsprite(spritetype *tspr) mdspritematerial.detailscale[0] = mdspritematerial.detailscale[1] = sk->param; } + if (!(tspr->cstat&1024)) + { + mdspritematerial.specmap = + mdloadskin((md2model_t *)m,tile2model[Ptile2tile(tspr->picnum,lpal)].skinnum,SPECULARPAL,surfi); + } + if (!(tspr->cstat&1024)) { mdspritematerial.normalmap =