aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Menu/UMenuButton.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-13 12:10:49 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-13 12:10:49 +0000
commitb8722c611ffaabde301f3134c1c8d76e64e3b02f (patch)
tree8e2e3dcb9c5ef2351f99515098c021ab3fe4403e /Game/Code/Menu/UMenuButton.pas
parente6917faa19aebfa6d089b24c65e4c7fe4bd6b503 (diff)
downloadusdx-b8722c611ffaabde301f3134c1c8d76e64e3b02f.tar.gz
usdx-b8722c611ffaabde301f3134c1c8d76e64e3b02f.tar.xz
usdx-b8722c611ffaabde301f3134c1c8d76e64e3b02f.zip
Fixed Bug in Reflection Code that Causes wrong Depth Test when drawing Text
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@84 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Menu/UMenuButton.pas')
-rw-r--r--Game/Code/Menu/UMenuButton.pas8
1 files changed, 6 insertions, 2 deletions
diff --git a/Game/Code/Menu/UMenuButton.pas b/Game/Code/Menu/UMenuButton.pas
index f4f8e1a8..3a871c5f 100644
--- a/Game/Code/Menu/UMenuButton.pas
+++ b/Game/Code/Menu/UMenuButton.pas
@@ -179,12 +179,12 @@ begin
//Bind Tex and GL Attributes
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
+
glDepthRange(0, 10);
glDepthFunc(GL_LEQUAL);
- //glDepthFunc(GL_GEQUAL);
glEnable(GL_DEPTH_TEST);
+
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- //glBlendFunc(GL_SRC_COLOR, GL_ZERO);
glBindTexture(GL_TEXTURE_2D, TexNum);
//Draw
@@ -209,6 +209,10 @@ begin
glTexCoord2f(TexX2*TexW, TexY2*TexH);
glVertex3f(x+w*scaleW, y+h*scaleH + Reflectionspacing, z);
glEnd;
+
+ glDisable(GL_TEXTURE_2D);
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_BLEND);
end;
end;