src/render/direct3d


Log

Author Commit Date CI Message
Sam Lantinga de3d381c 2014-08-17T14:44:53 Fixed bug 2685 - SDL_RenderReadPixels() doesn't work with offscreen targets Andreas Falkenhahn SDL_RenderReadPixels() doesn't seem to work when trying to read pixels from a texture that has been created using SDL_TEXTUREACCESS_TARGET and has been selected as the render target using SDL_SetRenderTarget(). I am attaching a small program that demonstrates the issue. I get the following result here: READ PIXEL RETURN: 0 --- COLOR CHECK: ff000000 But it should be: READ PIXEL RETURN: 0 --- COLOR CHECK: ffff0000 Tested with SDL 2.0.3 on Windows 7.
Sam Lantinga d673d8c3 2014-08-16T23:17:47 Fixed bugs 2677 and 2625, made it possible to lock render targets in D3D
Sam Lantinga 1ee96bb9 2014-07-07T10:26:28 Fixed mingw64 build and warnings
Alfred Reynolds 2748e282 2014-07-03T10:22:12 The YUV offset is 16 / 255, not 16 / 256
Sam Lantinga 4fd03b95 2014-06-04T10:57:52 Setting the window size changes the fullscreen display mode, unless a window display mode has been set. Testing: * Ran testsprite2 --fullscreen, used Ctrl+ and Ctrl- to change window sizes, verified that the display mode changed as well.
Sam Lantinga c15e26d7 2014-06-04T10:57:40 Fixed crash and lost pixel data when recovering from a lost device situation (e.g. alt-tab from fullscreen)
Sam Lantinga 49c53fd2 2014-05-31T11:37:12 Use D3D9Ex when available This hopefully works around crashes in Intel D3D9 support in Windows 8.1.
Philipp Wiesemann 9bc47465 2014-05-18T21:11:30 Changed C++ style comments.
J?rgen P. Tjern? defd90b6 2014-04-19T13:15:41 Render: Allow empty cliprect. This fixes an issue where an empty cliprect is treated the same as a NULL cliprect, causing the render backends to disable clipping. Also adds a new API, SDL_RenderIsClipEnabled(render) that allows you to differentiate between: - SDL_RenderSetClipRect(render, NULL) - SDL_Rect r = {0,0,0,0}; SDL_RenderSetClipRect(render, &r); Fixes https://bugzilla.libsdl.org/show_bug.cgi?id=2504
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
Sam Lantinga 2c558ca2 2014-03-10T17:19:19 Fixed D3D9 initialization on Windows 8, which doesn't have D3DX
Sam Lantinga a8f540fe 2014-03-09T22:48:38 Fixed renderer flags to include support for target textures after the renderer is created.
Sam Lantinga 8db4c5a9 2014-02-25T10:04:49 Fixed crash if the input data pitch is larger than the locked texture pitch
Sam Lantinga 22e3217e 2014-02-20T21:07:56 Fixed infinite recursion in D3D_Reset()
Sam Lantinga 6b33f2e8 2014-02-17T22:20:33 Fixed resetting the current render target if the D3D device is reset while using a non-default render target.
Sam Lantinga 076a14b2 2014-02-10T13:40:02 Fixed crash if render target textures are used while the device is lost
Sam Lantinga ae05f178 2014-02-10T10:02:51 Recreate render target textures when the D3D device is being reset, and notify the application using the SDL_RENDER_TARGETS_RESET event when this happens.
Sam Lantinga 3ab3ea64 2014-02-09T01:56:41 Fixed bug 2385 - error: unknown type name 'IDirect3DDevice9' Sandu Liviu Catalin I'm unable to compile the latest SDL (directly from the repository) even though I disabled every DirectX option since I don't need DirectX. I allways het these errors: D:\DevLibs\SDL\src\render\direct3d\SDL_render_d3d.c:1897:1: error: unknown type name 'IDirect3DDevice9' D:\DevLibs\SDL\src\render\direct3d\SDL_render_d3d.c:1898:25: error: unknown type name 'SDL_Renderer'
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
Ryan C. Gordon aff44ccd 2014-01-27T16:13:13 Patched to compile...uh, everywhere. :)
Ryan C. Gordon 87cfee27 2014-01-27T16:10:15 Patched to compile on Windows when not supporting Direct3D.
Gabriel Jacobo f848adff 2013-11-29T10:06:08 Improve Android pause/resume behavior.
Ryan C. Gordon 7e1289af 2013-11-24T23:56:17 Make internal SDL sources include SDL_internal.h instead of SDL_config.h The new header will include SDL_config.h, but allows for other global stuff.
Sam Lantinga ef97aab9 2013-11-14T21:39:54 Backed out changeset 6c59f7c8ec17 - it didn't actually do anything useful
Sam Lantinga b36d98bd 2013-11-13T21:50:59 Diagonal flipping with RenderCopyEx Ivan Rubinson As it turns out, it was impossible to render a texture flipped diagonally (both vertically and horizontally) with one RenderCopyEx call. With help from #SDL @ freenode, we came up with a fix.
Sam Lantinga 2348e426 2013-10-21T22:08:56 Fixed whitespace
Sam Lantinga e343273a 2013-10-19T01:29:23 Fixed bug 2162 - SDL_RenderClear not clearing entire render target Kevin Wells Overview: SDL_RenderClear is only clearing part of a texture when it is the render target and a different size than the screen. Steps to Reproduce: 1) This only occurs with the render driver set to direct3d, so: SDL_SetHint(SDL_HINT_RENDER_DRIVER,"direct3d") Also, my window was 1280x720. 2) Create a texture for a render target with a resolution of 1024x1024: texture=SDL_CreateTexture(main_window.renderer,SDL_PIXELFORMAT_RGBA8888,SDL_TEXTUREACCESS_TARGET,1024,1024); SDL_SetTextureBlendMode(texture,SDL_BLENDMODE_BLEND); 3) Target the texture for rendering: SDL_SetRenderTarget(main_window.renderer,texture); 4) Set the draw color to whatever you want (problem occurs with both 0,0,0,0 and 0,0,0,255 among others) and then clear the render target: SDL_SetRenderDrawColor(main_window.renderer,0,0,0,0); SDL_RenderClear(main_window.renderer); Actual Results: Only about the top 3/4s of the texture gets cleared on calling SDL_RenderClear. The bottom 1/4 or so does not clear. Expected Results: Entire render target should be cleared.
Sam Lantinga 12ca3ce3 2013-10-17T23:02:29 Fixed building using MinGW Our SDL_windows.h needed to be included before anything else so UNICODE is defined.
Sam Lantinga 202528a4 2013-09-28T14:07:17 Call AddRef() on the device so it doesn't accidentally get released from underneath the caller.
Sam Lantinga 25f607a3 2013-09-28T14:07:14 Make it clear we're just returning a D3D9 device, allowing for new functions to get other D3D versions
Sam Lantinga cf5e5a83 2013-09-28T14:07:08 Added a hint to create the D3D device in thread-safe mode: SDL_HINT_RENDER_DIRECT3D_THREADSAFE
Sam Lantinga 803965bc 2013-09-28T14:07:05 Added platform specific call: SDL_RenderGetD3DDevice()
Sam Lantinga 9f390e79 2013-09-28T14:06:59 Moved SDL_Direct3D9GetAdapterIndex() to SDL_windowsvideo.c since it doesn't belong in the window code.
Sam Lantinga 89c31bb4 2013-09-28T14:06:55 Implemented SDL_UpdateYUVTexture() for Direct3D
Sam Lantinga b6be1435 2013-09-28T14:06:20 Moved D3D_LoadDLL and SDL_Direct3D9GetAdapterIndex to SDL_windowswindow.c at Jorgen's insistence. That file is wrapped in a more appropriate define check so it will work if somebody builds a binary without D3D support. Added a reference to SDL_Direct3D9GetAdapterIndex to SDL_test_common.c so SDL will fail to compile if the new symbol isn't included properly. CR: Jorgen
Sam Lantinga fae4190d 2013-09-13T17:42:46 Added SDL_Direct3D9GetAdapterIndex(), which returns the adapter index you would pass into CreateDevice to get your device on the right monitor in full screen mode. This fixes the default adapter in SDL_render_d3d.c, which means that tests will work fullscreen off the main monitor now. CR: Sam
Sam Lantinga f79fc33a 2013-08-29T08:29:21 Christoph Mallon: Remove pointless if (x) before SDL_free(x)
Gabriel Jacobo 1e49b1ed 2013-08-21T09:47:10 OCD fixes: Adds a space after /* (glory to regular expressions!)
Gabriel Jacobo 695344d1 2013-08-21T09:43:09 OCD fixes: Adds a space before */
Gabriel Jacobo 552b04c5 2013-08-20T20:34:40 More non C89 compliant comments
Ryan C. Gordon b4426769 2013-08-19T11:02:44 Fixed leaking of pixel shader object in D3D renderer (thanks, Peter!). Fixes Bugzilla #2047.
Sam Lantinga 1455a947 2013-08-17T17:14:15 Fixed Windows build
Sam Lantinga 6995ff18 2013-08-17T09:54:30 Do full state initialization in D3D_Reset(), this fixes blend mode issues when resizing the window on Windows 8.
Gabriel Jacobo dad42067 2013-08-12T11:13:50 Fixes #2022, do not resume on Android when surfaceChanged If the app is in landscape mode and the user presses the power button, a pause is followed immediately by a surfaceChanged event because the lock screen is shown in portrait mode. This triggers a "false" resume. So, we just pause and resume following the onWindowFocusChanged events. Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before blocking the event pump.
Sam Lantinga 1ad936eb 2013-08-11T19:56:43 Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() Rainer Deyke I'm running Linux Mint 15 with the Cinnamon window manager. SDL_DestroyWindow consistently locks up for me when the window if fullscreen.