alphatest in drawscope()

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3558 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-11-16 16:01:55 +00:00
parent 8c59f5e714
commit 205be0ea7a
+5
View File
@@ -86,6 +86,9 @@ void drawscope()
// this may need to change depending on the aspect ratio at which the scope image is drawn at
const float scopeaspect = 4.0f/3.0f;
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.9f);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
static Texture *scopetex = NULL;
if(!scopetex) scopetex = textureload("packages/misc/scope.png", 3);
@@ -121,6 +124,8 @@ void drawscope()
}
glEnd();
glDisable(GL_ALPHA_TEST);
}
const char *crosshairnames[CROSSHAIR_NUM] = { "default", "teammate", "scope" };