aboutsummaryrefslogtreecommitdiffstats
path: root/src/media
diff options
context:
space:
mode:
Diffstat (limited to 'src/media')
-rw-r--r--src/media/UVideo.pas7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas
index 0716bee2..c7d59fc8 100644
--- a/src/media/UVideo.pas
+++ b/src/media/UVideo.pas
@@ -824,8 +824,8 @@ begin
// Or should we add padding with avpicture_fill? (check which one is faster)
//glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- // TODO: check if this is faster
- //glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+ // glTexEnvi with GL_REPLACE might give a small speed improvement
+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
if (not fPboEnabled) then
begin
@@ -867,6 +867,9 @@ begin
Log.LogError('PBO texture stream error: ' + gluErrorString(glErr), 'TVideo_FFmpeg.GetFrame');
end;
+ // reset to default
+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+
if (not fFrameTexValid) then
fFrameTexValid := true;