You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 2.0.0 Reported for operating system, platform: Windows 7, x86_64
Comments on the original bug report:
On 2013-10-18 21:28:10 +0000, Kevin Wells wrote:
Created attachment 1374
DxDiag with relevant system information
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:
This only occurs with the render driver set to direct3d, so: SDL_SetHint(SDL_HINT_RENDER_DRIVER,"direct3d")
Also, my window was 1280x720.
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);
Target the texture for rendering: SDL_SetRenderTarget(main_window.renderer,texture);
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.
Build Date and Hardware:
Stable 2.0.0 on Windows 7 Professional 64-bit (see attached DxDiag for details)
Additional Information:
The size of the window is 1280x720. The size of the texture is 1024x1024. If you create the texture with a size of 1280x720 instead, SDL_RenderClear clears the entire texture.
Using 'SDL_RenderFillRect(main_window.renderer,NULL)' instead of SDL_RenderClear DOES fill the entire texture with color.
I tried a variety of tweaks (playing with different SDL_HINT_'s, texture and renderer settings, etc.) and could not find any way to prevent the problem from happening until I tried 'SDL_SetHint(SDL_HINT_RENDER_DRIVER,"opengl")' which pointed me to the direct3d render driver being the (a part of the?) culprit.
On 2013-10-18 21:31:07 +0000, Kevin Wells wrote:
See the URL for a video showing the bug in action.
The game is a 2D top-down affair, and the animated texture I'm making is falling raindrops. The game world is divided into "chunks" of 1024x1024 pixels, and weather occurs at this resolution, so my 1024x1024 rain texture is rendered over any chunk in which it is raining. As you can see, the bottom section of the texture quickly fills with raindrop color and is never cleared.
I would love to, but I don't know how to build SDL from source on Windows. I've been using the pre-built dev binaries built with MinGW. Does anyone build those periodically, do you know? If not, I will try to figure it out.
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.0
Reported for operating system, platform: Windows 7, x86_64
Comments on the original bug report:
On 2013-10-18 21:28:10 +0000, Kevin Wells wrote:
On 2013-10-18 21:31:07 +0000, Kevin Wells wrote:
On 2013-10-19 08:30:47 +0000, Sam Lantinga wrote:
On 2013-10-19 21:21:39 +0000, Kevin Wells wrote:
On 2013-10-21 09:43:54 +0000, Sam Lantinga wrote:
On 2013-10-22 03:56:07 +0000, Kevin Wells wrote:
On 2013-10-22 04:11:03 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: