mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-27 15:10:30 -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)
|
static void UpdateRender(void)
|
||||||
{
|
{
|
||||||
|
SDL_LockTexture(texture, &blit_rect, &argbbuffer->pixels,
|
||||||
|
&argbbuffer->pitch);
|
||||||
|
|
||||||
SDL_LowerBlit(screenbuffer, &blit_rect, argbbuffer, &blit_rect);
|
SDL_LowerBlit(screenbuffer, &blit_rect, argbbuffer, &blit_rect);
|
||||||
SDL_UpdateTexture(texture, &blit_rect, argbbuffer->pixels,
|
|
||||||
argbbuffer->pitch);
|
SDL_UnlockTexture(texture);
|
||||||
|
|
||||||
if (letterboxed)
|
if (letterboxed)
|
||||||
{
|
{
|
||||||
@ -1814,16 +1817,9 @@ static void CreateSurfaces(int w, int h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// [FG] create intermediate ARGB frame buffer
|
// [FG] create intermediate ARGB frame buffer
|
||||||
{
|
|
||||||
uint32_t rmask, gmask, bmask, amask;
|
|
||||||
int bpp;
|
|
||||||
|
|
||||||
SDL_PixelFormatEnumToMasks(SDL_PIXELFORMAT_ARGB8888, &bpp,
|
argbbuffer = SDL_CreateRGBSurfaceWithFormatFrom(
|
||||||
&rmask, &gmask, &bmask, &amask);
|
NULL, w, h, 8, 0, SDL_PIXELFORMAT_ARGB8888);
|
||||||
argbbuffer =
|
|
||||||
SDL_CreateRGBSurface(0, w, h, bpp, rmask, gmask, bmask, amask);
|
|
||||||
SDL_FillRect(argbbuffer, NULL, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE));
|
I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user