|
e6189f40
|
2020-03-17T15:47:30
|
|
Fix warnining implicit declaration of SDL_DetectPalette (Thanks meyraud705)
|
|
838bbf1f
|
2020-03-17T09:35:42
|
|
Fixed bug 5037 - Regression 2.0.12 Alpha value of 0 on palette may become opaque
(see also bug 3827)
|
|
c8c05a9f
|
2020-03-08T19:23:21
|
|
Fixed bug 4991 - Pixel shader problem when recreating a texture for direct3d renderer
cmediaplayer
Hi, i already mentioned in the SDL discourse a bug that recreating of a texture occours pixel shader problem on direct3d renderer. There is no problem for direct3d11. You can see the issue by using my app named C Media Player which is available for Windows for free using my web site www.cmediaplayer.com. Just follow the steps:
*Open a media file
*When playing the file change the scale quality under the video menu.
*You will see the problem.
|
|
367a3561
|
2020-03-08T18:56:07
|
|
Don't release the backbuffer on error, we didn't acquire it.
|
|
e152a3ce
|
2020-03-07T13:59:42
|
|
direct3d: Don't attempt to create zero sized vertex buffer
|
|
9a7c2b22
|
2020-02-23T09:59:52
|
|
Fixed bug 4999 - Palette surface always promoted to alpha (Thanks Cameron Gutman!)
MSVC Static analysis: Incorrect alpha_value check in SDL_render.c
(see also bug 4425)
|
|
93b26f17
|
2020-02-17T16:15:04
|
|
opengl: Backed out hg changeset 94f9f40a957f
This is the OpenGL line drawing fix for Bugzilla #3182, but there's some
disagreement about what the renderers should do here, so I'm backing this out
until after 2.0.12 ships, and then we'll reevaluate all the renderer backends
to decide what's correct, and make them all work the same.
|
|
6ec14b7f
|
2020-02-11T16:23:43
|
|
Fixed iOS and Android build
|
|
ed10d947
|
2020-02-10T12:53:54
|
|
opengl: Build out full GL_LINES and respect the diamond-exit rule.
Likewise for the GLES1 and GLES2 renderers.
This solves the missing pixel at the end of a line and removes all the
heuristics for various platforms/drivers. It's possible we could still use
GL_LINE_STRIP with this and save some vertex buffer space, assuming this
doesn't upset some driver somewhere, but this seems to be a clean fix that
makes the GL renderers match the software renderer output.
Diamond-exit rule explanation:
http://graphics-software-engineer.blogspot.com/2012/04/rasterization-rules.html
Fixes Bugzilla #3182.
|
|
13155b35
|
2020-02-10T09:42:53
|
|
The scissor rect needs to be updated when the viewport changes in the Metal renderer
|
|
b5849daf
|
2020-02-01T09:23:04
|
|
Fixed build warnings on Android
|
|
b5e3d264
|
2020-01-23T01:00:52
|
|
Added a single SDL_LEAN_AND_MEAN define to turn on minimal SDL builds
Protected more code with #ifdefs to reduce the size of minimal shared library builds
|
|
7df22cf2
|
2020-01-21T21:33:40
|
|
A few #defines to reduce SDL2 footprint.
Only applied when library is statically linked
|
|
a8780c6a
|
2020-01-16T20:49:25
|
|
Updated copyright date for 2020
|
|
981e0d36
|
2020-01-16T08:52:59
|
|
Fixed bug 4903 - Lack of color multiply with alpha (SDL_BLENDMODE_MOD + SDL_BLENDMODE_BLEND) blending mode for all renderers
Konrad
This kind of blending is rather quite useful and in my opinion should be available for all renderers. I do need it myself, but since I didn't want to use a custom blending mode which is supported only by certain renderers (e.g. not in software which is quite important for me) I did write implementation of SDL_BLENDMODE_MUL for all renderers altogether.
SDL_BLENDMODE_MUL implements following equation:
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
dstA = (srcA * dstA) + (dstA * (1-srcA))
Background:
https://i.imgur.com/UsYhydP.png
Blended texture:
https://i.imgur.com/0juXQcV.png
Result for SDL_BLENDMODE_MOD:
https://i.imgur.com/wgNSgUl.png
Result for SDL_BLENDMODE_MUL:
https://i.imgur.com/Veokzim.png
I think I did cover all possibilities within included patch, but I didn't write any tests for SDL_BLENDMODE_MUL, so it would be lovely if someone could do it.
|
|
ef3ca2cc
|
2019-12-23T19:55:10
|
|
Fix build error in SDL_render_metal.m (bug #4916.)
Patch provided by Konrad. Error was introduced by commit 522164980828 for bug #4914.
|
|
6d639fce
|
2019-12-23T16:47:00
|
|
SDL_ScaleMode: fix compilation GLES renderer
|
|
131e13a7
|
2019-12-22T20:48:43
|
|
direct3d11: Always set vertex buffers when updating them (thanks, Konrad!).
Fixes Bugzilla #4913.
|
|
5e19e66c
|
2019-12-22T13:39:44
|
|
Fixed bug 4914 - Expose SDL_ScaleMode and add SDL_SetTextureScaleMode/SDL_GetTextureScaleMode
Konrad
This was something rather trivial to add, but asked at least several times before (I did google about it as well).
It should be possible to dynamically change scaling mode of the texture. It is actually trivial task, but until now it was only possible with a hint before creating a texture.
I needed it for my game as well, so I took the liberty of writing it myself.
This patch adds following functions:
SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode);
SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode);
That way you can change texture scaling on the fly.
|
|
7b08eb48
|
2019-12-03T03:07:34
|
|
direct3d11: Fixed incorrect texture coordinates (thanks, Martin!).
Fixes Bugzilla #4860.
|
|
9e509e4a
|
2019-10-30T16:45:53
|
|
SDL_render_gles2: remove ineffective widening cast
warning: either cast from 'int' to 'size_t' (aka 'unsigned long') is ineffective, or there is loss of precision before the conversion [bugprone-misplaced-widening-cast]
|
|
60d3965e
|
2019-10-30T15:36:17
|
|
Readability: remove redundant return, continue, enum declaration
|
|
a9b867ab
|
2019-10-26T14:39:50
|
|
macOS Fix potential memory leaks in the Metal renderer caught by clang's static analyzer.
|
|
1ce1364b
|
2019-10-26T12:56:18
|
|
d3d11: Don't fail if there's no vertex data to upload (thanks, Martin!).
Fixes Bugzilla #4832.
|
|
216f5b98
|
2019-10-17T18:48:58
|
|
metal: Fix compilation when using older Apple SDKs (bug #4828).
|
|
fe20c35b
|
2019-10-14T16:40:46
|
|
Fixed race condition when scaling Touch events, and changing the renderer
target.
Always read the output size of the main renderer.
(similar to bug 2107)
|
|
72660a51
|
2019-10-13T20:52:52
|
|
Fixed bug 4825 - SDL Renderer OpenGL: Buffer overflow (SDL_RENDERCMD_DRAW_LINES)
|
|
7d47f526
|
2019-10-01T09:26:30
|
|
SDL_LockTextureToSurface: robustness of locked region compared to texture size
|
|
1ae61f10
|
2019-09-30T20:58:44
|
|
Added a helper function SDL_LockTextureToSurface()
Similar to SDL_LockTexture(), except the locked area is exposed as a SDL surface.
|
|
847bd8d9
|
2019-09-02T00:11:58
|
|
direct3d: Be more aggressive about resetting state when textures go away.
Fixes Bugzilla #4768.
|
|
a3804ba1
|
2019-09-01T22:41:44
|
|
d3d11: Fixed VB state, avoiding unnecessary recreation (Thanks, Alex!).
Fixes Bugzilla #4779.
|
|
0c263738
|
2019-08-26T18:49:04
|
|
gl/gles/gles2 render: fix SDL_RenderClear being affected by the clip rect in some situations.
|
|
bfdb0e97
|
2019-08-18T10:38:32
|
|
metal renderer: optimize SDL_RenderFillRect slightly.
|
|
ff7888e6
|
2019-08-18T09:35:11
|
|
render: fix colors not being set properly after the previous change
|
|
1be03b40
|
2019-08-17T22:26:33
|
|
render: avoid a couple redundant memcmp calls in all drawing functions. Improves performance slightly.
|
|
e8278d0d
|
2019-08-17T16:53:08
|
|
metal renderer: use vertex attributes instead of indexing into a buffer with the vertex id in the shader. Allows for more flexibility with vertex setup in the future.
Also optimize vertex buffer binding slightly.
|
|
55a46abf
|
2019-08-17T01:09:30
|
|
metal renderer: more closely match buffer data alignment requirements from the metal specification.
|
|
69c6924c
|
2019-08-17T00:43:44
|
|
render: simplify vertex and uniform data allocation. Improves performance of various SDL_Render functions (bug #4764).
|
|
e5acccc7
|
2019-08-17T00:37:22
|
|
metal renderer: use the device address space instead of the constant address space for colors.
It doesn't negatively impact GPU performance in my tests, and it removes the need for 256 byte memory alignment of color data on macOS.
|
|
3fb5cabe
|
2019-08-16T22:13:30
|
|
metal: Update compiled shaders based on compilation script changes
|
|
9e57e3e5
|
2019-08-16T22:11:50
|
|
metal: Update shader compilation script with fixes for newer xcode versions and for running on older platforms
|
|
aebaa316
|
2019-08-05T12:35:32
|
|
Add public APIs for creating a Metal view attached to an SDL window. Add SDL_metal.h.
|
|
22a2decf
|
2019-06-28T16:38:42
|
|
Android: concurrency issues, make sure Activity is in running State when calling
functions like SDL_CreateWindow, SDL_CreateRenderer, Android_GLES_CreateContext
Bugs 4694, 4681, 4142
|
|
cfed0b77
|
2019-06-28T16:14:50
|
|
Add an "error" label in SDL_CreateRenderer (no op)
|
|
31bb95f1
|
2019-06-21T15:07:39
|
|
direct3d: Use D3DPOOL_DEFAULT for vertex buffers after all, release correctly.
Fixes Bugzilla #4679.
Fixes Bugzilla #4537.
|
|
e681623c
|
2019-06-20T19:51:00
|
|
direct3d: Fix dirty textures failing to update
Even if the texture itself has not changed since last time, the data may have
so we must call UpdateDirtyTexture() to handle that possibility.
|
|
7162649f
|
2019-06-18T18:58:39
|
|
opengl: Be more robust in failing cases.
Load all possible symbols, not just until one fails, in case they get used
during shutdown, etc.
Fixes Bugzilla #4093.
|
|
5dcac4cc
|
2019-06-18T10:08:19
|
|
Fixed 4669 - Using the software SDL_Renderer on Android leads to GL errors & black screen when window resizes
Sylvain
I think what happening with the software renderer is:
* you're somehow in background (so texture creation is not possible)
* it resizes and wants to push a SDL_WINDOWEVENT_SIZE_CHANGED
It call:
https://hg.libsdl.org/SDL/file/a010811d40dd/src/render/SDL_render.c#l683
* GetOutputSize
* SW_GetOutputSize
* SW_ActivateRenderer
* SDL_GetWindowSurface
* SDL_CreateWindowFramebuffer which is mapped to SDL_CreateWindowTexture
and it ends up re-creating the surface/a texture, while being in background
|
|
e96d4760
|
2019-06-18T18:53:58
|
|
Android: resize with software rendering, reverted again (Bug 4669)
|
|
12b92260
|
2019-06-18T18:40:40
|
|
Android: try to fix resize with software rendering (bug 4669)
|
|
8a20d40d
|
2019-06-18T18:22:18
|
|
Android: revert commit SW_GetOutputSize, again (Bug 4669)
|
|
98cc7589
|
2019-06-18T10:41:11
|
|
Android: prevent using SW_GetOutputSize with software renderer (Bug 4669)
|
|
1213fe79
|
2019-06-14T13:56:42
|
|
Worked around "Undefined symbol: ___isPlatformVersionAtLeast()" link error on Xcode 11 beta
|
|
3e9bf284
|
2019-06-11T15:06:35
|
|
software: Fixed compiler warning and dos2unix'd the endlines.
|
|
04fedce0
|
2019-06-11T14:09:53
|
|
software: Correctly track viewport and cliprect.
Fixes Bugzilla #4457.
|
|
a2f2b735
|
2019-06-11T13:02:56
|
|
direct3d: Use D3DPOOL_MANAGED for vertex buffers.
Fixes Bugzilla #4537.
|
|
f7b7a972
|
2019-06-11T10:12:47
|
|
direct3d: Fixed SDL_RenderSetClipRect usage.
Fixes Bugzilla #4459.
|
|
4f59d372
|
2019-06-11T09:29:48
|
|
direct3d: don't dereference bogus pointer if current texture was destroyed.
Fixes Bugzilla #4460.
|
|
a6af0b82
|
2019-06-11T02:31:57
|
|
direct3d: Fixed more compiler warnings on Visual Studio 64-bit builds.
|
|
b5e9ebba
|
2019-06-08T19:12:05
|
|
Fixed compiler warning
warning C4018: '<' : signed/unsigned mismatch
|
|
41c718db
|
2019-05-19T12:04:06
|
|
Fixed bug 4469 - make SDL_CreateTextureFromSurface pick a more appropriate format
Sylvain
Currently SDL_CreateTextureFromSurface picks first valid format, and do a conversion.
format = renderer->info.texture_formats[0];
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) {
format = renderer->info.texture_formats[i];
break;
It could try to find a better format, for instance :
if SDL_Surface has no Amask, but a colorkey :
if surface fmt is RGB888, try to pick ARGB8888 renderer fmt
if surface fmt is BGR888, try to pick ABGR8888 renderer fmt
else
try to pick the same renderer format as surface fmt
if no format has been picked, use the fallback.
I think it goes with bug 4290 fastpath BlitNtoN
when you expand a surface with pixel format of size 24 to 32, there is a fast path possible.
So with this issue:
- if you have a surface with colorkey (RGB or BGR, not palette), it takes a renderer format where the conversion is faster.
(it avoids, if possible, RGB -> ABGR which means switching RGB to BGR)
- if you have a surface ABGR format, it try to take the ABGR from the renderer.
(it avoids, if possible, ABGR -> ARGB, which means switch RGB to BGR)
|
|
2ee9b1dd
|
2019-05-19T11:01:36
|
|
Fixed bug 4025 - SDL_Renderer OpenGL : add support for textures ABGR, RGB, BGR
Sylvain
OpenGLES2 SDL renderer has support for textures ARGB, ABGR, RGB and BGR, whereas OpenGL SDL renderer only had ARGB.
If you think it's worth adding it, here's a patch. I quickly tried and it worked, but there may be missing things or corner case.
|
|
d68e501d
|
2019-04-08T13:43:48
|
|
Fixed bug 4582 - Maximize/Resize not working on Windows 10
When viewport is set, projectionAndView changes, but ID3D11DeviceContext_UpdateSubresource was not called.
|
|
8ab698af
|
2019-03-21T10:39:49
|
|
opengles2: Fix static analysis warning.
Not clear if this could ever dereference NULL in real life, but better safe
than sorry!
|
|
b2e76d86
|
2019-03-19T16:52:09
|
|
Fixed Windows RT build
|
|
b28e956b
|
2019-03-12T07:59:53
|
|
Fixed bug 4542 - Image flipped vertically when rendering on texture
Have to recompute viewport because projection/glOrtho is different
wether rendering is on target texture or not
|
|
40781dfb
|
2019-02-04T23:35:18
|
|
opengles2: patched to compile.
|
|
b7504f31
|
2019-02-04T23:32:28
|
|
opengles2: keep cached texturing state correct.
|
|
a609c03a
|
2019-02-04T23:24:10
|
|
opengles1: keep cached texturing state correct.
|
|
40a52cee
|
2019-02-04T18:55:39
|
|
render: Fix OpenGL draw state cache for various points of texture binding.
|
|
07548602
|
2019-01-19T16:47:43
|
|
Fixed bug 3657 - Color-key doesn't work when an alpha channel is present
When surface format is the same as renderer format, it still needs an
intermediate conversion to transform colorkey to alpha.
|
|
be991f3a
|
2019-01-12T13:34:03
|
|
Fixed bug 4453 - GLES / GLES2: first white renderer clear cmd is drawn as black
|
|
5e13087b
|
2019-01-04T22:01:14
|
|
Updated copyright for 2019
|
|
9cdd0dd9
|
2018-12-29T17:59:34
|
|
PSP renderer: use colors from 'draw' union (very likely, but un-tested)
|
|
ebd9efb3
|
2018-12-29T16:37:44
|
|
opengles 1: same fix as in bug #4433
|
|
87b76369
|
2018-12-29T16:34:50
|
|
opengles 1: use color from 'draw' union in SetDrawState()
|
|
dc344360
|
2018-12-21T20:53:31
|
|
render: Fix internal state getting out of sync when destroying a texture that was just rendered and then creating a new one, in the GL and GLES2 backends. Fixes bug #4433.
|
|
0a705901
|
2018-12-19T18:10:02
|
|
render: Prefer the Metal renderer over OpenGL.
This is the best option for macOS and iOS, the only platforms with Metal.
Pre-Metal versions of these platforms will fall back to OpenGL (ES), as
appropriate.
Huge thanks to Alexander Szpakowski, who worked incredibly hard to get the
Metal renderer to such a high-quality state!
|
|
c7db6ade
|
2018-12-19T18:27:21
|
|
metal: Implement SDL_LockTexture for YUV formats.
|
|
ce8c716a
|
2018-12-18T14:23:05
|
|
metal: Implement SDL_LockTexture for non-YUV textures.
|
|
e5476c65
|
2018-12-15T14:50:12
|
|
Fixed bug 4425 - promote to alpha format, palette surface with alpha values.
SDL_CreateTextureFromSurface() forgets to choose a texture format with alpha for
surfaces that have palettes with alpha values.
|
|
39ec1699
|
2018-12-06T10:24:44
|
|
opengles2: fix prototype of glDeleteBuffers
|
|
252dc85e
|
2018-12-06T09:22:00
|
|
Fix warnings detected on Android build
|
|
6259a726
|
2018-12-05T16:13:12
|
|
Warnings: fix a documentation warning and missing prototypes
|
|
cca9d24c
|
2018-12-03T09:26:05
|
|
direct3d: be more aggressive about resetting invalidated cached state.
Fixes Bugzilla #4402.
|
|
939bf1c4
|
2018-12-03T02:06:17
|
|
render: fix some static analysis warnings.
|
|
33f78eb1
|
2018-12-03T01:58:23
|
|
direct3d: Make sure streaming textures update before being used for drawing.
Fixes Bugzilla #4402.
|
|
b744108a
|
2018-12-02T21:57:33
|
|
Patched to compile on C89 compilers.
|
|
3c936150
|
2018-12-02T20:55:57
|
|
direct3d: Release and NULL out vertex buffers on reset.
Otherwise they are irretrievably lost on window resize, etc, which makes
rendering freeze and other disasters.
Fixes Bugzilla #4358.
|
|
37b1f989
|
2018-11-25T22:13:09
|
|
metal: use a staging texture in SDL_UpdateTexture, to make sure it doesn't stomp texture data being drawn in a previous frame on the GPU.
|
|
872936a4
|
2018-11-21T23:46:37
|
|
metal: Fix an incorrect division.
|
|
4a58722b
|
2018-11-21T23:37:23
|
|
metal: SDL_RenderFillRects uses one draw call per 16k rectangles (within the given FillRects call), instead of one draw call per rectangle. Reduces CPU usage when drawing many rectangles.
|
|
457e58c4
|
2018-11-17T16:24:52
|
|
opengles: Fixed compiler warnings.
|
|
9719f89d
|
2018-11-17T12:12:29
|
|
Back out change initializing renderer blend mode incorrectly.
|
|
fde7592a
|
2018-11-17T14:39:42
|
|
direct3d11: Fixed missing rendering of solid primitives.
Fixes Bugzilla #4388.
|
|
782f1685
|
2018-11-17T14:37:51
|
|
Fixed a few compiler warnings.
|
|
29e15ce6
|
2018-11-17T00:58:45
|
|
The default draw blendmode is SDL_BLENDMODE_NONE
|
|
9262c0de
|
2018-11-14T22:38:58
|
|
software: fix blits with color mods that change during a command queue run.
|
|
244b79e1
|
2018-11-04T14:31:56
|
|
metal: SDL_RenderReadPixels on macOS synchronizes the render target's texture data if it's managed, before reading from it.
|
|
c9fed272
|
2018-11-04T12:31:02
|
|
metal: fix the SDL_RENDERER_PRESENTVSYNC flag not being set on the renderer info on macOS, when vsync is used.
|