Change Render size

Hello everyone, so i have a question how can I change a size or dimensions of texture as render target in SDL

You can’t change the size of an existing texture, but you can destroy the current texture and create a new one:

  SDL_Texture *target = SDL_GetRenderTarget(renderer);
  SDL_SetRenderTarget(renderer, NULL);
  target = SDL_CreateTexture(renderer, SDL_TEXTUREACCESS_TARGET,...);
  SDL_SetRenderTarget(renderer, target);
1 Like