Beispiel #1
0
void R_SetupBuffer ()
{
    //static BYTE *lastbuff = NULL;

    int pitch = RenderTarget->GetPitch();
    BYTE *lineptr = RenderTarget->GetBuffer() + viewwindowy*pitch + viewwindowx;

    //if (dc_pitch != pitch || lineptr != lastbuff)
    {
        if (dc_pitch != pitch)
        {
            dc_pitch = pitch;
            R_InitFuzzTable (pitch);
#if defined(X86_ASM) || defined(X64_ASM)
            ASM_PatchPitch ();
#endif
        }
        dc_destorg = lineptr;
        for (int i = 0; i < RenderTarget->GetHeight(); i++)
        {
            ylookup[i] = i * pitch;
        }
    }
}
Beispiel #2
0
	void RenderViewport::SetupBuffer()
	{
		R_InitFuzzTable(RenderTarget->GetPitch());
		R_InitParticleTexture();
	}