Commit Graph

637 Commits

Author SHA1 Message Date
rw-r-r-0644
b3e82ffb3f wiiu/render: Temporaneously disable formats other than RGBA8888 until the cause of bad colors is found 2019-04-29 22:55:55 +10:00
rw-r-r-0644
ef7d10e54e wiiu/render: Enable alpha merge/other settings 2019-04-29 22:55:55 +10:00
rw-r-r-0644
b413dafb06 wiiu: Move coordinates math to shader 2019-04-29 22:55:55 +10:00
rw-r-r-0644
a7ee3dd532 wiiu/render: Fix final bugs; it partially works now \o/ 2019-04-29 22:55:55 +10:00
rw-r-r-0644
aa08e434c9 wiiu/render: Fix GX2ContextState alignment 2019-04-29 22:55:55 +10:00
rw-r-r-0644
769a4dd086 wiiu/render: SDL_GetWindowSurface is needed to create the framebuffer 2019-04-29 22:55:55 +10:00
rw-r-r-0644
3798398c51 wiiu: Linking fixes 2019-04-29 22:55:55 +10:00
rw-r-r-0644
888d0c5dca render/wiiu: Fix compiling, implement RenderCopyEx, make some render vars unique for objects, add missing shaders 2019-04-29 22:55:55 +10:00
Ash
3cb1ed94bd render/wiiu: Start fixing up missing headers 2019-04-29 22:55:55 +10:00
rw-r-r-0644
a1fe555cad wiiu: Add more renderer function, make functions non-static, start adding new shaders 2019-04-29 22:55:55 +10:00
Ash
d120ddd096 wiiu/render: move drawing functions to own file 2019-04-29 22:55:55 +10:00
rw-r-r-0644
273e19c2ce wiiu/render: Implement UpdateTexture/RenderClear 2019-04-29 22:55:55 +10:00
Ash
4fa755d52f wiiu/render: Stub UpdateViewport / UpdateClipRect 2019-04-29 22:55:55 +10:00
Ash
084e2b9efb wiiu/render: Implement SDL_LockTexture and SDL_UnlockTexture 2019-04-29 22:55:55 +10:00
Ash
a01adf4e00 wiiu/render: Remove optional SetTextureMod functions 2019-04-29 22:55:55 +10:00
Ash
e5fae70caf wiiu/render: Move texture-related functions to own file 2019-04-29 22:55:55 +10:00
Ash
0949442d7a wiiu/render: Implement GetOutputSize 2019-04-29 22:55:55 +10:00
Ash
03826edb25 wiiu/render: move window-related functions to own file 2019-04-29 22:55:55 +10:00
Ash
cea1907155 wiiu/render: consolidate calls to SetRenderTarget, minor tweaks 2019-04-29 22:55:55 +10:00
Ash
c337fd57f5 wiiu/render: Move function sigs and definitions to dedicated header 2019-04-29 22:55:55 +10:00
Ash
036b864413 wiiu/render: Minor formatting, move windowdata to header 2019-04-29 22:55:55 +10:00
Ash
162447e20b wiiu: render: Be consistent about tabs/spaces 2019-04-29 22:55:55 +10:00
rw-r-r-0644
53fd78a2fb wiiu: Implement more renderer functions (1) 2019-04-29 22:55:55 +10:00
rw-r-r-0644
7850c3e054 wiiu: Start implementing SDL_Renderer 2019-04-29 22:55:55 +10:00
Sam Lantinga
0efec8ac7a Fixed bug 4188 - Software renderer SDL_RenderCopyEx blits corrupt image under certain cases
Sylvain

Re-opening this issue.

It fixes the test-case, but it introduces a regression with another bug (bug #4313).

So here's a new patch that activate cropping of the source surface to solve the issue.
It also reverts the wrong changeset.
It prevents unneeded colorkey error message.
2018-10-30 07:00:03 -07:00
Michał Janiszewski
e4a84752cb Add and update include guards
Include guards in most changed files were missing, I added them keeping
the same style as other SDL files. In some cases I moved the include
guards around to be the first thing the header has to take advantage of
any possible improvements compiler may have for inclusion guards.
2018-10-28 21:36:48 +01:00
Alex Szpakowski
18b397b215 metal: Fix SDL_RenderReadPixels to wait for the GPU to finish rendering to the active texture before reading its pixels. 2018-10-13 03:36:42 -03:00
Alex Szpakowski
c13bc99b59 metal: Fix high dpi and resizing on macOS, and clean up iOS code. Fixes bug #4250. 2018-10-12 17:55:42 -03:00
Sam Lantinga
98d5b10188 Fixed bug 4188 - Software renderer SDL_RenderCopyEx blits corrupt image under certain cases
duckgrease

SDL_RenderCopyEx blits wrong image (in some cases it's bunch of alternating horizontal lines, some cases it's image from the wrong coordinate, and in some cases it's just a bunch of garbled pixels), when the following conditions are met:
- Use software renderer.
- Enable either horizontal or vertical flip.
- source and destination rectangles must have same width and height, and must be smaller than the size of the texture.
- source rectangle's X and Y coordinates must be 0.
2018-10-09 17:41:40 -07:00
Sam Lantinga
6b08f121d8 Fixed mingw-w64 build 2018-09-28 00:40:35 -07:00
Sam Lantinga
f1173c73cb Fixed bug 4277 - warnings patch
Sylvain

Patch a few warnings when using:
-Wmissing-prototypes -Wdocumentation -Wdocumentation-unknown-command

They are automatically enabled with -Wall
2018-09-27 14:56:29 -07:00
Sam Lantinga
de4f287d7f Removed redundant SDL_GetColorKey() call. (thanks Sylvain!) 2018-09-25 19:53:16 -07:00
Sam Lantinga
2a05f4681b Fixed bug 4264 - SDL_CreateTextureFromSurface generates error message but returns ok
Anthony @ POW Games

SDL_CreateTextureFromSurface makes an internal call to SDL_GetColorKey which can return an error and spams the error log with "Surface doesn't have a colorkey" even though the original function didn't return an error.
2018-09-24 16:41:55 -07:00
Ryan C. Gordon
cdac13e19c metal: Make sure layer drawableSize is adjusted on resize.
Fixes Bugzilla #4250.
2018-09-06 00:56:13 -04:00
Ryan C. Gordon
3987531781 metal: SDL_UpdateYUVTexture shouldn't swap planes based on format. 2018-09-01 20:47:12 -04:00
Sam Lantinga
07f8de33f6 Fixed compiler warning and use higher precision in angle calculation 2018-08-29 20:23:42 -07:00
Sam Lantinga
61f11dafb5 Fixed Windows build 2018-08-28 16:19:31 -07:00
Andreas Müller
eb2445d1ea GLES2: Get sin/cos out of vertex shader
The only place angle is activated and causes effect is RenderCopyEx. All other
methods which use vertex shader, leave angle disabled and cause useless sin/cos
calculation in shader.

To get around shader's interface is changed to a vector that contains results
of sin and cos. To behave properly when disabled, cos value is set with offset
-1.0 making 0.0 default when deactivated.

As nice side effect it simplifies GLES2_UpdateVertexBuffer: All attributes are
vectors now.

Additional background:

* On RaspberryPi it gives a performace win for operations. Tested with
  [1] numbers go down for 5-10% (not easy to estimate due to huge variation).
* SDL_RenderCopyEx was tested with [2]
* It works around left rotated display caused by low accuracy sin implemetation
  in RaspberryPi/VC4 [3]

[1] https://github.com/schnitzeltony/sdl2box
[2] https://github.com/schnitzeltony/sdl2rendercopyex
[3] https://github.com/anholt/mesa/issues/110

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-08-28 12:57:51 -07:00
Ryan C. Gordon
5f757c92d2 gles2: Whoops, overzealous copy/paste on my part. :) 2018-06-25 01:57:28 -04:00
Ryan C. Gordon
192b561758 Fixed some possible malloc(0) calls reported by static analysis. 2018-06-24 12:16:58 -04:00
Sam Lantinga
5b65d102d4 Fixed race condition where Android touch events could get scaled by a render target's viewport 2018-06-18 13:13:56 -07:00
Ozkan Sezer
f80833862e do the direct3d tap dance for overscan hint only if SDL_VIDEO_RENDER_D3D == 1 2018-05-10 08:25:23 +03:00
Sam Lantinga
896aed7743 Fixed bug 4134 - Render targets lose scale quality after minimizing a fullscreen window
Olli-Samuli Lehmus

If one creates a window with the SDL_WINDOW_FULLSCREEN_DESKTOP flag, and creates a render target with SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"), and afterwards sets SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest"), after minimizing the window, the scale quality hint is lost on the render target. Textures however do keep their interpolation modes.
2018-05-07 19:52:25 -07:00
Ryan C. Gordon
5117e52a11 Backed out changeset bd976b7b2b43
Apparently this still triggers a compiler warning, have to dig further.
2018-02-21 22:53:52 -05:00
Ryan C. Gordon
b32b2a680c android: apparently they fixed this header at some point. 2018-02-21 22:35:17 -05:00
sezero
7287068da5 revert the recent typecast assignment changes (see bug #4079)
also change the void* typedefs for the two vulkan function
pointers added in vulkan_internal.h  into generic function
pointer typedefs.
2018-02-12 17:00:00 +03:00
Sam Lantinga
8a477f57e7 Fixed compile warning 2018-02-09 16:31:57 -08:00
Sam Lantinga
49ae998d51 Fixed ISO C99 compatibility
SDL now builds with gcc 7.2 with the following command line options:
-Wall -pedantic-errors -Wno-deprecated-declarations -Wno-overlength-strings --std=c99
2018-01-30 18:08:34 -08:00
Sam Lantinga
134a3fc30a Added availability check to fix compiler warning for symbol only available on tvOS 11.0 and newer 2018-01-10 10:42:40 -08:00
Alex Szpakowski
9f3768824b metal: set max texture size based on device capability. 2018-01-07 22:00:37 -04:00