-
Notifications
You must be signed in to change notification settings - Fork 1
/
vglrun.bat
122 lines (113 loc) · 3.25 KB
/
vglrun.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
@echo off
setlocal EnableDelayedExpansion
set WITHDLL=%~d0%~p0withdll.exe
if not exist "%WITHDLL%" set WITHDLL=withdll.exe
set FAKER=%~d0%~p0faker.dll
if not exist "%FAKER%" set FAKER=faker.dll
:getargs
set ARG=%~1
if "%ARG%"=="" goto argsdone
if /i "%ARG:~0,2%"=="-f" (
set VGL_FPS=%2
shift /1 & shift /1 & goto getargs
) else (
if /i "%ARG:~0,3%"=="-ga" (
set VGL_GAMMA=%2
shift /1 & shift /1 & goto getargs
) else (
if /i "%ARG:~0,2%"=="-g" (
set VGL_GAMMA=0
shift /1 & goto getargs
) else (
if /i "%ARG:~0,2%"=="+g" (
set VGL_GAMMA=1
shift /1 & goto getargs
) else (
if /i "%ARG:~0,3%"=="+pr" (
set VGL_PROFILE=1
shift /1 & goto getargs
) else (
if /i "%ARG:~0,3%"=="-pr" (
set VGL_PROFILE=0
shift /1 & goto getargs
) else (
if /i "%ARG:~0,3%"=="+se" (
set VGL_SERIAL=1
shift /1 & goto getargs
) else (
if /i "%ARG:~0,3%"=="-se" (
set VGL_SERIAL=0
shift /1 & goto getargs
) else (
if /i "%ARG:~0,3%"=="+sp" (
set VGL_SPOIL=1
shift /1 & goto getargs
) else (
if /i "%ARG:~0,3%"=="-sp" (
set VGL_SPOIL=0
shift /1 & goto getargs
) else (
if /i "%ARG:~0,3%"=="-st" (
set VGL_STEREO=%2
shift /1 & shift /1 % goto getargs
) else (
if /i "%ARG:~0,3%"=="+tr" (
set VGL_TRACE=1
shift /1 & goto getargs
) else (
if /i "%ARG:~0,3%"=="-tr" (
set VGL_TRACE=0
shift /1 & goto getargs
) else (
if /i "%ARG:~0,2%"=="+v" (
set VGL_VERBOSE=1
shift /1 & goto getargs
) else (
if /i "%ARG:~0,2%"=="-v" (
set VGL_VERBOSE=0
shift /1 & goto getargs
) else (
goto argsdone
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
:argsdone
set ARG=%~1
if "%ARG%"=="" goto usage
"%WITHDLL%" /d:"%FAKER%" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto done
:usage
echo.
echo USAGE: %0 [options] ^<OpenGL app^> [OpenGL app arguments]
echo.
echo -fps ^<f^> : Limit client/server frame rate to ^<f^> frames/sec
echo +/-g : Enable/disable gamma correction
echo -gamma ^<g^>: Set gamma correction factor to ^<g^> (see docs)
echo +/-pr : Enable/disable performance profiling output (default: off)
echo +/-se : Turn on/off serialization (default: on)
echo Turning off serialization causes the compress thread and
echo readback/render thread to run in parallel, similarly to
echo VirtualGL for Unix. This can create resource contention
echo issues on slower systems.
echo +/-sp : Turn on/off frame spoiling (default: on)
echo Note that frame spoiling has no effect if serialization is
echo also enabled.
echo -st ^<s^> : left = Send only left eye buffer
echo right = Send only right eye buffer
echo rc = Use red/cyan (anaglyphic) stereo [default]
echo +/-tr : Enable/disable function call tracing (generates a lot of output)
echo +/-v : Enable/disable verbose VirtualGL messages
:done
endlocal