-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Win10 direct3d & SDL_HINT_RENDER_BATCHING, "0" breaks the renderer #4933
Comments
What platform are you running on, and what renderer are you getting? |
Windows 10 and the default renderer is direct3d. This doesn't happen on the opengl renderers. Looking deeper. I am getting windows events but it seems the renderer is breaking and giving a Present(): INVALIDCALL error. The window doesn't get updated once you've tried to resized, or other things like restoring from full screen. |
Do you have repro steps with the SDL test programs, or a standalone test case? |
I ran testsprite2 with --resizable --renderer direct3d, and confirmed that batching was off (which it is by default if you specify a renderer) and resized the window with no issues... ? |
Are you using render targets? They need to be recreated in response to the SDL_RENDER_TARGETS_RESET event. |
I'm not using render targets. It's happening in my game controller diagnostics app which is fairly large. Let me set up a simple test case to see if I can reproduce it - stand by :-) |
I'm also happy to try to repro with your app, if you want. |
Just to note that the problem doesn't happen with the direct3d11 renderer either. Only the direct3d renderer seems affected. My app's source isn't accessible online anywhere, so it's easier if I knock something up, which will help identify if it's something else that's sparking the problem. Nearly there, bare with... |
@slouken I think I found found the trigger. SDL_SetHint(SDL_HINT_WINDOWS_USE_D3D9EX, "1"). You should be able to recreate the error with this example when resizing the window. You'll notice the title will display the error.
|
Hah, I found it. It's a one line fix. Thanks for the good repro! |
A recent change to the current source has caused this bug. I don't seem to be getting any resize events when the window is resized by dragging the window to resize or with calls to SDL_SetWindowFullscreen() to restore from full screen. Only happens if batching is turned off. I'm using the default renderer (-1).
The text was updated successfully, but these errors were encountered: