This commit is contained in:
2025-08-11 13:29:29 -05:00
parent 26ecf67472
commit e9d2f4904a
39 changed files with 569 additions and 829 deletions

View File

@@ -0,0 +1,35 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "renderbackbuffer.h"
#if RENDER_USE_FRAMEBUFFER
SDL_Texture *RENDER_BACKBUFFER;
#else
#endif
void renderBackBufferInit(void) {
#if RENDER_USE_FRAMEBUFFER
RENDER_BACKBUFFER = SDL_CreateTexture(
RENDER_RENDERER,
SDL_PIXELFORMAT_RGBA8888,
SDL_TEXTUREACCESS_TARGET,
RENDER_WINDOW_WIDTH_DEFAULT,
RENDER_WINDOW_HEIGHT_DEFAULT
);
if(!RENDER_BACKBUFFER) {
assertUnreachable("SDL_CreateTexture failed\n");
return;
}
#else
// No back buffer needed for window rendering
#endif
}