Antichamber 在 Linux 上运行良好(Steam 版本)。但目前还不能在 Oculus Rift 上玩。
问题是:1)没有头部追踪 2)图形没有被 Oculus SDK 分割和扭曲
我目前的计划是使用 LD_PRELOAD 来添加功能,这似乎是 Linux 版的 DLL 注入。Antichamber 似乎在使用 SDL,我希望可以将其配置为使用头部跟踪数据作为操纵杆并应用图形失真,但我不确定我应该寻找哪些功能。
有没有更简单的方法来解决这些问题?SDL 是正确的选择吗?
如果能提供有关虚幻引擎 3 在 Linux 下如何运行以及库注入的任何信息,我将非常感激。
编辑:
这是我目前掌握的信息,仍然不确定我应该寻找哪些功能(不熟悉 SDL 或 OpenGL):
有关 LD_PRELOAD 和共享对象注入的文章;这里和这里
Antichamber(steam 版本)目录为:~/.steam/steam/SteamApps/common/Antichamber
可执行文件位于:Antichamber/Binaries/Linux/UDKGame-Linux
必须安装 libvorbisfile3:i386 才能从命令行运行可执行文件。(Steam 无需安装此文件即可启动游戏)
$ldd UDKGame-Linux
linux-gate.so.1 => (0xf775d000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7716000)
libSDL2_mixer-2.0.so.0 => /home/workstation/.steam/steam/SteamApps/common/Antichamber/Binaries/Linux/./lib/libSDL2_mixer-2.0.so.0 (0xf76d0000)
libogg.so.0 => /usr/lib/i386-linux-gnu/libogg.so.0 (0xf76c6000)
libvorbis.so.0 => /usr/lib/i386-linux-gnu/libvorbis.so.0 (0xf769a000)
libvorbisfile.so.3 => /usr/lib/i386-linux-gnu/libvorbisfile.so.3 (0xf7690000)
libSDL2-2.0.so.0 => /home/workstation/.steam/steam/SteamApps/common/Antichamber/Binaries/Linux/./lib/libSDL2-2.0.so.0 (0xf75a7000)
libGL.so.1 => /usr/lib32/nvidia-331-updates/libGL.so.1 (0xf74a3000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf749d000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf7494000)
libsteam_api.so => /home/workstation/.steam/steam/SteamApps/common/Antichamber/Binaries/Linux/./lib/libsteam_api.so (0xf7481000)
libtcmalloc.so.0 => /home/workstation/.steam/steam/SteamApps/common/Antichamber/Binaries/Linux/./lib/libtcmalloc.so.0 (0xf7424000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf733b000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf72f4000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf72d7000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7127000)
/lib/ld-linux.so.2 (0xf775e000)
libnvidia-tls.so.331.38 => /usr/lib32/nvidia-331-updates/tls/libnvidia-tls.so.331.38 (0xf7123000)
libnvidia-glcore.so.331.38 => /usr/lib32/nvidia-331-updates/libnvidia-glcore.so.331.38 (0xf4edf000)
libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf4daa000)
libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xf4d97000)
libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf4d75000)
libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf4d71000)
libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf4d6a000)
$ nm -Du UDKGame-Linux
U abort
U accept
U access
U __assert_fail
U backtrace
U bind
U chdir
U close
U closedir
U connect
U __ctype_b_loc
U __ctype_toupper_loc
U __cxa_atexit
U __cxa_begin_catch
U __cxa_call_unexpected
U __cxa_end_catch
U __cxa_guard_abort
U __cxa_guard_acquire
U __cxa_guard_release
U __cxa_pure_virtual
U difftime
U __divdi3
U dlclose
U dlerror
U dlopen
U dlsym
U __errno_location
U fclose
U fcntl
U feof
U ferror
U fflush
U fgets
U __finitef
U fopen
U fprintf
U fputc
U fread
U free
U frexp
U fseek
U ftell
U fwrite
U __fxstat
U getcwd
U getenv
U gethostname
U getifaddrs
U getpid
U getsockname
U getsockopt
U gettimeofday
U glAlphaFunc
U glBegin
U glBindTexture
U glBlendFunc
U glClear
U glClearColor
U glClearDepth
U glClearStencil
U glColorMask
U glCullFace
U glDeleteTextures
U glDepthFunc
U glDepthMask
U glDepthRange
U glDisable
U glDrawArrays
U glDrawBuffer
U glEnable
U glEnd
U glGenTextures
U glGetIntegerv
U glGetString
U glPixelStorei
U glPolygonMode
U glPolygonOffset
U glReadBuffer
U glReadPixels
U glScissor
U glStencilFunc
U glStencilMask
U glStencilOp
U glTexCoord2f
U glTexEnvf
U glTexImage2D
U glTexParameteri
U glTexSubImage2D
U glVertex2f
U glViewport
U glXGetClientString
U glXGetProcAddressARB
U glXQueryVersion
w __gmon_start__
U gmtime
U gmtime_r
U __gxx_personality_v0
U inet_addr
U ioctl
U isalnum
U isalpha
U __isinff
U __isnanf
U isspace
U iswpunct
w _Jv_RegisterClasses
U __libc_start_main
U listen
U localtime_r
U lseek
U malloc
U memcmp
U memcpy
U memmove
U memset
U MinorityMix_SetPosition
U mkdir
U __moddi3
U open
U opendir
U ov_clear
U ov_info
U ov_open_callbacks
U ov_pcm_seek_page
U ov_pcm_total
U ov_read
U ov_time_total
U pause
U powf
U printf
U pthread_cond_broadcast
U pthread_cond_destroy
U pthread_cond_init
U pthread_cond_signal
U pthread_cond_timedwait
U pthread_cond_wait
U pthread_create
U pthread_detach
U pthread_getspecific
U pthread_key_create
U pthread_key_delete
U pthread_mutexattr_init
U pthread_mutexattr_settype
U pthread_mutex_destroy
U pthread_mutex_init
U pthread_mutex_lock
U pthread_mutex_unlock
U pthread_self
U pthread_setspecific
U qsort
U rand
U read
U readdir
U realloc
U recv
U recvfrom
U rename
U rmdir
U sched_yield
U SDL_BuildAudioCVT
U SDL_ClearError
U SDL_CloseAudio
U SDL_ConvertAudio
U SDL_ConvertSurfaceFormat
U SDL_CreateRGBSurface
U SDL_CreateTextureFromSurface
U SDL_CreateWindow
U SDL_DestroyWindow
U SDL_Error
U SDL_FillRect
U SDL_free
U SDL_FreeSurface
U SDL_GameControllerClose
U SDL_GameControllerOpen
U SDL_GetClosestDisplayMode
U SDL_GetDesktopDisplayMode
U SDL_GetDisplayMode
U SDL_GetError
U SDL_GetKeyboardFocus
U SDL_GetNumDisplayModes
U SDL_GetNumVideoDisplays
U SDL_GetPrefPath
U SDL_GetWindowDisplayIndex
U SDL_GetWindowSize
U SDL_GL_CreateContext
U SDL_GL_DeleteContext
U SDL_GL_MakeCurrent
U SDL_GL_SetAttribute
U SDL_GL_SwapWindow
U SDL_Init
U SDL_IsGameController
U SDL_isspace
U SDL_LockAudioDevice
U SDL_malloc
U SDL_memcmp
U SDL_memcpy
U SDL_memset
U SDL_MixAudioFormat
U SDL_NumJoysticks
U SDL_OpenAudioDevice
U SDL_PauseAudioDevice
U SDL_PollEvent
U SDL_PushEvent
U SDL_Quit
U SDL_ReadBE32
U SDL_ReadLE16
U SDL_ReadLE32
U SDL_realloc
U SDL_RWFromFile
U SDL_SetColorKey
U SDL_SetError
U SDL_SetHint
U SDL_SetMainReady
U SDL_SetWindowGrab
U SDL_SetWindowIcon
U SDL_ShowCursor
U SDL_snprintf
U SDL_sscanf
U SDL_strcmp
U SDL_strncasecmp
U SDL_strncmp
U SDL_UnlockAudioDevice
U SDL_UpperBlit
U SDL_WarpMouseInWindow
U select
U send
U sendto
U setsockopt
U snprintf
U socket
U sprintf
U srand
U sscanf
U SteamAPI_Init
U SteamAPI_RegisterCallback
U SteamAPI_RegisterCallResult
U SteamAPI_RestartAppIfNecessary
U SteamAPI_RunCallbacks
U SteamAPI_Shutdown
U SteamAPI_UnregisterCallback
U SteamAPI_UnregisterCallResult
U SteamApps
U SteamFriends
U SteamGameServer
U SteamGameServer_BSecure
U SteamGameServer_GetSteamID
U SteamGameServer_Init
U SteamGameServerNetworking
U SteamGameServer_RunCallbacks
U SteamGameServer_Shutdown
U SteamGameServerStats
U SteamGameServerUtils
U SteamMatchmaking
U SteamMatchmakingServers
U SteamNetworking
U SteamRemoteStorage
U SteamUser
U SteamUserStats
U SteamUtils
U stpcpy
U strcasecmp
U strchr
U strcmp
U strcpy
U strdup
U strlen
U strncat
U strncmp
U strncpy
U strrchr
U strstr
U strtod
U strtol
U swscanf
U time
U tolower
U toupper
U towupper
U __umoddi3
U unlink
U _Unwind_Resume
U usleep
U utimes
U vsnprintf
U vsprintf
U vswprintf
U wcscat
U wcschr
U wcscmp
U wcscpy
U wcslen
U wcsncmp
U wcsncpy
U wcsrchr
U wcsstr
U wcstod
U wcstoul
U wcstoull
U wprintf
U write
U __xstat
U _ZSt9terminatev