server_clear.c revision 01df41f7a4e5f7de195a059541d1c89676da9673
/* Copyright (c) 2001, Stanford University
* All rights reserved
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#include "cr_spu.h"
#include "chromium.h"
#include "cr_mem.h"
#include "cr_net.h"
#include "server_dispatch.h"
#include "server.h"
#ifdef VBOXCR_LOGFPS
typedef struct VBOXCRFPS
{
} VBOXCRFPS, *PVBOXCRFPS;
{
}
{
}
{
int i;
curBytes = 0;
curBytesSent = 0;
curCalls = 0;
curOps = 0;
curTimeUsed = 0;
for (i = 0; i < cr_server.numClients; i++)
{
{
}
}
{
}
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
#endif
{
if (cr_server.only_swap_once)
{
/* NOTE: we only do the clear for the _last_ client in the list.
* This is because in multi-threaded apps the zeroeth client may
* be idle and never call glClear at all. See threadtest.c
* It's pretty likely that the last client will be active.
*/
if ((mask & GL_COLOR_BUFFER_BIT) &&
return;
}
}
static void __draw_poly(CRPoly *p)
{
int b;
for (b=0; b<p->npoints; b++)
}
{
#ifdef VBOXCR_LOGFPS
static bool bFpsInited = false;
if (!bFpsInited)
{
bFpsInited = true;
}
{
crDebug("fps: %f, rec Mbps: %.1f, send Mbps: %.1f, cps: %.1f, ops: %.0f, host %.1f%%",
}
#endif
if (!mural) {
return;
}
if (cr_server.only_swap_once)
{
/* NOTE: we only do the clear for the _last_ client in the list.
* This is because in multi-threaded apps the zeroeth client may
* be idle and never call glClear at all. See threadtest.c
* It's pretty likely that the last client will be active.
*/
{
return;
}
}
#if 0
if (cr_server.overlapBlending)
{
int a;
CRPoly *p;
/*
* I've probably missed some state here, or it
*/
tex[0] = 0;
for (a=0; a<CR_MAX_TEXTURE_UNITS; a++)
{
tex[0] = 1;
break;
}
tex[1] = 0;
for (a=0; a<CR_MAX_TEXTURE_UNITS; a++)
{
break;
}
tex[2] = 0;
for (a=0; a<CR_MAX_TEXTURE_UNITS; a++)
{
break;
}
switch(mm)
{
case GL_PROJECTION:
break;
default:
/* fall through */
case GL_MODELVIEW:
break;
}
/* fix state */
if (lighting)
if (fog)
if (tex[0])
if (tex[1])
if (tex[2])
if (cull)
/* Regular Blending */
{
if (!blend)
/* draw the blends */
{
{
}
else
{
}
p = cr_server.overlap_geom[a];
while (p)
{
/* hopefully this isnt concave... */
__draw_poly(p);
p = p->next;
}
}
if (!blend)
}
else
/* Knockout Blending */
{
if (blend)
while (p)
{
__draw_poly(p);
p = p->next;
}
if (blend)
}
/* return things to normal */
switch (mm)
{
case GL_PROJECTION:
break;
case GL_MODELVIEW:
break;
default:
break;
}
if (lighting)
if (fog)
if (tex[0])
if (tex[1])
if (tex[2])
if (cull)
}
#endif
/* Check if using a file network */
window = 0;
ctx = crStateGetCurrent();
if (crServerIsRedirectedToFBO())
{
}
else
{
}
}
crServerDispatchFlush(void)
{
{
{
if (crServerIsRedirectedToFBO())
}
}
}
crServerDispatchFinish(void)
{
{
{
if (crServerIsRedirectedToFBO())
}
}
}