- Merged the separate line and quad vertex buffers in D3DFB back into a single
vertex buffer, made line batching automatic, and added an index buffer for use when batching quads. The index buffer actually offered more of a performance boost than simply batching the quads alone did. SVN r685 (trunk)
This commit is contained in:
parent
3bd53dafbe
commit
0b4092e98e
8 changed files with 219 additions and 287 deletions
|
|
@ -209,11 +209,7 @@ DDrawFB::DDrawFB (int width, int height, bool fullscreen)
|
|||
|
||||
if (!CreateResources ())
|
||||
{
|
||||
if (PrimarySurf != NULL)
|
||||
{
|
||||
PrimarySurf->Release ();
|
||||
PrimarySurf = NULL;
|
||||
}
|
||||
SAFE_RELEASE( PrimarySurf );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -684,37 +680,12 @@ void DDrawFB::ReleaseResources ()
|
|||
delete[] ClipRegion;
|
||||
ClipRegion = NULL;
|
||||
}
|
||||
if (Clipper != NULL)
|
||||
{
|
||||
Clipper->Release ();
|
||||
Clipper = NULL;
|
||||
}
|
||||
if (PrimarySurf != NULL)
|
||||
{
|
||||
//Blank ();
|
||||
PrimarySurf->Release ();
|
||||
PrimarySurf = NULL;
|
||||
}
|
||||
if (BackSurf != NULL)
|
||||
{
|
||||
BackSurf->Release ();
|
||||
BackSurf = NULL;
|
||||
}
|
||||
if (BackSurf2 != NULL)
|
||||
{
|
||||
BackSurf2->Release ();
|
||||
BackSurf2 = NULL;
|
||||
}
|
||||
if (BlitSurf != NULL)
|
||||
{
|
||||
BlitSurf->Release ();
|
||||
BlitSurf = NULL;
|
||||
}
|
||||
if (Palette != NULL)
|
||||
{
|
||||
Palette->Release ();
|
||||
Palette = NULL;
|
||||
}
|
||||
SAFE_RELEASE( Clipper );
|
||||
SAFE_RELEASE( PrimarySurf );
|
||||
SAFE_RELEASE( BackSurf );
|
||||
SAFE_RELEASE( BackSurf2 );
|
||||
SAFE_RELEASE( BlitSurf );
|
||||
SAFE_RELEASE( Palette );
|
||||
if (GDIPalette != NULL)
|
||||
{
|
||||
HDC dc = GetDC (Window);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue