diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-06-06 12:57:44 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-06-06 12:57:44 +0000 |
commit | 9aa7604420cba68314ee94f28c34b70fa5540d06 (patch) | |
tree | d4a76b95e11b3848ced486f570ce342f54a66e4c /VideoPreview/src/media | |
parent | f9827cabe2bd6ff0bf8f0de7bfb7d041d77c4306 (diff) | |
download | usdx-9aa7604420cba68314ee94f28c34b70fa5540d06.tar.gz usdx-9aa7604420cba68314ee94f28c34b70fa5540d06.tar.xz usdx-9aa7604420cba68314ee94f28c34b70fa5540d06.zip |
- 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
Diffstat (limited to 'VideoPreview/src/media')
-rw-r--r-- | VideoPreview/src/media/UVideo.pas | 11 |
1 files changed, 9 insertions, 2 deletions
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; |