Sergey Lipskiy
3d6a897c97
Fix GL error when CopyToRDRAM a buffer with zero width or height.
2015-09-20 15:31:39 +06:00
Sergey Lipskiy
1bf3b6e85a
Fix alphaNoiseDither.
...
Weird, but use of bit mask causes the shader to work completely wrong, see #518
2015-09-19 19:27:12 +06:00
purplemarshmallow
f487225b48
Optimize Perfect Dark framebuffer effects
...
We only check once per frame. ~100% performance boost in deep sea with
infrared vision.
2015-09-19 18:45:32 +06:00
purplemarshmallow
e7024978ac
don't update NoiseTexture if noise is disabled
...
updating NoiseTexture kills performance in Star Wars Episode I - Racer.
If noise emulation is disabled there's no need to update it.
2015-09-19 18:00:47 +06:00
matto
18172a6c0b
Fixing multisampling
...
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 ).
2015-09-08 10:58:52 +06:00
matto
0ea397a4cc
Changing the getRevision script to place the header differently
...
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.
2015-09-05 16:24:17 -04:00
purplemarshmallow
1fcb64ca79
Revert "Don't discard frame buffers creation when _height == 0"
...
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()
2015-09-04 10:09:00 +06:00
matto
3e8ab78258
Code cleanup: Adding newlines to code lines that were too long.
...
I think this adds to the readability of the code, as my brain
starts reeling when the line has to break off the page.
2015-09-03 21:27:55 +06:00
matto
6c22746619
Code cleanup: removing random semicolon.
2015-09-03 21:25:40 +06:00
matto
4eb27a8795
Adding assert on malloc
...
We do this in other places and I think it's good behaviour for the
exceptional occasion that we cannot allocate memory.
2015-09-03 21:24:35 +06:00
matto
6156c35617
Code cleanup: moving logic from large loop in TextureCache::_load to
...
worker function.
This makes this loop tighter and easier to read. The loop was really
difficult to read before, and now it's a tad easier.
2015-09-03 21:22:08 +06:00
purplemarshmallow
2847606877
Always reinit buffer after its height correction.
...
This fixes pokemons library in Pokemon Stadium 2.
2015-09-03 20:52:12 +06:00
matto
fa7e1c8137
Splitting up asserts
...
If these asserts are to be useful for debugging, they should really
be split up so that we can tell which one is failing.
2015-08-29 11:55:34 -04:00
Sergey Lipskiy
2604b57bf1
Remove ValidityCheckMethod from config and UI.
...
Up config version.
2015-08-27 19:44:19 +06:00
purplemarshmallow
8e096a8db9
remove fill RDRAM functionality
...
fix m_fingerprint usage
fix code formatting
2015-08-27 19:43:00 +06:00
Sergey Lipskiy
c6988bb963
Fig regression with frame/depth buffer copy in HLE mode caused by commit 77f342f
.
2015-08-27 19:39:29 +06:00
Sergey Lipskiy
5eddea5baf
Add workaround for Adreno issue with glBlitFramebuffer.
...
Thanks fzurita for problem investigation and found solution.
2015-08-27 19:20:26 +06:00
purplemarshmallow
de32176303
Don't discard frame buffers creation when _height == 0
2015-08-26 20:43:09 +06:00
purplemarshmallow
97468d8e2a
enable validity checking if copyFromRDRAM option is on
2015-08-26 19:42:43 +06:00
Sergey Lipskiy
60c8003dc9
Remove GL ES extensions enablings from fragment shaders,
...
because they cause crash on PowerVR GPUs.
No regression found on Adreno and Tegra GPU. Need to be tested on other GPUs.
2015-08-26 19:27:02 +06:00
Sergey Lipskiy
444545baea
Enable hack_VIUpdateOnCIChange for Perfect Dark.
...
Fixed: Perfect Dark flickering lights #609
2015-08-23 20:38:44 +06:00
purplemarshmallow
01ffde2aa9
update scale when resizing window
2015-08-23 12:40:56 +06:00
Sergey Lipskiy
57e88cb800
Remove unused code. Fix code formatting.
2015-08-17 21:57:01 +06:00
purplemarshmallow
8463c0347f
fix regression in Mario Tennis
2015-08-17 21:57:00 +06:00
purplemarshmallow
0735bd0372
modify fingerprint validity checking method
...
In Zelda OOT the CPU applies a filter on the framebuffer texture. If we
write a small amount of data at the beginning the CPU won't change our
specific values
2015-08-17 21:56:59 +06:00
purplemarshmallow
e0face5f86
use unique values as fingerprint
...
this works much better
But sometimes Zelda writes values not only under but also over the
fingerprint, Link's model is lost again
2015-08-17 21:56:58 +06:00
purplemarshmallow
e617177958
fix problem with validity ckecking in Zelda OOT
...
problem: the game writes data below our fingerprint
solution: just check if the fingerprint is still there and ignore the
data below
2015-08-17 21:56:58 +06:00
Sergey Lipskiy
d30d813b18
Fix texture filter init/shutdown:
...
- texture filter updated when config.textureFilter options changed.
2015-08-17 15:42:40 +06:00
Sergey Lipskiy
5bf7a4e4de
Add support of 6xBRZ to user interface.
2015-08-17 15:37:15 +06:00
Sergey Lipskiy
daf18efabb
Update xBRZ texture filter to version 1.4
...
xBRZ: "Scale by rules" - high quality image upscaling filter by Zenju
Adopted sources from
http://sourceforge.net/projects/xbrz/files/xBRZ/
2015-08-17 15:37:15 +06:00
Sergey Lipskiy
2f34089850
Fix uniform initialization for zelda_monochrome_fragment_shader.
...
Fixed GL error in Zelda OOT subscreen after savestate load.
2015-08-16 18:21:55 +06:00
AmbientMalice
b8d9d30ecc
Apply Quake II hack to Quake 64.
...
I have no idea whether I got the syntax right thanks to not being able to build GLideN64. Assuming this works, this should fix underwater rendering in Quake 64.
2015-08-16 13:18:29 +06:00
purplemarshmallow
6e6fec1d94
Put Goldeneye microcode to the list of special microcodes
...
and disable near-plane clipping for it.
.Non = true
2015-08-15 19:51:54 +06:00
Sergey Lipskiy
c9c8b3a63e
Relax condition to enable alpha dither.
...
Fixed noise in Tonic Trouble #582 and Mission Impossible #616
2015-07-26 14:50:14 +06:00
purplemarshmallow
fc3a4c8085
enable subscreen delay fix for Doubutsu no Mori
2015-07-26 09:21:55 +06:00
purplemarshmallow
77f342fc63
fix depth buffer copy in LLE
...
in LLE it works well for Star Wars Episode I - Racer but for most games
it does not work correctly
2015-07-25 17:32:21 +06:00
purplemarshmallow
dbfbeb1b13
fix copy color to RDRAM in LLE
...
fixes #554
2015-07-25 17:32:20 +06:00
Gillou68310
ef46331c39
Add config option to change polygon offset values
2015-07-24 13:20:04 +06:00
Sergey Lipskiy
cbbd5d17de
Fix crash when fb emulation enabled/disabled during gameplay, issue #601
2015-07-23 21:55:30 +06:00
Sergey Lipskiy
70c4941fb9
Correct texture force clamp t condition in texrect.
...
Fixed regression in MK64, caused by commit c50b3c8
, issue #607
2015-07-23 16:31:09 +06:00
Sergey Lipskiy
57efca4692
Fix RomOpen for Mupen64Plus API.
...
RomOpen for Mupen64Plus API returns int, while Zilmar specs RomOpen returns void.
Thanks fzurita for pointing on this mistake.
Fixed issue #604
2015-07-23 16:07:33 +06:00
Sergey Lipskiy
16e3af616c
Add hack hack_VIUpdateOnCIChange for Quake II.
...
Quake II uses single buffer mode when underwater, so additional check
gDP.colorImage.changed != 0 is necessary to detect frame change.
This check may cause dummy buffers swaps, so now it is used for Quake II only.
Fixed #592
2015-07-03 15:03:01 +06:00
Sergey Lipskiy
d8817013cd
Fix geometry clipping problem for GL ES.
...
NoN - no near clipping.
GL ES does not support z-clipping disabling, so harmless hack used here.
Harmlessness condition: z value is not used by pixel pipeline.
gDP.otherMode.depthCompare == 0 && gDP.otherMode.depthUpdate == 0 - z not used for depth compare/update.
Thus we can set vertex z to any value, which will ensure that z/w is in range [-1, 1], e.g. to zero.
Fixed issue #588
2015-07-03 15:02:04 +06:00
Sergey Lipskiy
c50b3c8c1d
Correct force texture clamp condition in OGLRender::drawTexturedRect.
...
Fixed issue #506 - Perfect Dark Target Test target not displaying correctly
2015-07-03 13:45:59 +06:00
Gillou68310
40da41d953
Fix framebuffer texture rectangle coordinate in GLES2
2015-07-02 10:45:52 +06:00
Sergey Lipskiy
d0c8750759
Fix tex1 read in mipmap shader.
...
Fixed mip-mapping in general and issue #158 in particular.
2015-06-30 14:48:16 +06:00
Sergey Lipskiy
4a75d4d357
Add hack to fix both mario 64 and mario kart 64 background (blue sky) with widescreen hack enable.
...
Author: Gillou68310
2015-06-26 22:06:06 +06:00
Gillou68310
6be5ff6396
Force multisampling to 0 when not supported
2015-06-26 19:29:54 +06:00
Gillou68310
c2b9961cc8
Removed useless GLES headers
2015-06-26 19:29:52 +06:00
Sergey Lipskiy
7936e02066
Enable hack_subscreen for GLES2.
2015-06-26 19:20:44 +06:00
Sergey Lipskiy
6d53c3bbd8
Add hack_ignoreVIHeightChange.
...
Fixed Space Invaders Boss battle gliching #448
2015-06-25 11:14:46 +06:00
Sergey Lipskiy
3dcee1cef3
Revert "Implement special case when 8bit auxiliary I buffer is used as 8bit IA texture."
...
Fix causes issues in other games with 8bit auxiliary color buffers, e.g. JFG
This reverts commit d5a0f20098
.
2015-06-23 23:02:30 +06:00
Gillou68310
b7917ed3c2
Allow building with GLES on windows
2015-06-23 22:28:54 +06:00
Sergey Lipskiy
b897c449a1
Fix shader texture uniforms update for GLES2.
...
Fixed issue #586 .
Thanks Gillou68310 for the hint.
2015-06-23 22:19:11 +06:00
Sergey Lipskiy
12bc0c928d
Add blend mode for explosions in Vigilante 8.
2015-06-19 12:08:18 +06:00
Sergey Lipskiy
d5a0f20098
Implement special case when 8bit auxiliary I buffer is used as 8bit IA texture.
...
Fixed Turok 3 Incorrect Shadows #543
2015-06-19 10:53:30 +06:00
Sergey Lipskiy
3f7d868f9e
Fix mipmaping when mip-map emulation disabled in settings.
...
Most detailed tiles will always be used.
2015-06-18 14:51:43 +06:00
Sergey Lipskiy
a3ddc4ce3e
Correct mipmap shader again.
2015-06-18 14:14:11 +06:00
Sergey Lipskiy
db38b2f9ea
Fix compilation on Android.
2015-06-18 11:55:34 +06:00
Sergey Lipskiy
74afd9f114
Fix getTextureShiftScale for case of one-level mip-map.
...
Fixed guard rail in Banjo Kazooie, #158
2015-06-17 22:58:03 +06:00
Sergey Lipskiy
1dc2bd1a56
Fix compilation on Linux.
2015-06-17 18:21:11 +06:00
Sergey Lipskiy
2199dd4290
Correct Lod calculaton and mipmaping.
...
Fixed issue #571 and probably other mip-map relating issues.
2015-06-17 16:10:03 +06:00
Sergey Lipskiy
5f42da74cd
Correct min_lod load.
2015-06-17 16:02:09 +06:00
Sergey Lipskiy
27149064e0
Correct load to TMEM functions: wrap tmem address in case of overflow.
...
Necessary for issue #571
2015-06-17 16:02:06 +06:00
Sergey Lipskiy
a13e6322d9
Code cleanup: correct class TextDrawer definition.
2015-06-16 20:41:13 +06:00
Sergey Lipskiy
68941f6cbe
Optimize frame buffer copy to RDRAM:
...
read from pixel buffer one time per pixel.
Old code does 4 reads from the pixel buffer per pixel.
The optimization makes color buffer read circa 4 times faster.
Thanks Lars Bishop for finding the sources of the problem and for suggested solution.
2015-06-16 19:43:15 +06:00
Sergey Lipskiy
7ee974f213
Remove debug calls of isGLError() from FrameBufferToRDRAM::CopyToRDRAM.
2015-06-16 19:40:56 +06:00
Sergey Lipskiy
eb23f38934
New fix for issue #563 . It does not break CBFD work.
2015-06-14 23:29:33 +06:00
Sergey Lipskiy
48959f0702
Revert "Correct coronas emulation in Perfect Dark."
...
This reverts commit 36fbcd5eac
.
Reverted commits causes issues in CBFD. Need another approach.
2015-06-14 22:57:53 +06:00
Sergey Lipskiy
5e56691dcf
Fix compilation of depth_compare_shader_float for GL ES 3.1
...
Note: the shader does not work properly yet on Android
2015-06-10 23:23:53 +06:00
Sergey Lipskiy
e4b440ea1d
Fix compilation of shadow_map_fragment_shader_float for GL ES 3.1
...
Note: the shader does not work properly yet on Android
2015-06-10 23:23:37 +06:00
Sergey Lipskiy
c2476e892e
Remove debug calls of isGLError() from NoiseTexture::update().
2015-06-10 22:46:55 +06:00
Sergey Lipskiy
5e5a48e1e0
Make shaders GL ES 3.1 conformant.
...
Fixed issue #573
2015-06-10 18:57:13 +06:00
Sergey Lipskiy
563f167447
Correct FBOTextureFormats::init()
...
Now GLES2 setup should be compatible with all GLES2 devices.
2015-06-09 22:35:26 +06:00
Sergey Lipskiy
5e114a7a83
Fix compilation with gcc, issue #572
2015-06-09 16:54:57 +06:00
Sergey Lipskiy
e3dcba03f6
Minor correction in GetCI16RGBA functions.
...
Make calculations a bit more optimal and clear.
2015-06-05 00:07:51 +06:00
Sergey Lipskiy
847245350b
Add debugPrint function for VisualStudio debug output.
2015-06-04 22:19:50 +06:00
Sergey Lipskiy
36fbcd5eac
Correct coronas emulation in Perfect Dark.
...
Fixed issue #563 .
2015-06-04 22:17:04 +06:00
Sergey Lipskiy
4b6df9bd10
Fix possible crash in texturedRectDepthBufferCopy.
2015-06-04 16:41:15 +06:00
Sergey Lipskiy
7ce35bfeee
Enable gl_FragDepth correction for GLES.
2015-06-02 21:05:59 +06:00
Sergey Lipskiy
a25c85b3f2
Hack depth buffer attachment for GLES2. Need proper fix.
2015-06-02 18:57:54 +06:00
Sergey Lipskiy
1653069329
Correct FBO texture formats for different GL versions.
2015-06-02 18:57:24 +06:00
Sergey Lipskiy
9a991ba550
Correct FrameBufferList::renderBuffer for GLES2
2015-06-01 23:58:57 +06:00
Sergey Lipskiy
e1000add03
Fix compilation warning in Keys.cpp
2015-06-01 14:50:07 +06:00
Sergey Lipskiy
37b5a38486
Enable texture_filter_anisotropic for GLES.
2015-06-01 14:50:04 +06:00
Sergey Lipskiy
c9f62a55e8
Disable fog blend for some GLES2 GPU, which can not parse that part of fragment shader.
...
Currently disabled for PowerVR and Adreno GLES2 GPU.
GLES3 Adreno GPU free of that limitation and thus fog blend
will not disabled for them.
2015-06-01 14:49:59 +06:00
Sergey Lipskiy
f000cf4154
Log info about GL version.
2015-06-01 13:35:58 +06:00
ptitSeb
9b33b71f36
Trying to get xbrz compiling under GCC >= 5
2015-05-31 18:26:17 +02:00
ptitSeb
f953e235c4
Pandora support
2015-05-31 18:26:08 +02:00
Sergey Lipskiy
6b67ba3a57
Fix 3point texture filtering for GLES2.
2015-05-31 14:13:27 +06:00
Sergey Lipskiy
910c5de1bf
Enable post-processor for GLES2.
2015-05-30 22:40:14 +06:00
Sergey Lipskiy
92450d3acf
Fix PostProcessor compatibility with Android.
2015-05-30 22:39:19 +06:00
Sergey Lipskiy
be5695bea7
Make TextDrawer compatible with Android.
2015-05-30 20:38:53 +06:00
Sergey Lipskiy
83d74af29d
Fix compilation warnings in TextDrawer.cpp
2015-05-30 20:38:52 +06:00
Sergey Lipskiy
1ce07a2205
Switch to newer versions of libpng and libz.
2015-05-30 20:38:51 +06:00
Sergey Lipskiy
ecf4c79e66
make gln_wcscat static to avoid link issues.
2015-05-30 20:38:50 +06:00
Sergey Lipskiy
1751c75e8a
Fix compilation on Linux.
2015-05-30 20:38:37 +06:00
purplemarshmallow
b73fb10442
maintain correct aspect ratio when changing window size in mupen64plus
2015-05-29 22:56:52 +06:00
Sergey Lipskiy
65df8335f6
Move osal_files.h and txWidestringWrapper.h from inc to osal subfolder.
2015-05-29 20:51:39 +06:00
Sergey Lipskiy
87b80b1383
Remove config.generalEmulation.enableLOD usage for GLES2.
...
GLES2 mipmap shader can't calculate LOD, but it does useful comparisons,
so it is useful to use it regardless of config option.
2015-05-29 20:51:33 +06:00
Sergey Lipskiy
701ebad2ab
Fix _cutLastPathSeparator()
...
Add Android implementation.
2015-05-29 20:51:23 +06:00
Sergey Lipskiy
2b0db06858
Add Android compatible wrapper for wcscat and wchar_t* constant strings.
2015-05-29 20:51:19 +06:00
Sergey Lipskiy
0a4bf95e2f
Wrapper for std::wstring and wchar_t* strings.
...
Necessary functions are not implemented properly on many Android platforms.
The wrapper converts wchr_t* string to char* one and uses char* functions,
which Android supports well.
2015-05-28 12:20:21 +06:00
Sergey Lipskiy
076f0c8e1b
GLideNHQ: Output debug messages to android log instead of file.
2015-05-26 23:41:02 +06:00
Sergey Lipskiy
037d2d8e1d
Remove boost dependency.
...
This modification is done mostly for Android port of the plugin.
Boost::filesystem replaced by osal-files collection of filesystem functions.
osal-files copied from mupen64plus-video-rice and modified to work with wchar_t strings.
Windows implementation should work well with unicode strings, because
Microsoft provides wide string compatible filesystem functions.
Unix implementation fakes work with unicode strings by converting them to multibyte strings.
It may not work if user will chose folder with non-ASCII path.
2015-05-26 23:40:52 +06:00
Sergey Lipskiy
9299dc5549
Disable mip-map texture load for GLES2.
2015-05-26 14:03:53 +06:00
Sergey Lipskiy
ae694f98e0
Always use GL_RGBA as internal texture format for GLES2.
...
Fixed compatibility with Mali400 GPU.
2015-05-26 14:03:47 +06:00
Sergey Lipskiy
3e0d3dc192
Correct About dialog form:
...
- disable translation of authors and funders names.
- add nesplayer4life to main funders section. ($500+ in total!)
2015-05-25 15:26:51 +06:00
Sergey Lipskiy
7b0e0b94f4
Disable number of processors detection for Android.
2015-05-23 17:57:16 +06:00
Sergey Lipskiy
2c7184cab6
Add PluginAPI functions: GetUserDataPath() and GetUserCachePath().
...
New functions are used for texture library initialization.
GetUserDataPath() returns default folder to search for hi-res texture packs.
GetUserCachePath() returns folder to store texture cache.
Mupen64Plus implementation: use system ConfigGetUserDataPath() and ConfigGetUserCachePath().
Windows implementation: just return FindPluginPath() for both functions.
Note: behaviour of Mupen64Plus changed.
Previously the emulator's folder was default path for hires textures and texture cache.
Now default path is system dependent.
For Windows it will be %HOME%\AppData\Roaming\Mupen64Plus
2015-05-23 17:53:08 +06:00
Sergey Lipskiy
0c416070c7
Fix load RGBA16 texture when tlut is enabled.
...
Solution is taken from Angrylion's software lle plugin.
Fixed Mario Kart- thwomp textures #532
2015-05-22 19:05:21 +06:00
Sergey Lipskiy
c0655c1f7c
Correct path to GL includes for GLES
...
Add #define GL_COLOR_INDEX8_EXT for GLES
2015-05-21 20:21:06 +06:00
Sergey Lipskiy
a966632dc6
Optimization: use simplified fragment_shader_readtex when BILINEAR_3POINT mode disabled.
2015-05-21 00:14:22 +06:00
Sergey Lipskiy
1819f4fc50
Add Shaders and GLSLCombiner for GLES2.
2015-05-21 00:14:16 +06:00
Sergey Lipskiy
48b1d55449
Move noise and monochrome_image initialization to the right place.
...
These functionalities do not require GL_IMAGE_TEXTURES_SUPPORT.
2015-05-21 00:11:43 +06:00
Sergey Lipskiy
92fcf0a797
Code cleanup: make g_monochrome_image_program variable static.
2015-05-21 00:11:39 +06:00
Sergey Lipskiy
5eee1ef01e
Optimization. Split fragment_shader_readtex on 3 part:
...
- readTex when BILINEAR_3POINT mode disabled
- readTex when BILINEAR_3POINT mode enabled
- readTexMS for multisampled textures.
2015-05-21 00:11:37 +06:00
Sergey Lipskiy
aad80168d3
Code refactor:
...
Move CompileCombiner to ShadersUtils.
Remove GLES2 specific code.
2015-05-21 00:11:30 +06:00
Sergey Lipskiy
9fd4d55b44
Code refactor: Make specialized shaders code for GLES2 and OGL3X (GLES3+ and desktop GL)
...
GLES2 is very limited and its limitations make source code look bad.
Step 1. Move Shaders.h and GLSLCombiner.cpp to OGL3X folder.
2015-05-20 17:16:49 +06:00
Sergey Lipskiy
e62e81c0e2
Code refactor: move some shaders utility functions to separate files.
2015-05-20 11:32:10 +06:00
Sergey Lipskiy
e73cee3a58
Code refactor: add abstract class UniformCollection.
...
Implement it for desktop GL: OGL3X/UniformBlock
and for GLES2: GLES2/UniformSet
GLES3 and above must use OGL3X/UniformBlock.
2015-05-20 11:32:05 +06:00
Sergey Lipskiy
ed4271e60e
Make shaders GLES2 compatible.
2015-05-19 00:33:16 +06:00
Sergey Lipskiy
19c9e80b70
Correct frame buffer texture format for GLES2.
2015-05-18 13:51:16 +06:00
Sergey Lipskiy
d30a2dc8b5
Correct depth buffer texture format for GLES2.
2015-05-18 13:51:16 +06:00
Sergey Lipskiy
12f9f8d5d0
Disable ResolveDepthBufferTexture creation for system without GL_MULTISAMPLING_SUPPORT
2015-05-18 13:51:15 +06:00
Sergey Lipskiy
47719e3ce3
Don't set GL_TEXTURE_MAX_LEVEL for GLES2.
2015-05-18 13:51:14 +06:00
Sergey Lipskiy
b14086911c
GLES2: fix OGLRender::_initExtensions()
2015-05-18 13:51:13 +06:00
Sergey Lipskiy
b88f801a62
GLES2: fix OGLVideo::readScreen2
2015-05-18 13:51:13 +06:00
Sergey Lipskiy
d105a2a8a1
Make PostProcessor GLES2 compatible.
2015-05-18 13:51:12 +06:00
Sergey Lipskiy
ca0844c57d
Correct shader version in PostProcessor
2015-05-18 13:51:11 +06:00
Sergey Lipskiy
b16dedd3f9
Fix compilation error in FrameBufferList::renderBuffer.
2015-05-18 13:51:10 +06:00
Sergey Lipskiy
7cbca30197
Disable resolveMultisampledTexture() for system without GL_MULTISAMPLING_SUPPORT
2015-05-18 13:51:10 +06:00
Sergey Lipskiy
4e821c0763
GLES2: Replace noise texture format by GL_LUMINANCE.
2015-05-18 13:51:09 +06:00
Sergey Lipskiy
9779399306
GLES2: Replace UniformBlocks by separate uniforms.
2015-05-18 13:51:08 +06:00
Sergey Lipskiy
d4a9899110
Code refactor: add set method to uniform classes.
2015-05-18 13:51:07 +06:00
Sergey Lipskiy
b219997c80
Always show cfb until first dlist:
...
- move flag CHANGED_CPU_FB_WRITE from gSP to gDP (code refactor)
- enable CHANGED_CPU_FB_WRITE on video init.
- disable CHANGED_CPU_FB_WRITE in process display list.
many pd roms and demos use cpu rendering only
now they are supported with default settings
also detectCFB=1 now isn't needed anymore for some games
Commit is based on changes made by purplemarshmallow in #536
2015-05-18 12:55:42 +06:00
Sergey Lipskiy
db9943a7b9
Code refactor: move flag CHANGED_COLORBUFFER from gSP to gDP.
2015-05-18 12:35:48 +06:00
Sergey Lipskiy
5b1a50ecb7
Set OpenGL context major and minor version in OGLVideoMupenPlus::_setAttributes()
2015-05-14 11:45:41 +06:00
Sergey Lipskiy
82a2d65018
Update Mupen64Plus interface headers.
2015-05-14 11:27:44 +06:00
Sergey Lipskiy
d7d22f2821
Fix compilation for Android.
2015-05-13 12:26:36 +06:00
Sergey Lipskiy
98c9303cdc
Don't change texture Wrap mode if it has mirror flag.
...
Fixed Perfect Dark lights glitch depending on angle #516
2015-05-13 10:22:39 +06:00
Sergey Lipskiy
7741138775
Simplify OGLRender::drawTexturedRect : process texcoords in a cicle.
2015-05-13 10:22:38 +06:00
Sergey Lipskiy
98c4f06a77
Simplify OGLRender::_updateStates
2015-05-13 10:22:38 +06:00
Sergey Lipskiy
e758303e74
Code refactor: replace GLSLCombiner::usesT0() and GLSLCombiner::usesT1()
...
by GLSLCombiner::usesTile(_t)
2015-05-13 10:22:37 +06:00
Sergey Lipskiy
011ba09252
Code refactor: rename GLSLCombiner::usesTex() to usesTexture()
2015-05-13 10:22:36 +06:00
Sergey Lipskiy
5700ec8e54
Add Polish translation to the GLideNUI project.
2015-05-13 10:22:35 +06:00
Sergey Lipskiy
2e0389e72e
Load config before About dialog call to get info about current translation.
2015-05-13 10:22:35 +06:00
Sergey Lipskiy
73fcf8d551
Move TextureCache::m_curUnpackAlignment initialization to TextureCache::_addTexture
...
Mupen64plus set GL_UNPACK_ALIGNMENT to 1 after TextureCache::init().
When TextureCache set GL_UNPACK_ALIGNMENT back to value obtained in init(),
it broke text in mupen64plus messages.
2015-05-13 10:22:34 +06:00
Sergey Lipskiy
fc8a000616
Fix RDRAMSize for non-Windows platforms.
2015-05-13 10:22:33 +06:00
Sergey Lipskiy
2feb8a24dd
Use glTexStorage2DMultisample for GLES3_1
2015-05-13 10:22:33 +06:00
Sergey Lipskiy
d46ed98804
Fix wrong set of CHANGED_TEXTURE flag.
2015-05-13 10:22:32 +06:00
Sergey Lipskiy
13d53a0dde
Set CHANGED_TILE flag in gDPSetTile.
...
Fixed Banjo Tooie: certain textures change/shift #499
2015-05-13 10:22:31 +06:00
Sergey Lipskiy
e685cbc83c
Rewrite mipmap shader.
...
Less if().
2015-05-13 10:22:31 +06:00
Sergey Lipskiy
09837f88d4
Replace int uniforms uFb8Bit, uFbFixedAlpha by ivec2 ones.
2015-05-13 10:22:30 +06:00
Sergey Lipskiy
6c062c8232
Replace uniforms uMSTex0Enabled, uMSTex1Enabled by vector uniform uMSTexEnabled.
2015-05-13 10:22:29 +06:00
Sergey Lipskiy
7f9a3973eb
Do not use textureLod for fetching normal textures. It kills anisotropic filtering:
...
https://www.opengl.org/wiki/Sampler_(GLSL)
Also need to keep in mind issue #232 and not allow mip-mapping for combiners,
which do not use it.
Fixed anisotropic filtering not working #505
2015-05-13 10:22:29 +06:00
Sergey Lipskiy
49efba0ce6
Correct RDRAMtoFrameBuffer::CopyFromRDRAM -
...
need to update combiner's FBInfo before use.
2015-05-13 10:22:28 +06:00
Sergey Lipskiy
eabbd252f8
Change CachedTexture::frameBufferTexture type to enum.
...
Need to separate one-sampled frame buffer textures from multosampled ones.
2015-05-13 10:22:27 +06:00
Sergey Lipskiy
dbbb7da427
Move _isMarioTennisScoreboard() from FrameBufferList to FrameBuffer.
2015-05-13 10:22:26 +06:00
Sergey Lipskiy
663a0d76f1
Implement multisampled textures fetch in shaders.
...
Thanks mudlord for the idea.
Fixed Perfect Dark frame buffer effects do not work when FSAA is on. #244
2015-05-13 10:22:26 +06:00
Sergey Lipskiy
b728ab97a7
Disable multisampling related code for GLES below 3.1
2015-05-13 10:22:25 +06:00
Sergey Lipskiy
f754943515
Disable use of depth_compare_shader for platforms, which do not support GL_IMAGE_TEXTURES_SUPPORT
2015-05-13 10:22:24 +06:00
Sergey Lipskiy
1437eb030a
Define internal format for depth texture for GLES3
2015-05-13 10:22:23 +06:00
Sergey Lipskiy
d1a16d0a12
Fix memcpy not found on Android.
2015-05-13 10:22:23 +06:00
Sergey Lipskiy
e9564caaab
Disable zelda_monochrome_fragment_shader for platforms without GL_IMAGE_TEXTURES_SUPPORT
2015-05-13 10:22:22 +06:00
Sergey Lipskiy
aac3c036dc
Add define for shader version string.
2015-05-13 10:22:22 +06:00
Sergey Lipskiy
37963159e4
Fix texturedRectShadowMap for platforms without GL_IMAGE_TEXTURES_SUPPORT
2015-05-13 10:22:21 +06:00
Sergey Lipskiy
81c003a872
Add GLES3 headers include to OpenGL.h
2015-05-13 10:22:20 +06:00
Sergey Lipskiy
f95804db92
Fix vertex_shader_notex for GLES
2015-05-13 10:22:20 +06:00
Sergey Lipskiy
e819e3cf65
Remove obsolete code from Textures.h
2015-05-13 10:22:19 +06:00
Sergey Lipskiy
09b78ea577
Replace define GLES3 by GLES3_1 since current code is GLES3.1 compatible.
...
GLES3 is different.
2015-05-13 10:22:18 +06:00
Sergey Lipskiy
a550f70330
Add extern "C" for functions in glState.h
...
Thanks Gillou68310 for hint.
2015-05-13 10:22:18 +06:00
Sergey Lipskiy
243e186ba2
Correct internal format for DepthBufferToRDRAM color texture.
2015-05-13 10:22:17 +06:00
Sergey Lipskiy
d3f6754cff
Correct depth texture intarnal format for GLES3
2015-05-13 10:22:16 +06:00
Sergey Lipskiy
0a89aa9f77
Make Shaders GLES3.1 compatible.
2015-05-13 10:22:16 +06:00
Sergey Lipskiy
e4e6c277da
Fix fragment shader creation for GLES.
2015-05-13 10:22:15 +06:00
Sergey Lipskiy
c53dac8fa7
Temporal stub for PluginAPI::FindPluginPath
2015-05-13 10:22:14 +06:00
Sergey Lipskiy
107a81d079
Don't init from/to RDRAM objects when frame buffer emulation is off.
2015-05-13 10:22:14 +06:00
Sergey Lipskiy
94ec380bc8
Use GL_R16 as internal type for unsigned short textures for GL and
...
GL_R16UI for GL ES.
2015-05-13 10:22:13 +06:00
Sergey Lipskiy
0f8f8c3834
Move video_api_export.ver to mupenplus folder.
2015-05-13 10:22:12 +06:00
Sergey Lipskiy
4e4f0d1bf3
Replace 1D textures by 2D ones
2015-05-13 10:22:11 +06:00
Sergey Lipskiy
01807a0499
Fix FrameBuffer_CopyDepthBuffer: return false for GLES2 case.
2015-05-13 10:22:10 +06:00
Sergey Lipskiy
12102146f1
Add TxFilterStub.cpp for GL ES.
...
Temporal solution to avoid compilation errors.
2015-05-13 10:22:10 +06:00
Sergey Lipskiy
759578ff14
Replace TextDrawer by TextDrawerStub for GL ES.
2015-05-13 10:22:09 +06:00
Sergey Lipskiy
2bf72ab833
Correct filename case in includes.
2015-05-13 10:22:08 +06:00
Sergey Lipskiy
6afe5fe30c
Disable anisotropy for GL ES
2015-05-13 10:22:08 +06:00
Sergey Lipskiy
ded889350c
Remove use of obsolete texture type GL_LUMINANCE8_ALPHA8.
2015-05-13 10:22:07 +06:00
Sergey Lipskiy
2f2a22ee48
Move video_api_export.ver to projects/android folder.
2015-05-13 10:22:06 +06:00
Sergey Lipskiy
f7b27138d8
Enable GL_IMAGE_TEXTURES_SUPPORT for GLES3
2015-05-13 10:22:06 +06:00
Sergey Lipskiy
a02d284645
Use glTexStorage2DMultisample instead of glTexImage2DMultisample in case of GLSE3
2015-05-13 10:22:05 +06:00
Sergey Lipskiy
70b1b9ad03
Replace glMapBuffer by GLES3 compatible glMapBufferRange.
2015-05-13 10:22:04 +06:00
Sergey Lipskiy
82ce16f5fc
Add new defines: GLESX for any GL ES version and GLES3 for GL ES 3.1
...
Guard GL ES incompatible code with GLESX
2015-05-13 10:22:03 +06:00
Sergey Lipskiy
bd5740ea3d
Disable GL_CLIP_DISTANCE for GLES
2015-05-13 10:22:03 +06:00
Sergey Lipskiy
e8d8ee93e4
Correct RSP_SegmentToPhysical
...
Fixed Glover crash after intro #474
2015-05-13 10:22:01 +06:00
Sergey Lipskiy
bbc71c3f0a
Fix crash in FrameBufferToRDRAM::CopyToRDRAM when current buffer is NULL.
...
Fixed Snowboard Kids causes segmentation fault #477
2015-05-13 10:22:01 +06:00
Sergey Lipskiy
cd0c74dff0
Enable translations for About dialog.
2015-05-13 10:22:00 +06:00
Sergey Lipskiy
5329a2a01b
Fix txPath save/load.
...
Fixed Texture pack path not saved correctly #456
2015-05-13 10:21:59 +06:00
Sergey Lipskiy
a1fdd33389
Add Portuguese and Spanish translations to project file.
2015-05-13 10:21:59 +06:00
Sergey Lipskiy
143cee1712
Disable rendering when config dialog is open to prevent plugin crash if
...
new settings are incompatible with the current ones.
2015-05-13 10:21:58 +06:00
Sergey Lipskiy
831b3410ed
Correct settings section creation for mupen64plus.
2015-05-13 10:21:58 +06:00
Sergey Lipskiy
36ae8b6eb6
Fix settings.hacks restore.
2015-05-13 10:21:57 +06:00
Sergey Lipskiy
29ab85fcc2
Fix frame buffer being bloomed twice.
2015-05-13 10:21:56 +06:00
Sergey Lipskiy
05b92c11bb
Apply scissor for post-processed frame buffer area.
...
Fixed overexposed areas for games with black boarders.
2015-05-13 10:21:55 +06:00
Sergey Lipskiy
a567a880fc
Add Italian translation to GLideNUI project file.
2015-05-13 10:21:55 +06:00
Sergey Lipskiy
d95103d3d1
Correct condition for mip-mapped textures filtering in 3 point filter mode.
2015-05-13 10:21:54 +06:00
Sergey Lipskiy
ced78db2b8
Minor code cleanup in ShaderCombiner::ShaderCombiner.
2015-05-13 10:21:53 +06:00
Sergey Lipskiy
e60e09922f
Correct 'credits' section in About dialog.
2015-05-13 10:21:53 +06:00
Sergey Lipskiy
0c886e26c3
Limit depth buffer copy to RDRAM with top and bottom bounds of fillrect command.
...
Fixed regression issues #436 and #437
Issue #330 with Roadsters is fixed too.
2015-05-13 10:21:52 +06:00
Sergey Lipskiy
b205529aec
Revert "Don't copy depth buffer to RDRAM if it was not cleared completly."
...
This commit causes 2 regressions: #436 , #437
Better solution needed.
This reverts commit 8b551549e0ca5ece29c5322cb062e8a9bc11e48e.
2015-05-13 10:21:51 +06:00
Sergey Lipskiy
3fa7756fd9
Implement internalization suppport.
2015-05-13 10:21:51 +06:00
Sergey Lipskiy
4d87fb6833
Impelent new fb validity check method:
...
copy RDRAM content to a buffer and compare by content.
2015-05-13 10:21:50 +06:00
Sergey Lipskiy
4b1114a113
Fix texture ShiftScale calculation.
...
Pokemon Stadium missing ground texture #412 reveals the problem:
the game loads the same texture into tile0 and tile1.
The only difference is ShiftScale values.
Since the checksum is the same, the same CachedTexture is used for both tiles.
Shift scale correction ovrwrites ShiftScale for tile0 when tile1 is loaded.
Thus, texture coordinates for both tiles will be same.
Combiner uses (tile0-tile1)*env_a+shade. Since t0==t1, texture component is missing.
Solution: calculate ShiftScale for each tile right before use.
Fixed #412
2015-05-13 10:21:49 +06:00
Sergey Lipskiy
94a4f7c411
Code cleanup: remove redundant code in gDPLoadBlock
2015-05-13 10:21:48 +06:00
Sergey Lipskiy
b56ca89553
Code cleanup: remove unused TEXTUREMODE_TEXRECT
2015-05-13 10:21:48 +06:00
Sergey Lipskiy
8950fef27b
Fix screenshot save:
...
Use wchar_t string to keep provided screenshot path.
Fixed Screenshots become invalid images #409
2015-05-13 10:21:47 +06:00
Sergey Lipskiy
e3d8905984
Fix _isMarioTennisScoreboard() hack for (E) version.
2015-05-13 10:21:46 +06:00
Sergey Lipskiy
08513ded89
Correct Mario Tennis scoreboard hack.
2015-05-13 10:21:45 +06:00
Sergey Lipskiy
cc600d499b
Fix FogBlendEnabled condition.
...
Fixed Perfect Dark visor and lighting issues #427
2015-05-13 10:21:45 +06:00
Sergey Lipskiy
96aab6c9ad
Correct Mario Tennis scoreboard hack for (J) rom.
...
Fixed issue #424
2015-05-13 10:21:44 +06:00
Sergey Lipskiy
2525b86f49
Implement "widescreen hack".
2015-05-13 10:21:43 +06:00
Sergey Lipskiy
c9d486222b
Add Adjust Aspect option to the GUI.
2015-05-13 10:21:42 +06:00
Sergey Lipskiy
89a6186166
Add solution file for GLideNUI.
2015-05-13 10:21:41 +06:00
Sergey Lipskiy
7017a82277
Correct conversion screen shot folder name from char *.
2015-05-13 10:21:41 +06:00
Sergey Lipskiy
a70a92f752
Switch to Unicode strings.
2015-05-13 10:21:40 +06:00
Sergey Lipskiy
277807fbf4
Don't reset hacks on settings load for mupen64plus.
2015-05-13 10:21:39 +06:00
Sergey Lipskiy
7eb8e46e12
Correct texturedRectCopyToItself - apply it only for 8bit frame buffers.
2015-05-13 10:21:39 +06:00
Sergey Lipskiy
13d2ff4710
Move code from ZilmarAPIImpl_common.cpp to ZilmarAPIImpl_windows.cpp
...
Remove ZilmarAPIImpl_common.cpp
2015-05-13 10:21:37 +06:00
Sergey Lipskiy
138d270dfd
Correct CMakeLists.txt
2015-05-13 10:21:37 +06:00
Sergey Lipskiy
cd1a679160
Rename GLFunctions.cpp to GLFunctions_windows.cpp
2015-05-13 10:21:36 +06:00
Sergey Lipskiy
968059b319
Remove obsolete makefiles from GLideNHQ.
2015-05-13 10:21:35 +06:00
Sergey Lipskiy
b24de2353c
Move Android.mk to projects/android.
...
File needs corrections.
2015-05-13 10:21:34 +06:00
Sergey Lipskiy
2d4c518820
Add instructions how to build project with cmake.
...
Add Boost libs necessary for Linux build.
2015-05-13 10:21:33 +06:00
Sergey Lipskiy
94bffc2e83
Move visual studio projects for GLideN64 and GLideNHQ to projects/msvc12 folder.
...
Project file for GLideNUI is special, generated from GLideNUI.pro file,
so it is left on its old place.
glext.h moved to src/inc folder.
2015-05-13 10:21:33 +06:00
Sergey Lipskiy
52d68d1389
Move all sources to src folder.
2015-05-13 10:21:32 +06:00