mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
- Fixed: FMultiPatchTexture::CopyTrueColorPixels() should clear the buffer
first before drawing into it if the copy op passed to it is OP_OVERWRITE. FTexture::FillBuffer() sets this to erase whatever texture might have been in the space it is going into. SVN r1874 (trunk)
This commit is contained in:
parent
c5936c9e9e
commit
6a5ab0edc0
4 changed files with 27 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
September 24, 2009
|
||||||
|
- Fixed: FMultiPatchTexture::CopyTrueColorPixels() should clear the buffer
|
||||||
|
first before drawing into it if the copy op passed to it is OP_OVERWRITE.
|
||||||
|
FTexture::FillBuffer() sets this to erase whatever texture might have been
|
||||||
|
in the space it is going into.
|
||||||
|
|
||||||
September 22, 2009
|
September 22, 2009
|
||||||
- Added a technique to try and minimize input lag with vsync enabled: Two
|
- Added a technique to try and minimize input lag with vsync enabled: Two
|
||||||
surfaces are alternately locked for read-only access each frame, forcing
|
surfaces are alternately locked for read-only access each frame, forcing
|
||||||
|
|
|
@ -477,3 +477,17 @@ void FBitmap::CopyPixelData(int originx, int originy, const BYTE * patch, int sr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
// Clear buffer
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
void FBitmap::Zero()
|
||||||
|
{
|
||||||
|
BYTE *buffer = data;
|
||||||
|
for (int y = 0; y < Height; ++y)
|
||||||
|
{
|
||||||
|
memset(buffer, 0, Width*4);
|
||||||
|
buffer += Pitch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -116,6 +116,7 @@ public:
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Zero();
|
||||||
|
|
||||||
virtual void CopyPixelDataRGB(int originx, int originy, const BYTE *patch, int srcwidth,
|
virtual void CopyPixelDataRGB(int originx, int originy, const BYTE *patch, int srcwidth,
|
||||||
int srcheight, int step_x, int step_y, int rotate, int ct, FCopyInfo *inf = NULL);
|
int srcheight, int step_x, int step_y, int rotate, int ct, FCopyInfo *inf = NULL);
|
||||||
|
|
|
@ -550,7 +550,12 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int w, i
|
||||||
if (w < 0 || w > Width) w = Width;
|
if (w < 0 || w > Width) w = Width;
|
||||||
if (h < 0 || h > Height) h = Height;
|
if (h < 0 || h > Height) h = Height;
|
||||||
|
|
||||||
for(int i=0;i<NumParts;i++)
|
if (inf->op == OP_OVERWRITE)
|
||||||
|
{
|
||||||
|
bmp->Zero();
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < NumParts; i++)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue