Sam Lantinga
54adba6a31
If the viewport changes the cliprect should be updated
...
The clip rectangle is defined to be viewport relative, so if the viewport changes we need to update it.
Fixes https://github.com/libsdl-org/SDL/issues/9094
(cherry picked from commit d0af01e7d4 )
(cherry picked from commit 05f6709617 )
2024-03-03 11:13:04 -08:00
Ozkan Sezer
9bed177f10
Check the SDL_VIDEO_RENDER_??? macros with #if instead of #ifdef
...
Allows users to disable them by defining them as 0.
Closes https://github.com/libsdl-org/SDL/issues/8996
(cherry picked from commit d0731ab9a3 )
2024-02-15 22:51:37 +03:00
Francisco Javier Trujillo Mata
5a492e8196
Fixing viewport
...
(cherry picked from commit d34a7c5ed2 )
2024-01-29 20:44:07 -08:00
Francisco Javier Trujillo Mata
80cb52c944
Fix scissor usage
...
(cherry picked from commit 36b8438280 )
2024-01-29 20:44:07 -08:00
Francisco Javier Trujillo Mata
4436c09c9d
Fix color
...
(cherry picked from commit faa8fc2917 )
2024-01-29 20:44:07 -08:00
Sam Lantinga
0fc3574464
Updated copyright for 2024
2024-01-01 13:19:49 -08:00
Anonymous Maarten
d81d986858
cmake: fix uses of undefined macro identifiers (-Wundef)
2023-11-17 03:06:26 +00:00
Sylvain Becker
a14b948b6c
[SDL2] pointer boolean ( #8523 )
2023-11-10 06:30:56 -08:00
Sam Lantinga
0d76380042
Code style: changed "sizeof foo" to "sizeof(foo)" (thanks @sezero!)
...
(cherry picked from commit c6443d86c9 )
2023-03-09 15:23:59 -08:00
Francisco Javier Trujillo Mata
32fd45cf48
Using UV instead of STQ
2023-01-11 15:12:14 -08:00
Sam Lantinga
0479df53ca
Updated copyright for 2023
2023-01-09 09:48:21 -08:00
Sam Lantinga
b8d85c6939
Update for SDL3 coding style ( #6717 )
...
I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base.
In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted.
The script I ran for the src directory is added as build-scripts/clang-format-src.sh
This fixes:
#6592
#6593
#6594
(cherry picked from commit 5750bcb174 )
2022-11-30 12:57:41 -08:00
Sylvain Becker
fb0ce375f0
Cleanup add brace ( #6545 )
...
* Add braces after if conditions
* More add braces after if conditions
* Add braces after while() conditions
* Fix compilation because of macro being modified
* Add braces to for loop
* Add braces after if/goto
* Move comments up
* Remove extra () in the 'return ...;' statements
* More remove extra () in the 'return ...;' statements
* More remove extra () in the 'return ...;' statements after merge
* Fix inconsistent patterns are xxx == NULL vs !xxx
* More "{}" for "if() break;" and "if() continue;"
* More "{}" after if() short statement
* More "{}" after "if () return;" statement
* More fix inconsistent patterns are xxx == NULL vs !xxx
* Revert some modificaion on SDL_RLEaccel.c
* SDL_RLEaccel: no short statement
* Cleanup 'if' where the bracket is in a new line
* Cleanup 'while' where the bracket is in a new line
* Cleanup 'for' where the bracket is in a new line
* Cleanup 'else' where the bracket is in a new line
(cherry picked from commit 6a2200823c to reduce conflicts merging between SDL2 and SDL3)
2022-11-28 12:33:03 -08:00
Sylvain
ce5da5d579
Don't compare pointer against '0', but NULL
2022-11-16 21:47:43 +01:00
Francisco Javier Trujillo Mata
a8f019b1f0
Using ST and removing warnings
2022-10-28 11:42:44 -07:00
Francisco Javier Trujillo Mata
f2ebedae92
adding texture function
2022-10-28 11:42:44 -07:00
Francisco Javier Trujillo Mata
5de01eb0aa
Make render to use new functions
2022-10-28 11:42:44 -07:00
Pierre Wendling
8117bfe5d1
PS2: Ignore warnings from toolchain headers.
...
The `gsInline.h` header creates `Wdeclaration-after-statement` warnings.
2022-10-10 22:31:16 -07:00
Sam Lantinga
d744aafb05
Added support for simulated vsync in the renderer
...
This kicks in if the platform doesn't support vsync directly, or if the present fails for some reason (e.g. minimized on some platforms)
Fixes https://github.com/libsdl-org/SDL/issues/5134
2022-09-16 07:44:40 -07:00
Francisco Javier Trujillo Mata
f1e4685806
Adding specific SDL_Hint for the dynamic VSYNC
2022-08-30 07:20:36 -04:00
Francisco Javier Trujillo Mata
7d5ccae22d
Fix memory leak when destroying texture
2022-08-14 08:13:37 -04:00
Francisco Javier Trujillo Mata
20f9a1b8a4
Implement SetTextureScaleMode
2022-08-08 09:34:08 -07:00
Francisco Javier Trujillo Mata
fbb440d167
Invalidate texture in the UnlockTextureMethod
2022-08-06 12:11:34 -07:00
Francisco Javier Trujillo Mata
944111dbcf
Cleaning up video driver
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
83c1179744
Adding SetViewPortCommand
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
a9f4cda3f9
Adding setcliprect command
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
fb1a205e70
Implement blend modes
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
075f9016fa
Remove some unnecessary comments
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
ed301b123b
Updating supported format
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
1d1965b6ee
Removing the BGR_888 from texture supported
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
f75c35c071
Add invalidate texture when it changes
2022-08-02 11:40:31 -07:00
Daniel Santos
5bb965be3d
Implement RenderLines
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
0f0e5b44dc
Increase size of pool for gsKit events
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
f758cad81a
Remove non needed FillRects function
2022-08-02 11:40:31 -07:00
Daniel Santos
3cb124b98e
Implement RenderPoints
2022-08-02 11:40:31 -07:00
Daniel Santos
df6ebc2562
Implement FillRect
2022-08-02 11:40:31 -07:00
Daniel Santos
a152e467b1
Fix "implicit declaration" with memalign
2022-08-02 11:40:31 -07:00
Daniel Santos
33cbf9acbe
Fix some mixed declaration warnings
2022-08-02 11:40:31 -07:00
Daniel Santos
acf48f14ac
Vertex pointer revision
...
Now triangles are fully working
2022-08-02 11:40:31 -07:00
Daniel Santos
726180445e
Add textured triangle prim
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
2a70d492f0
Destroy texture properly
2022-08-02 11:40:31 -07:00
Daniel Santos
7b0486d490
Try triangles
2022-08-02 11:40:31 -07:00
Daniel Santos
d5305ee098
Do properly color assign
2022-08-02 11:40:31 -07:00
Daniel Santos
b48c74a316
Add GeometryQueue
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
3bfc8f554e
Removing some of the QueueCopy functions because they are legacy
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
be1219bd4e
Implement setDrawColor
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
f1699ce735
Implementing Clear command and texture Update
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
c472b8dd45
Whole clean around render and video driver
2022-08-02 11:40:31 -07:00
Daniel Santos
cdf89fde91
Add triangle prim support
...
Improve line support
Add initial texture support
2022-08-02 11:40:31 -07:00
Francisco Javier Trujillo Mata
88e64f9ae1
Add natively supported colors
2022-08-02 11:40:31 -07:00