Sergey Lipskiy
d8a93a3aa3
Correct frame buffer height calculation.
...
Fixed Mario Tennis (E).
The RDP frame buffer height is 256, VI buffer height is 221.
The actual height of the picture is 221, so with frame buffer height 256
viewport settings becomes wrong and the picture moves atop.
2015-05-13 10:13:29 +06:00
Sergey Lipskiy
b6771dcf0a
Correct gDP.colorImage.height calculation for gDPFillRectangle.
...
Fixed SCARS.
2015-05-13 10:13:18 +06:00
Sergey Lipskiy
4aa7528915
Correct buffer's height calculation in gDPSetColorImage.
2015-05-13 10:13:16 +06:00
Sergey Lipskiy
2cfee3bc51
Revert "Fix gDP.colorImage.height in gDPTextureRectangle."
...
This reverts commit bb8800cbb163e7498b6558d8c6e059a6985edafd.
2015-05-13 10:13:15 +06:00
Sergey Lipskiy
2454f70568
Don't call gDPFillRDRAM for frame buffers created in VI_UpdateScreen(),
...
because VI_ORIGIN is not correct address of frame buffer start.
2015-05-13 10:13:12 +06:00
Sergey Lipskiy
f829a0d727
Fix gDP.colorImage.height in gDPTextureRectangle.
2015-05-13 10:13:06 +06:00
Sergey Lipskiy
2bf5c83be1
gDPFillRectangle: gDP.colorImage.height calculation for interlaced modes in G_CYC_FILL mode.
...
Fixed Turok 2, which set lry=VI.height. With lry++ frame buffer height becomes
wrong and can be deleted wrongly. That cause image flicker.
2015-05-13 10:13:06 +06:00
Sergey Lipskiy
560f1d8118
Code cleanup in gDP.
2015-05-13 10:13:04 +06:00
Sergey Lipskiy
86cde946e9
Refactor: replace C style OGL_* functions by OGLRender and OGLVideo classes.
...
OGLRender performs rendering operations.
OGLVideo initializes OpenGL and performes operations with graphics context.
It has platform-dependent implementations.
2015-05-13 10:13:00 +06:00
Sergey Lipskiy
ee4dabbfbb
Fix gDPFillRDRAM out of bounds writes.
2015-05-13 10:12:59 +06:00
Sergey Lipskiy
3352193632
Depth buffer refactor
2015-05-13 10:12:48 +06:00
Sergey Lipskiy
d7f4e44674
Frame buffer refactor.
...
Use std::list as container for frame buffers.
2015-05-13 10:12:46 +06:00
Sergey Lipskiy
bd8b73d5b5
Refactor: Make frame buffer singleton
2015-05-13 10:12:45 +06:00
Sergey Lipskiy
389a46c394
Code cleaup: fix idents, replace spaces by tabs.
2015-05-13 10:12:31 +06:00
Sergey Lipskiy
4d93ddac4f
Use std min and max
2015-05-13 10:12:30 +06:00
Sergey Lipskiy
9fda06ffa4
Fix CheckForFrameBufferTexture: don't test frame buffer content if
...
copyToRDRAM is on
or copyDepthToRDRAM is on and frame buffer was cleared by depth buffer clear value.
2015-05-13 10:12:23 +06:00
Sergey Lipskiy
4d3df31a56
Fix CheckForFrameBufferTexture(...) for depth buffer:
...
don't test frame buffer content if frame buffer is depth buffer,
because of DepthCopyToRDRAM
2015-05-13 10:12:22 +06:00
Sergey Lipskiy
4ab3c1e1ed
Fix adress correction condition in gDPSetTile.
2015-05-13 10:12:19 +06:00
Sergey Lipskiy
47d322741d
Correct condition for calling Combiner_UpdateAlphaTestInfo().
2015-05-13 10:12:08 +06:00
Sergey Lipskiy
c95bb33216
Correct frame buffer height calculation in FillRect.
...
It was broken in commit a9064e14f3a40
Mario Tennis works again.
2015-05-13 10:12:03 +06:00
Sergey Lipskiy
28133f2387
Create frameBufferEmulation section in Config.
2015-05-13 10:11:30 +06:00
Sergey Lipskiy
8018ba0aea
Move user-defined settings to Config structure.
2015-05-13 10:11:27 +06:00
Sergey Lipskiy
7c0b58cb25
Rewrite gDPTextureRectangle.
...
Code is the same for texrect and texrectFlip.
Taken from gles2n64.
2015-05-13 10:11:14 +06:00
Sergey Lipskiy
bf99ef2079
Fix colorImage.height calculation in FillRect
2015-05-13 10:11:06 +06:00
Sergey Lipskiy
7f49dd39c2
Replace frameBuffer.drawBuffer from GL_DRAW_FRAMEBUFFER
...
to gles compatible GL_FRAMEBUFFER
2015-05-13 10:11:03 +06:00
Sergey Lipskiy
c7c36ce54a
Correct frame buffer valideness check.
2015-05-13 10:10:41 +06:00
Sergey Lipskiy
5070a1aa82
Correct palette load for shadow map.
2015-05-13 10:10:34 +06:00
Sergey Lipskiy
f151ef36ca
Add shadow map shader
2015-05-13 10:10:28 +06:00
Sergey Lipskiy
ae91daa5ca
Remove unused gDPUpdateColorImage() function.
2015-05-13 10:10:03 +06:00
Sergey Lipskiy
72e7d41673
Remove unused function FrameBuffer_RestoreBuffer()
2015-05-13 10:10:02 +06:00
Sergey Lipskiy
0c9c9d4e27
Fix bufEndAddress check in CheckForFrameBufferTexture
2015-05-13 10:10:00 +06:00
Sergey Lipskiy
971bd9d0ec
Frame buffer fixes for Mario Tennis.
...
Implemented various methods for testing buffer validity.
2015-05-13 10:09:58 +06:00
Sergey Lipskiy
53d5b994f5
Fix depth buffer clear when it is used as an auxilary color buffer.
2015-05-13 10:09:55 +06:00
Sergey Lipskiy
1e4870e6b9
Change way of color buffer address range calculation:
...
on buffers swap use actual color image height to re-calculate end address.
2015-05-13 10:09:53 +06:00
Sergey Lipskiy
1341f7bf15
Frame buffer emulation fixes:
...
save pointer to the load tile in the frame buffer.
Game: Mario Tennis
2015-05-13 10:09:52 +06:00
Sergey Lipskiy
7418f76968
Frame buffer emulation fixes:
...
clear color buffer when size is changed but address is the same.
2015-05-13 10:09:52 +06:00
Sergey Lipskiy
b33f643905
Tuned condition for correctness of found frame buffer.
2015-05-13 10:09:50 +06:00
Sergey Lipskiy
620c809727
Fixed frame buffer height calculation.
2015-05-13 10:09:49 +06:00
Sergey Lipskiy
562612a21a
Texture load status is now set per tile.
2015-05-13 10:09:47 +06:00
Sergey Lipskiy
03dfe205f8
Texrect hack for 512 width.
...
Fixed motion blur in Rally Challenge 2000.
Need to find a proper solution.
2015-05-13 10:09:43 +06:00
Sergey Lipskiy
f5bcc81414
Correct color buffer height calculation.
2015-05-13 10:09:41 +06:00
Sergey Lipskiy
aec5094967
Add support for 8bit frame buffers.
...
Fixed dynamic shadow in Banjo-Tooie
2015-05-13 10:09:41 +06:00
Sergey Lipskiy
c38958f12c
Don't clear gDP.colorImage.changed flag in gDPSetColorImage.
...
Fixed Zelda MM motion blur.
2015-05-13 10:09:40 +06:00
Sergey Lipskiy
880238250b
Fix depth buffer initialization and clean.
2015-05-13 10:09:36 +06:00
Sergey Lipskiy
04d1bc385a
Handle depth buffer clear when depth image is not set yet.
2015-05-13 10:09:36 +06:00
Sergey Lipskiy
657a576946
Fix fillcolor processing. Fillcolor has the same bitness as the color image.
2015-05-13 10:09:35 +06:00
Sergey Lipskiy
797dfad57e
Frame buffer related fixes. Zelda OOT pause screen works!
2015-05-13 10:09:34 +06:00
Sergey Lipskiy
a07555546e
Frame buffer fixes
2015-05-13 10:09:33 +06:00
Sergey Lipskiy
a7968f2ca2
Implement hardware LOD frac calculation.
...
Two pass rendering, using FBO.
First pass: store pixel's texture coordinates in frame buffer texture.
Second pass: calculate lod using frame buffer texture.
2015-05-13 10:09:27 +06:00
Sergey Lipskiy
97f07e38c3
Fix some type mismatch errors.
2015-05-13 10:09:25 +06:00