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

351 Commits

Author SHA1 Message Date
Sergey Lipskiy
2cfee3bc51 Revert "Fix gDP.colorImage.height in gDPTextureRectangle."
This reverts commit bb8800cbb163e7498b6558d8c6e059a6985edafd.
2015-05-13 10:13:15 +06:00
Sergey Lipskiy
bda27e0ed1 Update VS project file for MupenPlus build. 2015-05-13 10:13:14 +06:00
Sergey Lipskiy
805cef4225 Correct isLowerField calculation in FrameBufferList::renderBuffer.
It did not work correct for Donkey Kong (E).
2015-05-13 10:13:14 +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
8733c2b3e7 Set m_drawBuffer = GL_BACK in FrameBufferList::destroy().
Fixed crash on rom reset.
2015-05-13 10:13:10 +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
d121144760 Disable frame buffer activiti when H width is zero. 2015-05-13 10:13:08 +06:00
Sergey Lipskiy
de5c0120ed Fix FrameBufferList::renderBuffer for interlaced modes. 2015-05-13 10:13:08 +06:00
Sergey Lipskiy
5ac57395e9 Fix FrameBufferList::renderBuffer compilation errors. 2015-05-13 10:13:07 +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
400f674409 Revert VI.height calculation. Add flag VI.interlaced for interlaced mode. 2015-05-13 10:13:05 +06:00
Sergey Lipskiy
4499a6f966 Fix *BufferToRDRAM destroy().
Fixed run 4mb games after 8mb ones.
2015-05-13 10:13:04 +06:00
Sergey Lipskiy
560f1d8118 Code cleanup in gDP. 2015-05-13 10:13:04 +06:00
Sergey Lipskiy
87695ac8a7 Code cleanup in gSP. 2015-05-13 10:13:03 +06:00
Sergey Lipskiy
a6056d4c3c Optimize textures map: store values to avoid malloc/free. 2015-05-13 10:13:02 +06:00
Sergey Lipskiy
44c9dffc54 Refactor: rewrite GBI
Replace GBI_* functions by methods of GBIInfo.
2015-05-13 10:13:02 +06:00
Sergey Lipskiy
cd8f98bc7d Fix FBO buffers attachment in _copyDepthBuffer() 2015-05-13 10:13:01 +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
f42357bb39 Fix posix compilation errors 2015-05-13 10:12:59 +06:00
Sergey Lipskiy
ee4dabbfbb Fix gDPFillRDRAM out of bounds writes. 2015-05-13 10:12:59 +06:00
Sergey Lipskiy
8719d245a4 Fix frame buffer endAddress calculation. 2015-05-13 10:12:58 +06:00
Sergey Lipskiy
475b37eb00 Call PluginAPI methods which use OpenGL in separate thread.
This fixes plugin reset in Project64 1.6
2015-05-13 10:12:57 +06:00
Sergey Lipskiy
245cd1b8b5 add isGLError() function. 2015-05-13 10:12:57 +06:00
Sergey Lipskiy
4f900df0ba Shader combiners deinitialization cleanup. 2015-05-13 10:12:56 +06:00
Sergey Lipskiy
54ef6f2d0c Don't save frame buffer with zero width. 2015-05-13 10:12:55 +06:00
Sergey Lipskiy
7f76bcf555 Fix shadres creation/deletion in ShaderCombiner. 2015-05-13 10:12:55 +06:00
Sergey Lipskiy
604d290fec Fix FrameBufferList::attachDepthBuffer() :
fixed GL_INVALID_ENUM error in glDrawBuffers call.
2015-05-13 10:12:54 +06:00
Sergey Lipskiy
347e69007b Add GLCriticalSection class. Make PluginAPI descendant of GLCriticalSection. 2015-05-13 10:12:53 +06:00
Sergey Lipskiy
43a148b72c Add Log.h to MSVS project. 2015-05-13 10:12:53 +06:00
Sergey Lipskiy
e737cb80fa Code cleanup: remove unused isExtensionSupported() function. 2015-05-13 10:12:52 +06:00
Sergey Lipskiy
c2e3ea6d63 remove unused GLES related code 2015-05-13 10:12:51 +06:00
Sergey Lipskiy
f6ebb311a1 Massive refactoring: move API or OS dependent code to separate files.
Include/enable necessary source files in project files.
2015-05-13 10:12:51 +06:00
Sergey Lipskiy
8afec13cb9 Code cleanup in GBI.h:
fix idents and remove unused field "text"
2015-05-13 10:12:50 +06:00
Sergey Lipskiy
557874f896 Add HWND parameter to Config_DoConfig(). 2015-05-13 10:12:49 +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
4f8c3f691d Switch to Visual Studio 2013 2015-05-13 10:12:47 +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
954d5c3552 Correct combiners init/destroy. 2015-05-13 10:12:44 +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
9e5cab6852 Remove Noise textures. 2015-05-13 10:12:43 +06:00
Sergey Lipskiy
c33b6056cb Code cleanup: fix idents in CMakeList.txt 2015-05-13 10:12:42 +06:00
Sergey Lipskiy
21b40c7a6c Remove 2xSAI support. 2015-05-13 10:12:42 +06:00
Sergey Lipskiy
f7e0aa6e10 Refactor: correct texture CRC calculation.
Texture parameters are added to calculated crc, and thus the crc must
define the texture completely.
Assertion added to check that found texture is exactly the one we are looking for.
2015-05-13 10:12:41 +06:00