From 132c9be72f6d414c8a9be2fbbf3b718da7e506fb Mon Sep 17 00:00:00 2001 From: driAn Date: Wed, 27 Aug 2008 16:46:50 +0000 Subject: [PATCH] reverted alphatex git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2408 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/model.h | 4 ++-- source/src/rendermodel.cpp | 10 +--------- source/src/vertmodel.h | 11 +---------- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/source/src/model.h b/source/src/model.h index bc09fb4a..11d56212 100644 --- a/source/src/model.h +++ b/source/src/model.h @@ -37,12 +37,12 @@ struct dynent; struct model { - bool cullface, alphablend; + bool cullface; float alphatest, translucency, scale; vec translate; int batch; - model() : cullface(true), alphablend(false), alphatest(0.9f), translucency(0.25f), scale(1), translate(0, 0, 0), batch(-1) {} + model() : cullface(true), alphatest(0.9f), translucency(0.25f), scale(1), translate(0, 0, 0), batch(-1) {} virtual ~model() {} virtual bool load() = 0; diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index 6e6726ce..0f201950 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -36,14 +36,6 @@ void mdlalphatest(int alphatest) COMMAND(mdlalphatest, ARG_1INT); -void mdlalphablend(int alphablend) -{ - checkmdl; - loadingmodel->alphablend = alphablend!=0; -} - -COMMAND(mdlalphablend, ARG_1INT); - void mdlscale(int percent) { checkmdl; @@ -256,7 +248,7 @@ void endmodelbatches() loopvj(b.batched) { batchedmodel &bm = b.batched[j]; - if(bm.anim&ANIM_TRANSLUCENT || b.m->alphablend) + if(bm.anim&ANIM_TRANSLUCENT) { translucentmodel &tm = translucent.add(); tm.m = b.m; diff --git a/source/src/vertmodel.h b/source/src/vertmodel.h index cc852138..07dc06db 100644 --- a/source/src/vertmodel.h +++ b/source/src/vertmodel.h @@ -146,16 +146,7 @@ struct vertmodel : model glBindTexture(GL_TEXTURE_2D, id); lasttex = id; } - if(skin->bpp == 32 && owner->model->alphablend) - { - if(!enablealphablend) - { - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - enablealphablend = true; - } - } - else if(enablealphablend) { glDisable(GL_BLEND); enablealphablend = false; } + if(enablealphablend) { glDisable(GL_BLEND); enablealphablend = false; } if(skin->bpp == 32 && owner->model->alphatest > 0) { if(!enablealphatest) { glEnable(GL_ALPHA_TEST); enablealphatest = true; }