1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00
Commit Graph

46 Commits

Author SHA1 Message Date
Sergey Lipskiy
5bad15abd9 Correct scissor set in FrameBuffer and DepthBuffer. 2015-05-13 10:20:43 +06:00
Sergey Lipskiy
1715a8a3d0 Fix _copyDepthBuffer().
Fixed LoT in Zelda MM
2015-05-13 10:20:33 +06:00
Sergey Lipskiy
9dbbeca65c Code cleanup: Move implementation of static get() functions into .cpp files 2015-05-13 10:20:23 +06:00
Sergey Lipskiy
04062925d3 Don't copy depth buffer to RDRAM if it was not cleared completly.
Fixed hangs in Roadsters, issue #330
2015-05-13 10:20:22 +06:00
Sergey Lipskiy
3031883409 Move zLUT initialization to DepthBufferList ctor.
Destruction of zLUT moved to DepthBufferList destructor.
2015-05-13 10:20:12 +06:00
Sergey Lipskiy
f946a82e38 Fix replay in Mario Golf:
replay is copied to a area, which is used for depth buffer.
Added check that found frame buffer is not depth buffer.
2015-05-13 10:18:24 +06:00
Sergey Lipskiy
34d638a0a3 Don't copy depth buffer if it was not cleared.
Uncleared depth buffer most likely is used as auxilary color buffer.

Fix pause screen in Mickey USA when copy depth to RDRAM is enabled, issue #85.
2015-05-13 10:18:14 +06:00
Sergey Lipskiy
916e083bfa Resolve multisampled depth buufer before using it as texture. 2015-05-13 10:17:59 +06:00
Sergey Lipskiy
10c4fb801c Implement FBO multisampling. 2015-05-13 10:17:47 +06:00
Sergey Lipskiy
fca44abb5f Do not create DepthImageTexture when N64DepthCompare option is off. 2015-05-13 10:17:20 +06:00
Sergey Lipskiy
12a2b3741e Change DepthImageTexture texture format from GL_RGBA32F to GL_RG32F
Correct depth_compare() shader: do not calculate N64 z value.
2015-05-13 10:17:19 +06:00
Sergey Lipskiy
6ab92eac4f Move zLUT initialization to DepthBufferList::init(). 2015-05-13 10:17:18 +06:00
Sergey Lipskiy
afe91d47d9 Switch to depth texture 2015-05-13 10:17:17 +06:00
Sergey Lipskiy
366c389d56 Correct depth_compare shader usage. 2015-05-13 10:17:14 +06:00
Sergey Lipskiy
887504c301 Switch to non-POT textures. 2015-05-13 10:15:25 +06:00
Sergey Lipskiy
0ec60a3881 Fix typo in DepthBufferList::clearBuffer(). 2015-05-13 10:15:10 +06:00
Sergey Lipskiy
f80b17bf15 Fix crash in DepthBufferList::clearBuffer() 2015-05-13 10:14:55 +06:00
Sergey Lipskiy
929fafa7a1 Fix Mac OS X compilation errors. 2015-05-13 10:13:56 +06:00
Sergey Lipskiy
09eea95270 Add separate define for ImageTextures.
Set it on for platforms, which support this functionality.
2015-05-13 10:13:55 +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
3352193632 Depth buffer refactor 2015-05-13 10:12:48 +06:00
Sergey Lipskiy
fbf660d4ec Refactor: Make DepthBufferList singleton. 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
7f6d7e2772 Refactor: rewrite TextureCache.
Store normal textures and frame buffer textures in separate maps.
Replace TextureCache_* functions by methods of TextureCache.
2015-05-13 10:12:44 +06:00
Sergey Lipskiy
277b26cec2 Fix DepthBuffer_ClearBuffer() broken in commit fd478866.
Fixed fog issue in BAR.
2015-05-13 10:12:10 +06:00
Sergey Lipskiy
e784ea7205 GLES2 fixes in frame/depth buffer initialization. 2015-05-13 10:12:05 +06:00
Sergey Lipskiy
bf168bad0c Fix crash on loadstate. 2015-05-13 10:11:42 +06:00
Sergey Lipskiy
7ad0c8d05a Guard image texture code since GLES2 does not support it. 2015-05-13 10:11:31 +06:00
Sergey Lipskiy
ee57f6ef47 Move frame buffer emulation options to Config. 2015-05-13 10:11:30 +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
66ee0a959c Set g_bN64DepthCompare to false. 2015-05-13 10:11:26 +06:00
Sergey Lipskiy
2708b2abeb Remove FrameBufferExt functions usage. 2015-05-13 10:11:21 +06:00
Sergey Lipskiy
066ebc8b47 Enable DepthBuffer_FindBuffer function. 2015-05-13 10:11:11 +06:00
Sergey Lipskiy
cc3446c4d6 BindImageTexture fixes 2015-05-13 10:11:09 +06:00
Sergey Lipskiy
b0f17ef953 Add g_bN64DepthCompare parameter
If it is true, N64 depth compare algorithm is used instead of OpenGL depth buffer.
2015-05-13 10:11:08 +06:00
Sergey Lipskiy
344df93374 Rewrite depth texture clear. 2015-05-13 10:11:07 +06:00
Sergey Lipskiy
00c12e2d1d Add FBO for depth buffer. 2015-05-13 10:10:36 +06:00
Sergey Lipskiy
01073f40b0 Add depth texture to depth buffer. 2015-05-13 10:10:20 +06:00
Sergey Lipskiy
1b9c04ade5 Fix Linux compilation. 2015-05-13 10:10:12 +06:00
Sergey Lipskiy
880238250b Fix depth buffer initialization and clean. 2015-05-13 10:09:36 +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
13ed4d4acf Fix DepthBuffer_RemoveBottom() 2015-05-13 10:09:24 +06:00
Sergey Lipskiy
69f27a5d8a Initial project version. Based on glN64-0.4.1-rc2 2015-05-13 10:09:12 +06:00