Commit Graph

7777 Commits (a8f89a01aaec3c65e6e3587d48c484f5c6e4255f)

Author SHA1 Message Date
Sylvain a8f89a01aa Change 'size_indice' to 'size_indices' 2021-08-19 00:10:59 +02:00
Sylvain bc2173baf9 Add testgeometry to draw a non uniform triangle
--use-texture: an option to load icon.bmp as a texture
handle mouse motion: rotate the triangle
2021-08-19 00:10:59 +02:00
Sylvain 53bcb3e0e9 Add an option to 'testsprite2' to render slicing into triangles.
[--use-rendergeometry mode1|mode2]
mode1: Draw sprite2 as triangles that can be recombined as rect by software renderer
mode2: Draw sprite2 as triangles that can *not* be recombined as rect by software renderer
       Use an 'indices' array
2021-08-19 00:10:59 +02:00
Sylvain 47db47c1cc Add SDL_HAVE_RENDER_GEOMETRY to compile or not with RenderGeometry support 2021-08-19 00:10:59 +02:00
Sylvain b9bd9da78f OpenGLES2: transfert color as 4 bytes, instead of 4 floats 2021-08-19 00:10:59 +02:00
Sylvain Becker c6ceaaeb4b METAL: use Uchar4Normalized format to transfert color as 4 bytes, instead of 4 floats 2021-08-19 00:10:59 +02:00
Sylvain Becker fd236af8eb Update Xcode project to add SDL_triangle.{c,h} 2021-08-19 00:10:59 +02:00
Sylvain eff840bb9b Add OpenGLES implementation 2021-08-19 00:10:59 +02:00
Sylvain 32e7910135 Fix warnings 2021-08-19 00:10:59 +02:00
Sylvain 6e47f53869 Fix warnings 2021-08-19 00:10:59 +02:00
Sylvain 4869a3d294 Add Direct3D9 implementation (not tested) 2021-08-19 00:10:59 +02:00
Sylvain 4ba3763897 Save and restore SDL renderer state after transforming triangles to rect 2021-08-19 00:10:59 +02:00
Sylvain cd0663e053 Fix declaration-after-statement and remove tabs 2021-08-19 00:10:59 +02:00
Sylvain Becker cd4663dfcb Update D3D11 for SDL_RenderGeometryRaw 2021-08-19 00:10:59 +02:00
Sylvain Becker 9f59170743 Update METAL backend for SDL_RenderGeometryRaw 2021-08-19 00:10:59 +02:00
Sylvain 61d9e9164f For the software renderer, try to reinterpret triangles as SDL_Rect
With Dear ImGui + software renderer, it draws:
- by default at 250 fps
- drops to 70 fps if you show the color picker
- drops to 10 fps if put the color picker fullscreen
2021-08-19 00:10:59 +02:00
Sylvain cc37c38e30 Add SDL_RenderGeometry based on SDL_RenderGeometryRaw 2021-08-19 00:10:59 +02:00
Sylvain e481261173 Move to SDL_RenderGeometryRaw prototype with separate xy/uv/color pointer parameters 2021-08-19 00:10:59 +02:00
Sylvain 111c70e141 Use 64 bits precision to prevent overflow when interpolating color / texture with wide triangles 2021-08-19 00:10:59 +02:00
Sylvain f73c1eff10 Use normalized texture coordinates 2021-08-19 00:10:59 +02:00
Sylvain 5828cc415a Update METAL backend: fix a typo in drawline 2021-08-19 00:10:59 +02:00
Sylvain 9eab5195fe Update dynapi files 2021-08-19 00:10:59 +02:00
Sylvain Becker 9a8a8e65b8 Update SDL_render_d3d11.c
Fix D3D11 compilation
2021-08-19 00:10:59 +02:00
Sylvain a2cd4255c9 Update VisualC projects 2021-08-19 00:10:59 +02:00
Sylvain 55277c67bb Update Makefiles OS2 and PSP 2021-08-19 00:10:59 +02:00
Sylvain Becker 121114d061 Update METAL compiled shaders 2021-08-19 00:10:59 +02:00
Sylvain Becker 2d01573bb9 Add METAL shaders 2021-08-19 00:10:59 +02:00
Sylvain Becker 1e77dae7b7 Add METAL implementation 2021-08-19 00:10:59 +02:00
Sylvain 1ebef0732a Add D3D11 implementation (not yet tested) 2021-08-19 00:10:59 +02:00
Sylvain 3ee511d71c Add software renderer implementation 2021-08-19 00:10:59 +02:00
Sylvain 37f78fc1cc Add OpenGL implementation 2021-08-19 00:10:59 +02:00
Sylvain faded41ab1 Add OpenGLES2 implementation 2021-08-19 00:10:59 +02:00
Sylvain 6e26d320c6 Add sysrender interface 2021-08-19 00:10:59 +02:00
Sylvain f22fc4ca35 Add API: SDL_Vertex type and SDL_RenderGeometry 2021-08-19 00:10:59 +02:00
Sylvain 53a2608bd2 Renderer opengles2: turn color Uniform into Attribute.
all attributes are copied interleaved (based on rmg-nik initial patch+
+ minor clean up of data structure
+ add check for colorswap
2021-08-19 00:10:59 +02:00
Oschowa bfa159313b audio: pipewire: Set PW_KEY_NODE_RATE to suggest a rate.
This can be used by recent pipewire to avoid resampling.
2021-08-18 12:40:13 -04:00
e bfbab53660 remove warnings from Wundef in SDL_config.h.cmake 2021-08-17 10:00:50 +03:00
YuGiOhJCJ 966728db2a include/SDL_video.h: Remove a comma at end of enumerator list 2021-08-17 10:00:28 +03:00
Zack Middleton 83bb136619 Restore KMOD_RESERVED for backward compatibility
Some applications check for KMOD_RESERVED but it was replaced with
KMOD_SCROLL in cb1e20b058.
2021-08-17 10:00:14 +03:00
Charlie Birks b161c9ba44 CI: Add Emscripten build 2021-08-17 10:00:00 +03:00
Aleksey Rybalkin 402b86f2a8 waylandevents: prevent segfault if xkb compose table is not found
this can happen e.g. on pure wayland system where there is no X11
locales for xkbcommon to find.
2021-08-15 10:11:19 -04:00
Brick 72f41d1fb1 Added missing parenthesis around SDL_clamp 2021-08-14 17:24:33 -07:00
Jānis Rūcis 454943cf3e emscripten: Don't flag window fullscreen on external requests
Also, the condition was always true.
2021-08-14 17:04:46 +01:00
Joseph Kogut 55af8dcad9 emscripten: use emscripten_set_window_title api 2021-08-14 17:04:46 +01:00
Joseph Kogut d8baad7e48 emscripten: use emscripten_get_screen_size api 2021-08-14 17:04:46 +01:00
Charlie Birks abc04270b7 emscripten: Fix framebuffer array creation optimisation 2021-08-14 17:04:46 +01:00
Charlie Birks b4f11a3669 emscripten: Drop commented out code from the dummy driver 2021-08-14 17:04:46 +01:00
Charlie Birks 0a87075662 Update SDL_config_emscripten.h for upstream 2021-08-14 17:04:46 +01:00
Sam Clegg d448896234 Add SDL_config_emscripten.h
Currently we maintain a config file in the emscripten
repo, but this seems like what other embedded/cross
platforms do.
2021-08-14 17:04:46 +01:00
David Gow fbc364908a Use the new SDL_clamp() macro where sensible
There were a few places throughout the SDL code where values were
clamped using SDL_min() and SDL_max(). Now that we have an SDL_clamp()
macro, use this instead.
2021-08-14 09:01:14 -07:00