Sam Lantinga
fde420a645
Revert "Added SDL_FLIP_DIAGONAL"
...
This reverts commit b9ab326982
.
@rainerdeyke pointed out:
"This commit is incorrect. Flipping both horizontally and vertically is not equivalent to flipping diagonally."
2024-03-10 15:20:36 -07:00
RPP-dev
b9ab326982
Added SDL_FLIP_DIAGONAL
...
Since SDL_RenderFlip is an enum, SDL_FLIP_HORIZONTAL and SDL_FLIP_VERTICAL can not be OR'ed to get the "SDL_FLIP_DIAGONAL".
Render code is actually able to perform these 3 kind of "flipping" so I just added a new enum called SDL_FLIP_DIAGONAL with the OR'ed value (3) so it can be used.
2024-03-10 09:27:14 -07:00
Sam Lantinga
37d066b99b
Clarify what pitch means (thanks @zlago!)
2024-03-10 09:02:59 -07:00
Susko3
424616e032
Use SDL_PixelFormatEnum as type
2024-03-06 15:02:13 -08:00
SDL Wiki Bot
27389716ac
Sync SDL3 wiki -> header
2024-03-02 23:05:24 +00:00
Sam Lantinga
7f9ff6277c
Don't assume HDR headroom for HDR10 surfaces
...
Applications that support HDR will set the correct values for their content.
2024-03-02 15:02:17 -08:00
SDL Wiki Bot
8c015cd3b6
Sync SDL3 wiki -> header
2024-03-02 18:02:26 +00:00
Sam Lantinga
8d023f9869
Updated documentation for new property parameters
2024-03-02 09:56:29 -08:00
SDL Wiki Bot
2132ba8985
Sync SDL3 wiki -> header
2024-02-22 03:26:22 +00:00
Sam Lantinga
54c2ba6afd
Added the Chrome HDR tonemap operator
...
Also added support for the SDL_PIXELFORMAT_XBGR2101010 pixel format to the D3D12, D3D11, and Metal renderers.
2024-02-21 19:25:49 -08:00
Sam Lantinga
4ba6aeee9d
A second take on HDR support with an SDR white point and HDR headroom
...
This better reflects how HDR content is actually used, e.g. most content is in the SDR range, with specular highlights and bright details beyond the SDR range, in the HDR headroom.
This more closely matches how HDR is handled on Apple platforms, as EDR.
This also greatly simplifies application code which no longer has to think about color scaling. SDR content is rendered at the appropriate brightness automatically, and HDR content is scaled to the correct range for the display HDR headroom.
2024-02-21 19:25:49 -08:00
Sam Lantinga
50a805cdd1
Use YUV colorspaces instead of a global YUV conversion mode
...
Fixes https://github.com/libsdl-org/SDL/issues/8669
2024-02-03 07:36:18 -08:00
Sam Lantinga
25fd5da1a7
Removed maxCLL and maxFALL properties, moved them to SDL_image for HDR image loading
2024-02-02 15:13:09 -08:00
SDL Wiki Bot
dcfb069c75
Sync SDL3 wiki -> header
2024-02-01 20:18:29 +00:00
Sam Lantinga
19dde63e7c
Added a simple linear scale for tonemapped HDR to SDR surface conversion
2024-02-01 12:17:35 -08:00
SDL Wiki Bot
a4969e393e
Sync SDL3 wiki -> header
2024-02-01 02:08:27 +00:00
Sam Lantinga
6f443e2aca
Added support for the scRGB colorspace on D3D11 and D3D12
2024-01-31 18:07:00 -08:00
SDL Wiki Bot
7fbd85ad5c
Sync SDL3 wiki -> header
2024-01-29 02:25:21 +00:00
Sam Lantinga
61b5c38e6e
Added the initial concept of colorspace to SDL
2024-01-28 18:24:39 -08:00
SDL Wiki Bot
aba3038353
Sync SDL3 wiki -> header
2024-01-27 21:01:19 +00:00
Sam Lantinga
3b55c7d1f4
Shortened SDL property names
2024-01-27 13:00:50 -08:00
Sam Lantinga
8fe257b541
Added support for other HDR color primaries
...
Specifically, SDL_COLOR_PRIMARIES_XYZ, SDL_COLOR_PRIMARIES_SMPTE431, and SDL_COLOR_PRIMARIES_SMPTE432
2024-01-23 20:35:29 -08:00
SDL Wiki Bot
ceccf24519
Sync SDL3 wiki -> header
2024-01-24 01:20:29 +00:00
Sam Lantinga
7cd914593f
Added HDR surface properties and tone mapping from HDR to SDR
...
This currently only supports PQ, but can be expanded in the future
2024-01-23 17:19:41 -08:00
Sam Lantinga
308906ba25
Added SDL_FlipSurface() to flip a surface vertically or horizontally
...
Fixes https://github.com/libsdl-org/SDL/issues/8857
2024-01-20 06:31:37 -08:00
SDL Wiki Bot
bc3a71d400
Sync SDL3 wiki -> header
2024-01-18 15:01:21 +00:00
Sam Lantinga
f8dfee01bb
Made SDL_ReadSurfacePixel a public function
...
Fixes https://github.com/libsdl-org/SDL/issues/8320
2024-01-18 07:00:10 -08:00
Sam Lantinga
5b3ee51c6c
Updated copyright for 2024
2024-01-01 13:15:26 -08:00
Sam Lantinga
d71454da17
Store the surface properties in the reserved pointer of a surface
...
This prevents us from exposing the properties publicly and allows us to repurpose the pointer later if necessary.
Fixes https://github.com/libsdl-org/SDL/issues/8758
2023-12-29 08:17:06 -08:00
SDL Wiki Bot
07e9603398
Sync SDL3 wiki -> header
2023-12-22 17:14:22 +00:00
Sylvain
ffd82fb7c4
Add scaleMode to SDL_SoftStretch(), remove SDL_SoftStretchLinear().
2023-12-22 09:13:21 -08:00
Sylvain
5dba04b29b
Remove SDL_{Set,Get}SurfaceScale().
...
Add Scale parameter to SDL_BlitSurfaceScaled() and SDL_BlitSurfaceScaledUnchecked()
(see #8732 )
2023-12-22 02:08:49 -08:00
Sam Lantinga
2ad50e9675
Make the SDL3 surface ABI compatible with SDL2
...
We'll use properties for new data associated with a surface, which lets us preserve ABI compatibility with SDL2 and any surfaces created by applications and passed in to SDL functions.
2023-12-21 06:58:22 -08:00
Sylvain
a4496f7dcf
Update doc: SDL_SoftStretch() and SDL_SoftStretchLinear() #8667
2023-12-18 06:35:52 -08:00
Sylvain
84a0d5f623
Added SDL_SetSurfaceScaleMode() and SDL_GetSurfaceScaleMode() to control scale mode using SDL_BlitSurfaceScaled()
2023-12-17 15:39:53 -08:00
Ryan C. Gordon
c53843a961
docs: Remove Doxygen `\brief` tags.
...
Doxygen and the wiki bridge don't need them; they'll both just use the first
line/sentence instead.
Fixes #8446 .
2023-11-06 10:26:06 -05:00
Ryan C. Gordon
ac71831350
Sync wiki -> headers
2023-10-12 15:20:53 -04:00
Sam Lantinga
4368f70ff9
Added properties to various SDL objects
...
The following objects now have properties that can be user modified:
* SDL_AudioStream
* SDL_Gamepad
* SDL_Joystick
* SDL_RWops
* SDL_Renderer
* SDL_Sensor
* SDL_Surface
* SDL_Texture
* SDL_Window
2023-10-11 22:38:00 -07:00
Simon McVittie
d88bf687a8
surface: Document the in-memory layout of the pixels
...
I don't think we ever explicitly said this.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-10-10 03:24:43 -07:00
SDL Wiki Bot
544351c98e
Sync SDL3 wiki -> header
2023-09-05 21:19:16 +00:00
Sam Lantinga
2e7d2b94eb
Clarify that SDL_BlitSurface() ignores the width and height in dstrect
2023-09-05 14:18:43 -07:00
Sam Lantinga
b903ccf945
SDL_rwops read/write functions return size_t again
...
The current status is stored in the SDL_rwops 'status' field to be able to determine whether a 0 return value is caused by end of file, an error, or a non-blocking source not being ready.
The functions to read sized datatypes now return SDL_bool so you can detect read errors.
Fixes https://github.com/libsdl-org/SDL/issues/6729
2023-08-07 20:36:21 -07:00
SDL Wiki Bot
d086d9874d
Sync SDL3 wiki -> header
2023-07-27 13:36:07 +00:00
SDL Wiki Bot
ad0c0d3cde
Sync SDL3 wiki -> header
2023-07-26 17:17:06 +00:00
SDL Wiki Bot
550c84b4df
Sync SDL3 wiki -> header
2023-07-09 20:50:16 +00:00
Sam Lantinga
bea99d48f2
Changed 'freesrc' parameter from int to SDL_bool
2023-07-09 13:49:04 -07:00
SDL Wiki Bot
b8d6023a91
Sync SDL3 wiki -> header
2023-07-03 01:49:13 +00:00
Sam Lantinga
3c04be4486
The rectangles passed to SDL_BlitSurfaceUnchecked() and SDL_BlitSurfaceUncheckedScaled() are const.
...
The destination rectangle passed to SDL_BlitSurface() and SDL_BlitSurfaceScaled() is non-const and filled in with the final destination rectangle after clipping, and now documented as such.
Fixes https://github.com/libsdl-org/SDL/issues/7911
2023-07-02 18:45:11 -07:00
Sam Lantinga
ced153a24a
Fixed reference to old function (thanks @tom-seddon!)
...
Fixes https://github.com/libsdl-org/SDL/issues/7912
2023-07-02 18:24:53 -07:00
Sam Lantinga
50b6e5eb7e
Implemented SDL_LoadBMP() and SDL_SaveBMP() as functions
...
Fixes https://github.com/libsdl-org/SDL/issues/7902
2023-07-02 00:00:06 -07:00