Example #1
0
static void fconfig_init(void)
{
    rrcs::safelock l(fcmutex);
    memset(&fconfig, 0, sizeof(FakerConfig));
    memset(&fcenv, 0, sizeof(FakerConfig));
    fconfig.compress = -1;
    strncpy(fconfig.config, "/opt/VirtualGL/bin/vglconfig", MAXSTR);
#ifdef SUNOGL
    fconfig_setgamma(fconfig, 2.22);
    fconfig.gamma_usesun = 1;
#else
    fconfig_setgamma(fconfig, 1.0);
    fconfig.gamma_usesun = 0;
#endif
    fconfig.gui = 1;
    fconfig.guikey = XK_F9;
    fconfig.guimod = ShiftMask | ControlMask;
    fconfig.interframe = 1;
    strncpy(fconfig.localdpystring, ":0", MAXSTR);
    fconfig.np = 1;
    fconfig.port = -1;
    fconfig.qual = DEFQUAL;
    fconfig.readback = 1;
    fconfig.samples = -1;
    fconfig.spoil = 1;
    fconfig.stereo = RRSTEREO_QUADBUF;
    fconfig.subsamp = -1;
    fconfig.tilesize = RR_DEFAULTTILESIZE;
    fconfig.transpixel = -1;
    fconfig_reloadenv();
}
Example #2
0
bool excludeDisplay(char *name)
{
	fconfig_reloadenv();

	char *dpyList=strdup(fconfig.excludeddpys);
	char *excluded=strtok(dpyList, " \t,");
	while(excluded)
	{
		if(!strcasecmp(name, excluded))
		{
			free(dpyList);  return true;
		}
		excluded=strtok(NULL, " \t,");
	}
	free(dpyList);
	return false;
}
Example #3
0
void init(void)
{
	static int init=0;

	if(init) return;
	CriticalSection::SafeLock l(globalMutex);
	if(init) return;
	init=1;

	fconfig_reloadenv();
	if(strlen(fconfig.log)>0) vglout.logTo(fconfig.log);

	if(fconfig.verbose)
		vglout.println("[VGL] %s v%s %d-bit (Build %s)",
			__APPNAME, __VERSION, (int)sizeof(size_t)*8, __BUILD);

	if(getenv("VGL_DEBUG"))
	{
		vglout.print("[VGL] Attach debugger to process %d ...\n", getpid());
		fgetc(stdin);
	}
	if(fconfig.trapx11) XSetErrorHandler(xhandler);

	if(!dpy3D)
	{
		if(fconfig.verbose)
			vglout.println("[VGL] Opening connection to 3D X server %s",
				strlen(fconfig.localdpystring)>0? fconfig.localdpystring:"(default)");
		if((dpy3D=_XOpenDisplay(fconfig.localdpystring))==NULL)
		{
			vglout.print("[VGL] ERROR: Could not open display %s.\n",
				fconfig.localdpystring);
			safeExit(1);
		}
	}
}