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

43 Commits

Author SHA1 Message Date
Sergey Lipskiy
3e65749241 Don't fix zero VI.width and VI.height
If these values are zero, it is for purpose.

Fixed depth buffer write in PD intro.
2015-05-13 10:14:12 +06:00
Sergey Lipskiy
92c3283ff7 Fix min and max usage. 2015-05-13 10:13:38 +06:00
Sergey Lipskiy
f637e91f22 Replace _SHIFTR( *REG.VI_H_START, 0, 10 ) == 0 check by VI.width == 0 one
Fixed glError in Knockout Kings 2000. The game sets h_start==h_end at start,
thus VI.width is zero but *REG.VI_H_START is not.
2015-05-13 10:13:32 +06:00
Sergey Lipskiy
75bf4004cb Correct VI width calculation.
Fixed VI width in Cyber Tiger.
2015-05-13 10:13:32 +06:00
Sergey Lipskiy
ebedf49240 Correct VI height calculation. 2015-05-13 10:13:30 +06:00
Sergey Lipskiy
3b97ca2d7c Fix float/int mismatch in VI_UpdateSize(). 2015-05-13 10:13:28 +06:00
Sergey Lipskiy
c96b62adaf Implement window resize for MupenPlus. 2015-05-13 10:13:24 +06:00
Sergey Lipskiy
5ac66b83fe Clear frame and depth buffers lists when VI width, height or interlaced mode is changed. 2015-05-13 10:13:17 +06:00
Sergey Lipskiy
9305d46c94 Roundup calculated VI.width and VI.height.
Fixed Charlie Blast.
2015-05-13 10:13:16 +06:00
Sergey Lipskiy
fb1a28c6db Clear frame and depth buffers lists when interlace mode is changed,
because new mode makes old buffers invalid.
2015-05-13 10:13:13 +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
4a568c984d Change VI height correction constant for PAL games.
Fixed Armorines (E).
2015-05-13 10:13:12 +06:00
Sergey Lipskiy
5eac0797f0 Remove VI emulation code, which can't be tested for now.
Star Wars Ep. 1 Racer (E) is fixed.
2015-05-13 10:13:11 +06:00
Sergey Lipskiy
c0e0df2551 Fix allocation of new frame buffer in VI_UpdateScreen().
Need to compare buffer width with calculated VI.width, not with *REG.VI_WIDTH.

This fixes wrong allocations in Star Wars Ep.1 Racer.
2015-05-13 10:13:10 +06:00
Sergey Lipskiy
c551230a8e Double VI.height in interlaced mode when yScale = 1.
This fixes frame buffer height for Star Wars Ep.1 Racer.
Not sure that this solution is correct!
2015-05-13 10:13:09 +06:00
Sergey Lipskiy
400f674409 Revert VI.height calculation. Add flag VI.interlaced for interlaced mode. 2015-05-13 10:13:05 +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
54ef6f2d0c Don't save frame buffer with zero width. 2015-05-13 10:12:55 +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
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
3f72a7aefc Add reverse width and height to VIInfo. 2015-05-13 10:11:15 +06:00
Sergey Lipskiy
1711da98ae Correct VI.height calculation.
In case of interlaced mode both half-fields are used and thus all half-lines
must be taken into account.
2015-05-13 10:11:12 +06:00
Sergey Lipskiy
3b06773f43 (R): Rewrite OGL_SwapBuffers() and use it for all platforms. 2015-05-13 10:10:53 +06:00
Sergey Lipskiy
4635e24d62 Add g_bIgnoreCFB option.
It is necessary for Zelda Pause Screen, otherwise it will be
replaced by blank data from RDRAM.
2015-05-13 10:10:40 +06:00
Sergey Lipskiy
d4953abb91 Fix depth beffer rendering.
Corrected bug with Z calculation in depth_compare_shader.
2015-05-13 10:10:37 +06:00
Sergey Lipskiy
9b8b667fab Implement CopyDepthBuffer to RDRAM. 2015-05-13 10:10:36 +06:00
Sergey Lipskiy
f151ef36ca Add shadow map shader 2015-05-13 10:10:28 +06:00
Sergey Lipskiy
c47ab51175 Add depth compare shader to the main program. 2015-05-13 10:10:25 +06:00
Sergey Lipskiy
5cedc0e6e7 Implement VI emulation: treat main frame buffer as TV screen and render
FBO buffers on it according to VI registers values.
2015-05-13 10:10:11 +06:00
Sergey Lipskiy
4e39f37a34 Increase CFB mode frames limit 2015-05-13 10:10:10 +06:00
Sergey Lipskiy
95acb76460 Render RDRAM buffer only when it is not blank. 2015-05-13 10:10:09 +06:00
Sergey Lipskiy
fb0ba864d1 Force CFB mode if current frame is shown more than 4 times in succession (<15 fps) 2015-05-13 10:10:08 +06:00
Sergey Lipskiy
d6a3b265a5 Cosmetic changes in VI_UpdateScreen(). 2015-05-13 10:10:08 +06:00
Sergey Lipskiy
e788b638b7 Don't copy to RDRAM in CFB mode. 2015-05-13 10:10:07 +06:00
Sergey Lipskiy
5f57aa5c48 Implement copy RDRAM to frame buffer. 2015-05-13 10:10:05 +06:00
Sergey Lipskiy
31d236f59b Rewrite FrameBuffer_CopyToRDRAM.
Use Pixel Buffer Object for async read from video memory.
2015-05-13 10:10:04 +06:00
Sergey Lipskiy
efee40c2c7 Implement copy texture frame buffer to RDRAM. 2015-05-13 10:09:59 +06:00
Sergey Lipskiy
7056d29c0f Fix screen shot capture. 2015-05-13 10:09:57 +06:00
Sergey Lipskiy
a07555546e Frame buffer fixes 2015-05-13 10:09:33 +06:00
Sergey Lipskiy
38d77dc432 Project renamed to GLideN64 2015-05-13 10:09:22 +06:00
Sergey Lipskiy
69f27a5d8a Initial project version. Based on glN64-0.4.1-rc2 2015-05-13 10:09:12 +06:00