Commit graph

93 commits

Author SHA1 Message Date
SDL Wiki Bot
c168ccc3c3 Sync SDL3 wiki -> header 2024-05-27 02:00:01 +00:00
Sam Lantinga
6f2621438a Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:09:09 -07:00
Sam Lantinga
7cddde32ac Removed SDL_SWSURFACE, added unsigned suffix for surface flags 2024-05-16 11:40:38 -07:00
Ryan C. Gordon
241cfaf38f
surface: Make a typedef for SDL_Surface bitflags, as is SDL3 policy.
Reference Issue #9812.
2024-05-16 12:29:58 -04:00
Ryan C. Gordon
665ff8c5f6
include: Removed :: from symbol names in comments.
This isn't C++ code, so there's no need to append global symbols with two
colons. It looks ugly.

I _did_ leave them for actual C++ things in WinRT-specific comments and other
places, like a reference to a Perl class thing.

Also, even though it's not valid C, it's a useful expression to say
`StructType::SpecificField`, so I left those alone, too.
2024-05-16 12:16:57 -04:00
Ryan C. Gordon
5e6d85b8f0
wikiheaders: bridge wiki Category docs to the headers!
Did an initial cleanup on the headers and wrote a few pieces of documentation,
but this needs more work to fill out the documentation.
2024-05-16 11:48:23 -04:00
Ryan C. Gordon
5dc207b3b6
include: Fix a preformatted piece of documentation that isn't C code. 2024-05-05 01:22:46 -04:00
Ryan C. Gordon
a790a67883
include: Filling in more documentation gaps. 2024-05-03 13:19:26 -04:00
Ryan C. Gordon
3473cef7df
surface: SDL_blit is not used in the public API, remove it from headers. 2024-05-03 12:57:09 -04:00
Erik Scholz
c623bd2fdc reword SDL_BlitSurfaceScaled param
so it will link to the type in the docs/wiki
2024-04-20 07:51:40 -07:00
Ryan C. Gordon
0df988389c
include: Add \since to all documentation that was missing it. 2024-04-11 13:34:29 -04:00
Henry Wilson
629c694bd6 Fixed Doxygen comments
Added '*' to the start of Doxygen comments for SDL_FlipSurface and SDL_DuplicateSurface so they highlight properly in IDEs
2024-04-09 12:30:13 -04:00
Ryan C. Gordon
e044318a8e
Sync SDL3 wiki -> headers 2024-04-09 00:50:03 -04:00
Ryan C. Gordon
ad090d2444
include: A ton of little documentation tweaks, fixes, and improvements.
This is just stuff I noticed while working on the wikiheaders updates. A
thorough pass over all the docs would not be terrible, and maybe a simple
script to check for consistency (does everything have a `\since` on it? etc)
might be nice, too.
2024-04-09 00:50:02 -04:00
Petar Popovic
3f8dba3713 Including SD_error.h into headers with error-returning functions 2024-04-04 11:12:58 -07:00
SDL Wiki Bot
e7b9f75e62 Sync SDL3 wiki -> header 2024-03-17 19:29:22 +00:00
Sam Lantinga
d8a54cd4f8 Updated "see also" references to be more consistent
Fixes https://github.com/libsdl-org/SDL/issues/9282
2024-03-17 12:28:11 -07:00
Ryan C. Gordon
5a21d87e69
rwops: Changed filenames that reference "rwops" to "iostream". 2024-03-14 23:30:59 -04:00
Ryan C. Gordon
6776b6108a
iostream: "free*" params should be "closeio". 2024-03-14 23:14:46 -04:00
Ryan C. Gordon
fc7afa9cbf
rwops: Renamed SDL_RWops to SDL_IOStream, and other related symbols. 2024-03-14 19:38:12 -04:00
Ryan C. Gordon
655ceb3b31
rwops: Renamed SDL_CreateRW and SDL_DestroyRW to SDL_OpenRW and SDL_CloseRW. 2024-03-14 19:37:01 -04:00
Ryan C. Gordon
525919b315
rwops: Reworked RWops for SDL3.
- SDL_RWops is now an opaque struct.
- SDL_AllocRW is gone. If an app is creating a custom RWops, they pass the
  function pointers to SDL_CreateRW(), which are stored internally.
- SDL_RWclose is gone, there is only SDL_DestroyRW(), which calls the
  implementation's `->close` method before freeing other things.
- There is only one path to create and use RWops now, so we don't have to
  worry about whether `->close` will call SDL_DestroyRW, or if this will
  risk any Properties not being released, etc.
- SDL_RWFrom* still works as expected, for getting a RWops without having
  to supply your own implementation. Objects from these functions are also
  destroyed with SDL_DestroyRW.
- Lots of other cleanup and SDL3ization of the library code.
2024-03-14 19:36:08 -04:00
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