Open
Description
Environment
- SDL Version: 3.2.14
- Platform: Windows 11
- Compiler Versions:
- C++: C++20
- C: C17
- IDE: Microsoft Visual Studio Community 2022 (64-bit) - Version 17.13.6
- Build Configuration: Debug - x64
- Renderer: Direct3D
Problem Description
When the window size is reduced below a certain threshold, the renderer stops functioning completely. The content stops updating and the window displays artifacts or blank content.
Expected Behavior
The renderer should continue to function normally regardless of window size, or at least display clear error behavior rather than silently failing.
Reproduction Steps
- Run the provided minimal code example
- Gradually resize the window to make it smaller
- Observe renderer failure when window reaches a small size (typically <100px in either dimension)
Actual Behavior
- Rendering stops completely below certain window dimensions
- No error messages or warnings are displayed
- Window content becomes frozen or displays artifacts
Video Demonstration
2025-05-16.21-26-11.mp4
Minimal Code Example
#define SDL_MAIN_USE_CALLBACKS 1
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
SDL_Window* mainWindow = nullptr;
SDL_Renderer* mainRenderer = nullptr;
SDL_AppResult SDL_AppInit( void** appstate, int argc, char* argv[] )
{
if( !SDL_Init( SDL_INIT_VIDEO ) )
{
return SDL_APP_FAILURE;
}
if( !SDL_CreateWindowAndRenderer(
"example", 640, 480, SDL_WINDOW_RESIZABLE, &mainWindow, &mainRenderer ) )
{
return SDL_APP_FAILURE;
}
return SDL_APP_CONTINUE;
}
SDL_AppResult SDL_AppEvent( void* appstate, SDL_Event* event )
{
switch( event->type )
{
case SDL_EVENT_QUIT:
return SDL_APP_SUCCESS;
break;
}
return SDL_APP_CONTINUE;
}
SDL_AppResult SDL_AppIterate( void* appstate )
{
SDL_SetRenderDrawColor( mainRenderer, 255, 255, 255, 255 );
SDL_RenderClear( mainRenderer );
SDL_RenderPresent( mainRenderer );
return SDL_APP_CONTINUE;
}
void SDL_AppQuit( void* appstate, SDL_AppResult result )
{
SDL_free( appstate );
}