From 9aa7604420cba68314ee94f28c34b70fa5540d06 Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Sun, 6 Jun 2010 12:57:44 +0000 Subject: - limit fAlpha to 0..1 - added video preview in SongScreen git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2451 b956fd51-792f-4845-bead-9b4dfca2ff2c --- VideoPreview/src/media/UVideo.pas | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'VideoPreview/src/media') diff --git a/VideoPreview/src/media/UVideo.pas b/VideoPreview/src/media/UVideo.pas index 1fea42c0..e8cfbbf7 100644 --- a/VideoPreview/src/media/UVideo.pas +++ b/VideoPreview/src/media/UVideo.pas @@ -1090,7 +1090,7 @@ begin glEnable(GL_SCISSOR_TEST); glEnable(GL_BLEND); - glDepthRange(0, 1); + glDepthRange(0, 10); glDepthFunc(GL_LEQUAL); glEnable(GL_DEPTH_TEST); @@ -1165,10 +1165,11 @@ begin glEnable(GL_SCISSOR_TEST); glEnable(GL_BLEND); - glDepthRange(0, 1); + glDepthRange(0, 10); glDepthFunc(GL_LEQUAL); glEnable(GL_DEPTH_TEST); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, fFrameTex); @@ -1408,6 +1409,12 @@ end; procedure TVideo_FFmpeg.SetAlpha(Alpha: double); begin fAlpha := Alpha; + + if (fAlpha>1) then + fAlpha := 1; + + if (fAlpha<0) then + fAlpha := 0; end; function TVideo_FFmpeg.GetAlpha(): double; -- cgit v1.2.3