mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-26 06:20:16 -04:00
Blit directly to texture (#1870)
* Blit directly to texture * Omit unneeded vars
This commit is contained in:
parent
edff3f2009
commit
cbf2e289b8
@ -665,9 +665,12 @@ void I_StartFrame(void)
|
||||
|
||||
static void UpdateRender(void)
|
||||
{
|
||||
SDL_LockTexture(texture, &blit_rect, &argbbuffer->pixels,
|
||||
&argbbuffer->pitch);
|
||||
|
||||
SDL_LowerBlit(screenbuffer, &blit_rect, argbbuffer, &blit_rect);
|
||||
SDL_UpdateTexture(texture, &blit_rect, argbbuffer->pixels,
|
||||
argbbuffer->pitch);
|
||||
|
||||
SDL_UnlockTexture(texture);
|
||||
|
||||
if (letterboxed)
|
||||
{
|
||||
@ -1814,16 +1817,9 @@ static void CreateSurfaces(int w, int h)
|
||||
}
|
||||
|
||||
// [FG] create intermediate ARGB frame buffer
|
||||
{
|
||||
uint32_t rmask, gmask, bmask, amask;
|
||||
int bpp;
|
||||
|
||||
SDL_PixelFormatEnumToMasks(SDL_PIXELFORMAT_ARGB8888, &bpp,
|
||||
&rmask, &gmask, &bmask, &amask);
|
||||
argbbuffer =
|
||||
SDL_CreateRGBSurface(0, w, h, bpp, rmask, gmask, bmask, amask);
|
||||
SDL_FillRect(argbbuffer, NULL, 0);
|
||||
}
|
||||
argbbuffer = SDL_CreateRGBSurfaceWithFormatFrom(
|
||||
NULL, w, h, 8, 0, SDL_PIXELFORMAT_ARGB8888);
|
||||
|
||||
I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user