Beispiel #1
0
void GLDrawInfo::StartScene()
{
	sectorrenderflags.Resize(numsectors);
	ss_renderflags.Resize(numsubsectors);
	memset(&sectorrenderflags[0], 0, numsectors*sizeof(sectorrenderflags[0]));
	memset(&ss_renderflags[0], 0, numsubsectors*sizeof(ss_renderflags[0]));


	for(unsigned int i=0;i< otherfloorplanes.Size();i++)
	{
		gl_subsectorrendernode * node = otherfloorplanes[i];
		while (node)
		{
			gl_subsectorrendernode * n = node;
			node = node->next;
			SSR_List.Release(n);
		}
	}
	otherfloorplanes.Clear();

	for(unsigned int i=0;i< otherceilingplanes.Size();i++)
	{
		gl_subsectorrendernode * node = otherceilingplanes[i];
		while (node)
		{
			gl_subsectorrendernode * n = node;
			node = node->next;
			SSR_List.Release(n);
		}
	}
	otherceilingplanes.Clear();

	// clear all the lists that might not have been cleared already
	MissingUpperTextures.Clear();
	MissingLowerTextures.Clear();
	MissingUpperSegs.Clear();
	MissingLowerSegs.Clear();
	SubsectorHacks.Clear();
	CeilingStacks.Clear();
	FloorStacks.Clear();
	HandledSubsectors.Clear();

	next=gl_drawinfo;
	gl_drawinfo=this;
	for(int i=0;i<GLDL_TYPES;i++) drawlists[i].Reset();
}
Beispiel #2
0
//==========================================================================
//
//
//
//==========================================================================
void GLDrawInfo::EndDrawInfo()
{
	GLDrawInfo * di = gl_drawinfo;

	for(int i=0;i<GLDL_TYPES;i++) di->drawlists[i].Reset();
	gl_drawinfo=di->next;

	if (di->temporary) di_list.Release(di);
}
Beispiel #3
0
void FDrawInfo::ClearBuffers()
{
    for(unsigned int i=0; i< otherfloorplanes.Size(); i++)
    {
        gl_subsectorrendernode * node = otherfloorplanes[i];
        while (node)
        {
            gl_subsectorrendernode * n = node;
            node = node->next;
            SSR_List.Release(n);
        }
    }
    otherfloorplanes.Clear();

    for(unsigned int i=0; i< otherceilingplanes.Size(); i++)
    {
        gl_subsectorrendernode * node = otherceilingplanes[i];
        while (node)
        {
            gl_subsectorrendernode * n = node;
            node = node->next;
            SSR_List.Release(n);
        }
    }
    otherceilingplanes.Clear();

    // clear all the lists that might not have been cleared already
    MissingUpperTextures.Clear();
    MissingLowerTextures.Clear();
    MissingUpperSegs.Clear();
    MissingLowerSegs.Clear();
    SubsectorHacks.Clear();
    CeilingStacks.Clear();
    FloorStacks.Clear();
    HandledSubsectors.Clear();

}
Beispiel #4
0
static FLightNode * DeleteLightNode(FLightNode * node)
{
	FLightNode * tn;  // next node on thing thread
	
	if (node)
    {
		
		*node->prevTarget = node->nextTarget;
		if (node->nextTarget) node->nextTarget->prevTarget=node->prevTarget;

		*node->prevLight = node->nextLight;
		if (node->nextLight) node->nextLight->prevLight=node->prevLight;
		
		// Return this node to the freelist
		tn=node->nextTarget;
		freelist.Release(node);
		return(tn);
    }
	return(NULL);
}                             // phares 3/13/98