src/render


Log

Author Commit Date CI Message
Ozkan Sezer 960b86dc 2022-06-14T01:56:40 update SDL_render_d3d12.c after DPI scaling/highdpi support patch. See https://github.com/libsdl-org/SDL/pull/5778#issuecomment-1153006938
Ryan C. Gordon ded6c22e 2022-06-14T14:09:13 render: Corrected wrong SDL_memcpy() sizes for viewport, cliprect. Fixes #5786.
Eric Wasylishen e09551bc 2022-06-09T02:22:21 Fix WinRT build
Eric Wasylishen ab81a559 2022-06-07T02:01:27 Windows DPI scaling/highdpi support Adds hint "SDL_WINDOWS_DPI_SCALING" which can be set to "1" to change the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere. This means windows will be appropriately sized, even when created on high-DPI displays with scaling. e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings, will create a window with an 800x600 client area (in pixels). Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary), and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows.
chalonverse 6f69bbc5 2022-06-08T12:38:43 D3D11: Fix SDL_TEXTUREACCESS_TARGET not working if SDL_HAVE_YUV was 0 Added a couple of missing SDL_zeros in CreateTexture
chalonverse 8303c5d0 2022-06-08T12:37:36 Added missing SDL_zero for renderTargetViewDesc
chalonverse 7a335df9 2022-06-07T16:11:25 Updated CMakeLists.txt and configure.asc/script so that it checks for the required Windows SDK version before it enables the d3d12 renderer. Also fixed reported warnings in some builds.
Sylvain 2cc22604 2022-06-07T16:30:01 Fixed bug #5768 - SDL_RenderGeometry's software backend failed to render when texture coordinates are reversed handle flip vertical/horizontal when reconstructing rects from triangles
chalonverse 40828218 2022-06-06T17:42:30 DirectX 12 Renderer (#5761) * DirectX 12 Renderer (27 squashed commits) * Add missing SDL_hidapi.h of merge of SDL.vcxproj.filters * Fixed OpenWatcom build failure * Dynapi fix Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
Sam Lantinga ae2cc29f 2022-06-03T09:44:34 Make sure initial state is set correctly for the D3D renderer Fixes https://github.com/libsdl-org/SDL/issues/5749
Cameron Cawley 9dfa000b 2022-05-18T20:20:03 Initial support for building for Windows with OpenWatcom
Cameron Cawley c8eea020 2022-05-18T21:14:20 Fix C89 build errors in Windows builds
Alex Szpakowski ec8fa577 2022-05-07T21:57:23 macOS: always use Objective-C ARC (automatic ref counting). Change Cocoa SDL_VideoData and SDL_WindowData implementations from C structs to Objective-C objects, since bridging between C and ObjC is easier that way.
Eddy Jansson 9e5cbf03 2022-04-29T22:36:12 Disallow non-positive allocation. Ensure that we're not trying to call SDL_small_alloc() with a count of zero. Transforming the code like this fixes a -Wmaybe-uninitialized warning from GCC 12.0.1
Eddy Jansson 6c2928b4 2022-04-29T19:30:47 Switch uses of MIN() to SDL_min() We're excluding files in src/hidapi to minimize the diff against the upstream project.
Sam Lantinga 981e1e3c 2022-04-23T10:32:40 Fixed logical size synchronization issue on macOS https://discourse.libsdl.org/t/sdl-2-0-22-prerelease/35306/6
Jaylon Gowie d9009388 2022-04-19T14:55:58 SceKernelMemBlockType to unsigned int
Jaylon Gowie 3753a7b1 2022-04-19T14:42:39 Fix recent changes in VitaSDK
Sam Lantinga b9fe6ba0 2022-04-18T13:08:04 Fixed compile warnings
Sylvain 1ede941f 2022-04-18T21:09:48 SDL_render.c: internally change viewport/cliprect type from SDL_FRect to SDL_DRect (double precision). (see bug #5547)
pionere 0adb6701 2022-04-12T09:01:17 avoid NullPointer in SDL_GetRenderTarget
Ethan Lee ba0ba9ef 2022-04-08T01:20:36 direct3d11: Set the swapchain target immediately after creating it. Fixes #4782
Ethan Lee cb816308 2022-04-08T02:21:52 render: Update the size/scale/viewport on moves, in addition to resizes. For OpenGL this means resetting the viewport state shadowing flag too. Fixes #1504
Cameron Cawley 57118fb7 2022-04-02T13:49:50 render: Fix setting the scale mode for non-native textures
Ivan Epifanov 95c0fec5 2022-03-31T12:35:17 Vita: PVROGL: fix indentation and ifdef guards
Jaylon Gowie 8c542a35 2022-03-29T19:08:56 Desktop OpenGL 1.X/2.X PSVita Support
Mathieu Eyraud 1db47d46 2022-03-28T15:39:13 Fix potential memory leak in QueueCmdFillRects
Ivan Epifanov 95ed8313 2022-03-25T15:22:10 Vita: Use preallocated memory pool for textures
Ryan C. Gordon 7bc498d3 2022-03-27T09:12:12 direct3d: Implement missing blend operations. This is only for Direct3D 9; Direct3D 11 already had this implemented. Fixes #5375.
Ivan Epifanov 69d0b6e3 2022-03-25T15:18:39 Vita: Fix NULL-pointer dereference
Ryan C. Gordon 4fe7b2cb 2022-03-24T11:00:43 static analysis: Fixed several complaints from codechecker. There are still some pending Objective-C specific issues. Reference issue #4600.
Ivan Epifanov eadc064e 2022-03-23T19:14:28 Vita: add native YUV textures support. * Fail if texture init fails. * Refactor and cleanup.
Sylvain Becker c23a7ad3 2022-03-23T17:07:56 Add SDL_RenderGetWindow() API to get the window associated with a renderer (#5440) Add SDL_RenderGetWindow() API to get the window associated with a renderer
Sylvain 83df4a35 2022-03-22T15:25:01 SDL_render.c: remove unsused case, since renderer target has been forced to NULL previously (see bug #4213)
Sylvain 9dc201d4 2022-03-21T10:41:14 Fixed bug #2962 - when SDL_RenderReadPixels format = 0, used format of the target texture include/SDL_render.h, format: "0 to use the format of the rendering target "
Ryan C. Gordon d81fee76 2022-03-19T10:27:31 SDL_Rect: Added floating point versions of all the rectangle APIs. Fixes #5110.
Sylvain b2db570c 2022-03-16T18:09:40 SDL_triangle_blit_slow: sync code with SDL_blit_slow to handle ARGB2101010
Sylvain Becker 3bebdacc 2022-03-15T10:37:17 METAL: clip rect w/h must be <= render pass
Ozkan Sezer bf698689 2022-03-10T01:55:04 reduced a few ifdefs, fixed an unused warning if built w/o SDL_HAVE_YUV.
Sam Lantinga c6eef542 2022-03-09T13:48:31 Removed dead code
pionere 911ba8d3 2022-02-05T12:30:45 hide impossible branch in D3D_UnlockTexture
Sylvain ea5b482b 2022-03-09T15:38:36 Remove unused warning
Sylvain 04256a53 2022-03-09T15:12:25 Fix compilation (see #5313)
pionere 0983fcee 2022-02-05T12:28:37 fix memory leak in D3D11_CreateRenderer
pionere 3f8b450d 2022-02-05T12:22:34 extend the code hidden by SDL_HAVE_YUV
pionere ce1883e1 2022-02-05T12:12:21 fix compile error with disabled SDL_HAVE_YUV (vita) - UpdateTextureYUV is not defined if SDL_HAVE_YUV is not defined/zero + calling SDL_free suffice if the VITA_GXM_RenderData was just allocated
Sam Lantinga b064ad6a 2022-03-08T18:14:10 Allow GL_ARB_texture_non_power_of_two environment variable to override OpenGL 2.0 check
Ryan C. Gordon 60ddb74c 2022-02-02T12:19:37 video: rework how we prepare a texture framebuffer. Now we see if we can create an SDL_Renderer, and if that renderer reports itself as "accelerated," and added some initial heuristics to the OpenGL renderer to make better decisions about what qualifies as "accelerated." This adds some FIXMEs that might be merely hypothetical, and removes the old OpenGL checks from the video subsystem that probably weren't meaningful in modern times. This will definitely need to improve the existing list in the GL renderer, to catch things like llvmpipe, etc. Reference issue #4624.
Ryan C. Gordon 293a0aa8 2022-02-22T10:54:21 opengl: If GL version >= 2.0, NPOT textures are supported, so favor them. Fixes #5041.
Sam Lantinga 978fbc32 2022-02-21T12:02:44 Fixed compile warnings
Sylvain 9d86ec85 2022-02-18T09:57:10 Palette format: software Render Jitter in rotation (see #5143) - same fix applied for rotation with palette surfaces - allow other 8bits format (eg 332)
Sylvain ceb09ee7 2022-02-17T23:11:02 Fixed #5143 - software Render Jitter in rotation better precision calculating rotated coordinates and interpolation
Sylvain 75ffa24e 2022-02-15T13:35:59 Software Render Jitter in rotation (bug #5143) The output surface doesn't necessarily to have even width and height.
Sylvain 61abc4e5 2022-02-15T11:34:50 PSP: SDL_RenderCopyEx rotation and global scaling around the wrong way (see #bug 3070)
Sylvain 18b76fcc 2022-02-15T11:33:56 Fixed bug #3070 - SDL_RenderCopyEx rotation and global scaling around the wrong way (software renderer)
Sylvain e366ad12 2022-02-15T10:02:34 Fixed bug #2308: SDL_RenderCopyEx rotation center precision (software renderer)
Wouter Wijsman 66ee79bd 2022-02-14T10:59:25 [PSP] Don't swizzle streaming textures It was causing issues in the teststreaming demo and unswizzling later is inefficient and causes issues.
Wouter Wijsman abc8198a 2022-02-09T18:07:46 Render all sides when drawing rect on PSP
Wouter Wijsman 54304b97 2022-02-08T18:31:43 Fix rotation direction and center point on PSP
Wouter Wijsman 2b572dff 2022-02-08T18:03:11 Make RenderCopyEx rotate around center This still isn't perfect. The rotation is the wrong way around and the images are upside down.
Sylvain b0dd4c7d 2022-01-10T09:22:07 SDL_Render OpenGL: do batching like in the GLES2 backend (with no VBO)
Sylvain 90f0d2ce 2022-01-10T09:17:50 Revert OpenGL point drawing performance, do to proper batching
pionere 6d5592a2 2022-02-05T12:02:54 minor cleanup of SDL_CreateRenderer
pionere 2cfc83ea 2022-01-22T17:10:37 sync D3D_RenderReadPixels with D3D11_RenderReadPixels - use the result of SDL_ConvertPixels to propagate error - get rid of the verbose error message of D3D11_RenderReadPixels in case SDL_ConvertPixels failed
Sylvain f7d3abdd 2022-01-29T10:19:08 Fixed bug #964 - SDL_RenderCopy stretch loses proportion on viewport. Handle the case when there is blending
pionere 60deadba 2022-01-17T17:22:30 re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory
pionere ebdd5366 2022-01-17T16:26:02 use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError
Sylvain f5911bdc 2022-01-28T15:31:56 GLES2: disable texcoord when not using it (see bug #5235) similar to opengl backend code: - glDisableVertexAttribArray doesn't need to depend on 'drawstate.texture' value - move binding code to SetCopyState()
Sylvain 096fe37b 2022-01-28T14:19:10 GLES2: revert https://github.com/libsdl-org/SDL/commit/7bf8c5a388bc41dde830e4baabcb53d507e64448
Sylvain a988ce55 2022-01-28T17:24:59 Fixed bug #964 - SDL_RenderCopy stretch loses proportion on viewport boundaries
Sylvain 7bf8c5a3 2022-01-27T14:19:52 GLES2: disable texcoord when not using it (see bug #5235)
Cameron Gutman c6ec5a07 2022-01-02T15:43:35 d3d11: Respect SDL_HINT_RENDER_DIRECT3D_THREADSAFE when creating device
Ryan C. Gordon 426c1f4b 2022-01-19T14:27:58 opengles2: fix comment about client-side arrays.
Ryan C. Gordon f9b918ff 2022-01-11T16:15:45 opengles2: Use client-side arrays on everything but Emscripten. Turns out they're much faster! Fixes #5206.
Sam Lantinga a29d3acc 2022-01-09T11:11:34 Updated Bresenham line drawing to match software renderer output
Sam Lantinga 1f32dd8e 2022-01-09T06:36:18 Fixed overdraw with duplicate points, fixed not drawing single point lines
Ryan C. Gordon c275436f 2022-01-09T00:39:02 opengles2: Batching lines/points used wrong var for summing vertex counts. Fixed this in the vitagxm backend too, but I don't know what the state of that code is otherwise. Reference Issue #5061.
Sam Lantinga 3b083b99 2022-01-08T14:07:42 Fixed compile warning
Sam Lantinga b82af9df 2022-01-08T14:05:50 Improved OpenGL point drawing performance (thanks @slime73!) We'll do proper call batching for the SDL 2.0.22 release
Sam Lantinga 1a73c45a 2022-01-08T13:34:49 Fixed incorrect color in the OpenGL driver
Sylvain 3cdda8f8 2022-01-08T21:58:26 PSP: use 'data' variable which is alread the driver data
Sam Lantinga 4ef2529b 2022-01-08T12:37:57 More efficient calculation of render_count
Sam Lantinga 5346c93b 2022-01-08T12:28:43 Fixed assertion on number of points rendered
Sam Lantinga 4b719620 2022-01-08T12:02:08 Prevent overdraw with connected line segments
Sam Lantinga 09ece861 2022-01-08T11:36:29 Added the hint SDL_HINT_RENDER_LINE_METHOD to select the line rendering method
Sam Lantinga c1e60798 2022-01-08T11:09:11 As an optimization, draw horizontal and vertical lines using rectangles
Sam Lantinga 3da7c630 2022-01-08T11:07:03 Assert that we have drawn the expected number of points
Sam Lantinga 9f56faee 2022-01-08T10:59:31 Added line drawing using Bresenham's line algorithm (thanks @rtrussell!)
Sam Lantinga fe3a33a0 2022-01-08T10:10:18 Use RenderGeometry for drawing lines at all scales
Sam Lantinga 1694782b 2022-01-08T09:32:23 Remove redundant work when render scale is 1.0
Sam Lantinga 2026a78d 2022-01-08T09:23:58 Don't flush in RenderDraw*WithRects() This allows these functions to be reused in the future for other primitives
Sam Lantinga 18e4d9fe 2022-01-08T09:02:25 Re-enable line drawing path in render drivers This is still used for scaled line drawing in RenderDrawLinesWithRects()
Ozkan Sezer 4472b831 2022-01-08T11:56:56 PSP_RunCommandQueue: fix argument to PSP_SetBlendState() src/render/psp/SDL_render_psp.c: In function 'PSP_RunCommandQueue': src/render/psp/SDL_render_psp.c:1200: warning: passing argument 1 of 'PSP_SetBlendState' from incompatible pointer type
Ryan C. Gordon cc201337 2022-01-07T20:20:57 render: Fixed some compiler warnings. Fixes #5197.
Ryan C. Gordon 6d3b5d66 2022-01-07T18:18:53 psp: draw lines with RenderGeometry, same as with the other renderers.
Sylvain 9cb2c549 2022-01-07T22:43:30 Remove QueueDrawLines from D3D, D3D11
Sylvain b88b6b3c 2022-01-07T22:43:12 Remove QueueDrawLines from METAL
Sylvain 9aac5531 2022-01-07T22:42:52 Remove QueueDrawLines from GL, GLES, GLES2
Sylvain 8ea8b2e6 2022-01-07T22:42:13 Use QueueDrawLine if provided, otherwise use RenderGeometry
Sylvain Becker c4987274 2022-01-07T22:14:28 render: Use RenderGeometry to draw lines This patch is from @1bsyl Fixes #5061.