[mupen64plus-video-glide64mk2] 32/60: Set shader again after displaying OSD
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:16:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-video-glide64mk2.
commit 4c6247216e7a0e37120641ee3f3706d5abb16954
Author: Sven Eckelmann <sven at narfation.org>
Date: Sun Dec 15 12:15:27 2013 +0100
Set shader again after displaying OSD
Some titles like Resident Evil 2/Biohazard 2 display a cutscene and the shader
is only set for the first frame. The next frames just expect that the old
shader is still set.
The OSD workaround only disabled the shader program before and expected that
the next frame automatically sets it again. This assumption was wrong and
instead the program has to be reassigned again to the current rendering context
when the renderCallback for the OSD was called.
---
debian/changelog | 2 ++
debian/patches/series | 1 +
debian/patches/shader_reset.patch | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 39 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 952fab9..f97ebda 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
mupen64plus-video-glide64mk2 (2.0-3) UNRELEASED; urgency=low
* Upgraded to policy 3.9.5, no changes required
+ * debian/patches:
+ - Add shader_reset.patch, Set shader again after displaying OSD
-- Sven Eckelmann <sven at narfation.org> Sat, 16 Nov 2013 18:13:03 +0100
diff --git a/debian/patches/series b/debian/patches/series
index 564759b..c98bbbe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ init_quit.patch
load_hires_cache.patch
kfreebsd_hurd_support.patch
path_max_war.patch
+shader_reset.patch
diff --git a/debian/patches/shader_reset.patch b/debian/patches/shader_reset.patch
new file mode 100644
index 0000000..5017534
--- /dev/null
+++ b/debian/patches/shader_reset.patch
@@ -0,0 +1,36 @@
+Description: Set shader again after displaying OSD
+ Some titles like Resident Evil 2/Biohazard 2 display a cutscene and the shader
+ is only set for the first frame. The next frames just expect that the old
+ shader is still set.
+ .
+ The OSD workaround only disabled the shader program before and expected that
+ the next frame automatically sets it again. This assumption was wrong and
+ instead the program has to be reassigned again to the current rendering
+ context when the renderCallback for the OSD was called.
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/src/Glitch64/glitchmain.cpp b/src/Glitch64/glitchmain.cpp
+index 773a4db4d2396a44821361ba64ba676eafa6e9ea..1eac91e09bae458d32311c855b707acfce88202f 100644
+--- a/src/Glitch64/glitchmain.cpp
++++ b/src/Glitch64/glitchmain.cpp
+@@ -1661,11 +1661,17 @@ grBufferClear( GrColor_t color, GrAlpha_t alpha, FxU32 depth )
+ FX_ENTRY void FX_CALL
+ grBufferSwap( FxU32 swap_interval )
+ {
++ GLuint program;
++
+ glFinish();
+- glUseProgramObjectARB(0);
+ // printf("rendercallback is %p\n", renderCallback);
+- if(renderCallback)
++ if(renderCallback) {
++ glGetIntegerv(GL_CURRENT_PROGRAM, (GLint*) &program);
++ glUseProgramObjectARB(0);
+ (*renderCallback)(1);
++ if (program)
++ glUseProgramObjectARB(program);
++ }
+ int i;
+ LOG("grBufferSwap(%d)\r\n", swap_interval);
+ //printf("swap\n");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-glide64mk2.git
More information about the Pkg-games-commits
mailing list