Frame spoiling has no effect in my setup. (Maybe you can spot a
problem in my setup?) Here's how I have things configured:
(Game) -> VirtualGL (1) -> TurboVNC Server (2) -> Wire (Ethernet/Cable
Modem) -> TurboVNC Viewer (3)
(1) Game is run in VirtualGL in order to limit the outgoing FPS that is
sent across the wire (vglrun -fps x game). To much FPS and the whole
thing becomes "unresponsive". Limiting the FPS here is the optimal way
(I've found) to keep the bandwidth used under a specific value. I don't
want the game traffic to hog all available bandwidth. This is
especially critical when sending out across the Cable modem as I need to
avoid the ISP's upload bandwidth capping mechanism.
(2) TurboVNC Server is used to isolate each game instance. Activity in
one instance must not be able to interfere with any other instance.
TurboVNC is run in 1024x768 resolution. This is also required as I want
the users to be able to connect / disconnect from the game instance on
the fly, so that the game instance will continue to run even if no one
is connected to it.
(3) TurboVNC Viewer is used to display the game instance and control
quality settings (jpeg compression, subsampling) to fine-tune the
bandwidth used.
In this setup, I use the 'vglrun -fps' to control the bulk of how much
bandwidth is used, letting the quality settings then fine-tune that a
bit more. The game still runs at full speed (roughly 118FPS, 100% CPU)
letting VirtualGL show only x frames per second to the TurboVNC server.
What I am trying to do now is limit the FPS of the game itself, in
order to drive down its CPU usage. This is where I thought the GLX Swap
Control interval would come into play.
I should note that the test I ran yesterday was not the best of all
tests... I was running the game at 2558x975 at 24bits.
I have revised by changes to implement the kind of behaviour I am
expected from VirtualGL. What I am looking for is for VirtualGL to
simulate a monitor refresh and emulate GLX's swap control intervals
itself. It is working pretty well for me, using glxgears as my test
application. I have implemented GLX_EXT_swap_control, but still need to
implement WGL_EXT_swap_control. I changed -fps3d to set the virtual
monitor refresh rate. If not provided, it defaults to 60. Here are the
new performance marks:
(glxgears -interval n)
INTERVAL FPS CPU
0 27000 100%
1 60 1%
2 30 1%
3 20 0%
4 10 0%
(vglrun glxgears -interval n)
INTERVAL FPS CPU
0 1122 107%
1 57 6%
2 29 3%
3 19 2%
4 15 2%
I have attached a new patch for your review / feedback. Any feedback
would be great.
---
Thanks,
Dyweni
On 2013-06-02 23:36, DRC wrote:
But you didn't answer my question. Why can't you achieve the same
effect by setting VGL_FPS and disabling frame spoiling? The reason why
frame spoiling exists is to make 3D apps feel more "interactive." You
can think of it like this: through a remote connection, the mouse and
keyboard are probably being sampled at 40-60 fps, and if you're
interacting in real time with a 3D app and the image transport
pipeline in VGL is unable to keep up with the mouse/keyboard sample
rate, then the performance will feel "draggy." Thus, frame spoiling
allows the app to render at the speed of the mouse interaction, even
though all of those frames may not make it to the client.
In your case, though, you have established that the VGL pipeline is
capable of 36 fps on your system, so if you're trying to limit the
rendering rate to less than that, you are effectively not spoiling
frames anyhow. Thus, disabling frame spoiling and setting VGL_FPS
should achieve the same effect as your VGL_3DFPS option.
On Jun 2, 2013, at 11:09 PM, Dyweni - VirtualGL-Users
<t7nhgfds7...@dyweni.com> wrote:
Hi DRC,
I use VirtualGL / TurboVNC to play multiple instances of the game EVE
Online through a web interface. The web interfaces makes it real
easy
to "multi-box". The backend server (where the games all run) does
all
the heavy lifting and the lightweight client (netbook, laptop, etc)
just
displays the game via the web interface.
The game has several settings related to syncing with the monitor
refresh rate. They are 'Interval {immediate,one,two,three,four}'.
Interval immediate disables "sync to vblank". Intervals
one/two/three/four enable "sync to vblank" and run at 1, 1/2, 1/3,
and
1/4 the monitor refresh rate.
When I run the game natively, I get the following performance marks:
Interval FPS CPU
Immediate 230 100%
One 60 18%
Two 30 10%
Three 20 7-8%
Four 15 6%
VirtualGL does not support the "sync to vblank" GLX extensions, which
causes the game to be unable to limit its FPS. Here are the
performance
marks for the same intervals when running under VirtualGL without my
patch added.
Interval FPS CPU
Immediate 36 93%
One 36 93%
Two 36 93%
Three 36 93%
Four 36 93%
The patch I posted to the mailing list earlier today, allows the user
to specify what the desired FPS should be. Here are the performance
marks for the same intervals when running under VirtualGL with my
patch
added and the fps3d option set to 20.
Interval FPS CPU
Immediate 20 56%
One 20 56%
Two 20 56%
Three 20 56%
Four 20 56%
As you can see, the patch has made the first step forward towards
allowing the user to run the game at a lower FPS and reclaim some of
that CPU power for other tasks (in my case, more game instances).
Surprise! In documenting the performance marks tonight, I see my
patch
needs a lot more work before I feel comfortable declaring it optimal.
I
would have expected to see similar breaks in FPS / CPU that the
native
test shows (obviously there will be some differences due to VirtualGL
overhead). Regardless, I was hoping for some feedback. I guess the
artist is his own worst critic!
---
Thanks,
Dyweni
On 2013-06-02 20:53, DRC wrote:
I am still unclear why the normal mechanism of setting VGL_FPS and
disabling frame spoiling wouldn't work for you. Have you tried that?
It's not that I'm opposed to this feature, but I also don't want to
implement something that isn't actually necessary. Please make a
case
for why VGL_3DFPS solves a problem that couldn't be solved by using
VGL_FPS with frame spoiling disabled.
On Jun 2, 2013, at 3:58 PM, Dyweni - VirtualGL-Users
<t7nhgfds7...@dyweni.com> wrote:
Hi DRC/All,
I have mucked around with the VirtualGL 2.3.2 code and have come up
with a solution that seems to work well. I have to mention that
the
solution is rather rough around the edges. Some of the code /
ideas
were drawn from Mesa's GLXGEARS program (i.e. calculating and
reporting the current FPS and the location to do so in).
Here is how this works:
1. User provides -fps3d <n> argument to vglrun. N is any double 0
or
greater.
2. The function 'glXSwapBuffers' (server/faker-glx.cpp) continually
monitors the current fps and adjusts 'delay' to keep the fps around
the requested fps value (the fps3d argument).
3. User can tweak the fps3d value via the vglconfig (CTRL+SHIFT+F9)
GUI utility.
I am sure that the algorithm for adjusting the delay can be
improved.
It was what I could come up with in the limited time I had today.
I have attached a patch that applies to VirtualGL 2.3.2. Please
feel
free to review / test and provide feedback.
---
Thanks,
Dyweni
On 2012-07-26 13:41, DRC wrote:
Since VirtualGL redirects the 3D rendering into offscreen buffers,
there
is no concept of VSync, because there is no monitor involved until
the
pixels are drawn on the client machine, and by that time, the 3D
rendering is already done.
In the current implementation, there is no way to limit the 3D
rendering
rate except to disable frame spoiling. Disabling frame spoiling
couples
the 3D rendering and compress/send stages of the pipeline, so the
frame
rate will be the lesser of (a) the VGL_FPS setting or (b) the rate
at
which the client can process frames. However, that's probably not
what
you want, because you may experience "mouse lag" when frame
spoiling
is
disabled.
This issue has never come up, because in visualization apps, the
frame
rate is ultimately limited by the sampling rate of the mouse,
which
is
generally 40-60 Hz. I'm honestly not sure what would be the best
approach to applying a frame rate governor on the 3D side (a
VGL_3DFPS
option, if you will.) It might be as simple as putting a delay
into
the
buffer swap function.
What I'm wondering, however, is whether our long-term plans to
replace
Pbuffers with FBO's and hidden windows might magically fix this,
since
VSync might still work when rendering to a hidden window.
If anyone else has further insight, please share.
On 7/26/12 12:56 PM, Dyweni - VirtualGL-Users wrote:
Hi All,
I'm wondering if VirgualGL has support for VSync? I know that
VirtualGL
has support to output only x frames per second, but that is
different
from VSync.
I have a game (EVE Online) that can limit itself to the VSync.
In
normal X, it limits itself to 60 FPS (my monitor refresh rate)
thanks to
VSync, and that keeps the CPU usage low. However, when running
on
VirtualGL, it does not limit its FPS and they skyrocket to 120+
FPS
which drives the CPU usage high.
I would like to be able to lock the game to the VSync (say 60
FPS,
to
keep the CPU usage low) and then export x frames per second (as I
do
know with the -fps) switch.
Is this possible?
--
Thanks,
Dyweni
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond.
Discussions
will include endpoint security, mobile security and the latest in
malware
threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond.
Discussions
will include endpoint security, mobile security and the latest in
malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users
<0001-Support-limiting-3D-application-framerate-into-Virtu.patch>
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users
From 713f29201de4db5e007edccc98b309b7a876be94 Mon Sep 17 00:00:00 2001
From: root <r...@phenom.dyweni.com>
Date: Sun, 2 Jun 2013 15:47:23 -0500
Subject: [PATCH] VirtualGL: Add support for GLX Swap Control Extension
---
.../work/VirtualGL-2.3.2/common/glx.h | 5 ++
.../work/VirtualGL-2.3.2/common/rr.h | 1 +
.../work/VirtualGL-2.3.2/server/faker-glx.cpp | 81 +++++++++++++++++++++-
.../work/VirtualGL-2.3.2/server/faker-mapfile.c | 1 +
.../work/VirtualGL-2.3.2/server/faker-sym.cpp | 1 +
.../work/VirtualGL-2.3.2/server/faker-sym.h | 2 +
.../work/VirtualGL-2.3.2/server/fakerconfig.cpp | 3 +
.../work/VirtualGL-2.3.2/server/vglconfig.cpp | 25 ++++++-
.../work/VirtualGL-2.3.2/server/vglrun | 3 +
9 files changed, 119 insertions(+), 3 deletions(-)
diff --git a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/common/glx.h b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/common/glx.h
index 962c79c..d11c87f 100644
--- a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/common/glx.h
+++ b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/common/glx.h
@@ -131,6 +131,9 @@ extern "C" {
#define GLX_PBUFFER_WIDTH 0x8041
#endif
+#define GLX_SWAP_INTERVAL_EXT 0x20F1
+#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
+
#ifndef GLX_ARB_get_proc_address
typedef void (*__GLXextFuncPtr)(void);
#endif
@@ -195,6 +198,8 @@ extern Bool glXQueryVersion(Display *dpy, int *major, int *minor);
extern void glXSwapBuffers(Display *dpy, GLXDrawable drawable);
+extern void glXSwapIntervalEXT(Display *dpy, GLXDrawable drawable, int interval);
+
extern void glXUseXFont(Font font, int first, int count, int list_base);
extern void glXWaitGL(void);
diff --git a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/common/rr.h b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/common/rr.h
index 817b7e1..3cd9912 100644
--- a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/common/rr.h
+++ b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/common/rr.h
@@ -154,6 +154,7 @@ typedef struct _FakerConfig
double flushdelay;
int forcealpha;
double fps;
+ double fps3d;
double gamma;
unsigned char gamma_lut[256];
unsigned short gamma_lut16[65536];
diff --git a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-glx.cpp b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-glx.cpp
index 11fc0eb..1b169ca 100644
--- a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-glx.cpp
+++ b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-glx.cpp
@@ -158,6 +158,9 @@ GLXDrawable ServerDrawable(Display *dpy, GLXDrawable draw)
extern "C" {
+static int glxSwapInterval = 1;
+static int glxMaxSwapInterval = 8;
+
// Return a set of Pbuffer-compatible FB configs from the 3D X server that
// contain the desired GLX attributes.
@@ -860,7 +863,7 @@ void glXFreeContextEXT(Display *dpy, GLXContext ctx)
// properly report the extensions and GLX version it supports.
static const char *glxextensions=
- "GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_visual_info GLX_EXT_visual_rating GLX_SGI_make_current_read GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SUN_get_transparent_index GLX_ARB_create_context GLX_ARB_create_context_profile";
+ "GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_visual_info GLX_EXT_visual_rating GLX_SGI_make_current_read GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SUN_get_transparent_index GLX_ARB_create_context GLX_ARB_create_context_profile GLX_EXT_swap_control";
const char *glXGetClientString(Display *dpy, int name)
{
@@ -1198,6 +1201,7 @@ void (*glXGetProcAddressARB(const GLubyte *procName))(void)
checkfaked(glXQueryExtension)
checkfaked(glXQueryVersion)
checkfaked(glXSwapBuffers)
+ checkfaked(glXSwapIntervalEXT);
checkfaked(glXUseXFont)
checkfaked(glXWaitGL)
@@ -1645,6 +1649,15 @@ void glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute,
TRY();
+ // Intercept SWAP CONTROL attributes
+ if (attribute == GLX_SWAP_INTERVAL_EXT) {
+ *value = glxSwapInterval;
+ goto done;
+ } else if (attribute == GLX_MAX_SWAP_INTERVAL_EXT) {
+ *value = glxMaxSwapInterval;
+ goto done;
+ }
+
if(winh.isoverlay(dpy, draw))
{
_glXQueryDrawable(dpy, draw, attribute, value);
@@ -1726,12 +1739,36 @@ void glXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask)
}
+
+#include <sys/time.h>
+#include <unistd.h>
+
+/* return current time (in seconds) */
+static double
+current_time(void)
+{
+ struct timeval tv;
+#ifdef __VMS
+ (void) gettimeofday(&tv, NULL );
+#else
+ struct timezone tz;
+ (void) gettimeofday(&tv, &tz);
+#endif
+ return (double) tv.tv_sec + tv.tv_usec / 1000000.0;
+}
+
+
// If the application is rendering to the back buffer, VirtualGL will read
// back and send the buffer whenever glXSwapBuffers() is called.
void glXSwapBuffers(Display* dpy, GLXDrawable drawable)
{
pbwin *pbw=NULL;
+ static int frames = 0;
+ static double last = -1.0, last2 = -1.0;
+ double t = current_time();
+ GLfloat seconds;
+ GLfloat fps;
opentrace(glXSwapBuffers); prargd(dpy); prargx(drawable); starttrace();
@@ -1751,6 +1788,23 @@ void glXSwapBuffers(Display* dpy, GLXDrawable drawable)
}
else _glXSwapBuffers(_localdpy, drawable);
+ frames++;
+ if (last < 0.0)
+ last2 = last = t;
+
+ if (glxSwapInterval > 0) {
+ usleep((1000000 / (fconfig.fps3d / glxSwapInterval)) - (t - last));
+ last = t;
+ }
+
+ if (t - last2 >= 5.0) {
+ seconds = t - last2;
+ fps = frames / seconds;
+ printf("FAKER_GLX: %d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, fps);
+ last2 = t;
+ frames = 0;
+ }
+
CATCH();
done:
@@ -1760,6 +1814,31 @@ void glXSwapBuffers(Display* dpy, GLXDrawable drawable)
}
+// Sets the GLX SWAP CONTROL INTERVAL
+void glXSwapIntervalEXT(Display *dpy, GLXDrawable drawable, int interval)
+{
+
+ opentrace(glXMakeCurrent); prargd(dpy); prargx(drawable); prargi(interval);
+ starttrace();
+
+ TRY();
+
+ // don't set internval if beyond max interval
+ if (interval > glxMaxSwapInterval)
+ goto done;
+
+ // set the interval
+ glxSwapInterval = interval;
+
+ CATCH();
+
+ done:
+
+ stoptrace(); prargi(glxSwapInterval);
+ closetrace();
+}
+
+
// Returns the transparent index from the overlay visual on the 2D X server
int glXGetTransparentIndexSUN(Display *dpy, Window overlay,
diff --git a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-mapfile.c b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-mapfile.c
index 21337ee..eba7c5c 100644
--- a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-mapfile.c
+++ b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-mapfile.c
@@ -13,6 +13,7 @@
glXQueryExtension;
glXQueryVersion;
glXSwapBuffers;
+ glXSwapIntervalEXT;
glXUseXFont;
glXWaitGL;
diff --git a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-sym.cpp b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-sym.cpp
index 6532867..2d84b07 100644
--- a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-sym.cpp
+++ b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-sym.cpp
@@ -168,6 +168,7 @@ static int __vgl_loadglsymbols(void *dllhnd)
lsym(glXQueryExtension)
lsym(glXQueryVersion)
lsym(glXSwapBuffers)
+ lsym(glXSwapIntervalEXT);
lsym(glXUseXFont)
lsym(glXWaitGL)
diff --git a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-sym.h b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-sym.h
index 30fbb7c..97617fb 100644
--- a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-sym.h
+++ b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/faker-sym.h
@@ -179,6 +179,8 @@ funcdef3(Bool, glXQueryVersion, Display *, dpy, int *, major, int *, minor,
funcdef2(void, glXSwapBuffers, Display *, dpy, GLXDrawable, drawable,);
+funcdef3(void, glXSwapIntervalEXT, Display *, dpy, GLXDrawable, drawable, int, interval,);
+
funcdef4(void, glXUseXFont, Font, font, int, first, int, count, int,
list_base,);
diff --git a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/fakerconfig.cpp b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/fakerconfig.cpp
index 90e31f4..bbabcb6 100644
--- a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/fakerconfig.cpp
+++ b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/fakerconfig.cpp
@@ -160,6 +160,7 @@ static void fconfig_init(void)
fconfig.compress=-1;
strncpy(fconfig.config, VGLCONFIG_PATH, MAXSTR);
fconfig.forcealpha=-1;
+ fconfig.fps3d=60;
fconfig_setgamma(fconfig, 1.0);
fconfig.glflushtrigger=1;
fconfig.gui=1;
@@ -307,6 +308,7 @@ void fconfig_reloadenv(void)
}
fetchenv_bool("VGL_FORCEALPHA", forcealpha);
fetchenv_dbl("VGL_FPS", fps, 0.0, 1000000.0);
+ fetchenv_dbl("VGL_FPS3D", fps3d, 0.0, 1000000.0);
if((env=getenv("VGL_GAMMA"))!=NULL && strlen(env)>0)
{
if(!strcmp(env, "1"))
@@ -548,6 +550,7 @@ void fconfig_print(FakerConfig &fc)
prconfint(compress);
prconfstr(config);
prconfdbl(fps);
+ prconfdbl(fps3d);
prconfdbl(flushdelay);
prconfint(forcealpha);
prconfdbl(gamma);
diff --git a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/vglconfig.cpp b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/vglconfig.cpp
index 6389c60..47583b8 100644
--- a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/vglconfig.cpp
+++ b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/vglconfig.cpp
@@ -39,7 +39,7 @@ Fl_Choice *compchoice=NULL, *sampchoice=NULL,
*stereochoice=NULL, *profchoice=NULL;
Fl_Light_Button *spoilbutton=NULL, *ifbutton=NULL;
Fl_Value_Slider *qualslider=NULL;
-Fl_Float_Input *gammainput=NULL, *fpsinput;
+Fl_Float_Input *gammainput=NULL, *fpsinput, *fps3dinput;
Fl_Check_Button *fpsbutton=NULL;
int ppid=-1;
@@ -162,6 +162,13 @@ void SetFPS(void)
fpsinput->value(temps);
}
+void SetFPS3D(void)
+{
+ char temps[20];
+ snprintf(temps, 19, "%.2f", fconfig.fps3d);
+ fps3dinput->value(temps);
+}
+
// Callbacks
@@ -254,6 +261,15 @@ void FPSCB(Fl_Widget *w, void *data)
input->value(temps);
}
+void FPS3DCB(Fl_Widget *w, void *data)
+{
+ Fl_Float_Input *input=(Fl_Float_Input *)w;
+ fconfig.fps3d=atof(input->value());
+ char temps[20];
+ snprintf(temps, 19, "%.2f", fconfig.fps3d);
+ input->value(temps);
+}
+
// Menus
@@ -340,7 +356,7 @@ void init(int argc, char **argv)
{
char temps[20];
- errifnot(win=new Fl_Double_Window(485, 340, "VirtualGL Configuration"));
+ errifnot(win=new Fl_Double_Window(485, 375, "VirtualGL Configuration"));
if(strlen(fconfig.transport)>0)
{
@@ -411,6 +427,11 @@ void init(int argc, char **argv)
fpsinput->callback(FPSCB, 0);
SetFPS();
+ errifnot(fps3dinput=new Fl_Float_Input(240, 340, 85, 25,
+ "Emulate Monitor Refresh Rate: "));
+ fps3dinput->callback(FPS3DCB, 0);
+ SetFPS3D();
+
win->end();
win->show(argc, argv);
}
diff --git a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/vglrun b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/vglrun
index 1b620e4..1dd4f31 100644
--- a/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/vglrun
+++ b/virtualgl-2.3.2-r2/work/VirtualGL-2.3.2/server/vglrun
@@ -59,6 +59,8 @@ usage()
echo
echo "-fps <f> : Limit client/server frame rate to <f> frames/sec"
echo
+ echo "-fps3d <f>: Emulate Monitor Refresh Rate [default = 60]"
+ echo
echo "-gamma <g>: Set gamma correction factor to <g> (see docs)"
echo
echo "-ge : Fool application into thinking that LD_PRELOAD is unset"
@@ -165,6 +167,7 @@ do
-v*) VGL_VERBOSE=0 ; export VGL_VERBOSE ;;
+v*) VGL_VERBOSE=1 ; export VGL_VERBOSE ;;
-fps) VGL_FPS=$2 ; export VGL_FPS ; shift ;;
+ -fps3d) VGL_FPS3D=$2 ; export VGL_FPS3D ; shift ;;
-ms) VGL_SAMPLES=$2 ; export VGL_SAMPLES ; shift ;;
-ld) LD_LIBRARY_PATH=$2:$LD_LIBRARY_PATH ;
export LD_LIBRARY_PATH ; shift ;;
--
1.8.1.5
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users