Pokemon Stadium can change REG.VI_ORIGIN without call to VI_UpdateScreen(),
at least with Project64. Thus, frame buffer allocation may work with
obsolete VI info, which causes various glitches, e.g #415
The game copies current frame buffer to the area, which initially allocated for depth buffer.
Game read camera data from that area, not from normal frame buffer.
That's why 'copy color buffer to RDRAM' option does not help there.
Special code needed to process that. Looks ugly, but works.
Fix problem with Majora's Mask subscreen after Bomber's Notebook read, #698
The game switches to interlaced mode when it opens Notebook screen and background buffer is removed.
This hack prevents buffers clear on VI change.
This is actually a hack. Rect functions use vertex color and alpha set to zero.
This hack is done to fix issue #721 in Pokemon Stadium 2. The game uses
texrects to render images in the auxiliary buffer. The texrects use SHADE
for alpha combiner. Since alpha is zero, the rendered image in the auxiliary buffer
has zero alpha. When the auxiliary buffer is used as texture, it is blended with
background, and zero alpha makes it invisible. I set vertex alpha to 1 to avoid it.
When N64 saves pixel to 16bit frame buffer, it uses pixel coverage for alpha value to store,
not calculated pixel's alpha. Thus, on real N64 the auxiliary buffer will have
full alpha and blending will not make it invisible. Thus, true emulation will
require pixel coverage calculation and shader-based blending.
We were calling glTexStorage2DMultisample with a 'samples' parameter of 0.
Reading the GL 4.4 spec, this is specifically forbidden, but the
documentation pages from Chronos were incorrectly stating that it was
allowed, so many implementations probably accept it. Mesa, the graphics
driver for many Linux cards has recently been corrected so that it emits
a warning and fails when glTexStorage2DMultisample is called with
samples=0. The current release works, but the next one will fail when
multisampling is turned off in this plugin (with multisampling turned
on, it will work the same as before).
The documentation pages from Kronos have since been updated to reflect
the GL spec (I put in a bug to them). You can see the proper
changes at this address
(https://www.opengl.org/wiki/GLAPI/glTexStorage2DMultisample).
I called getRevision.sh from a directory other than src and I ended
up with an unexpected Revision.h in my current directory without
placing one in src. This modifies the script to place the header
file in the same directory as the script.
This reverts commit de32176303.
This commit causes regressions:
In Pokemon Stadium when starting a battle one portrait can be missing
failed assertion in framebuffer.cpp Line:580 Expression checkFBO()