mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 13:50:04 +00:00
adb5c049c7
Rename tinyRenderer -> eglRenderer in the eglRendererPlugin. Allow to run the eglRendererPlugin to run on Windows (not in EGL mode but Win32OpenGLWindow mode) Here is a script I tested on Windows: ~~~~~~~~~~~~ mport pybullet as p import time p.connect(p.DIRECT) plugin = p.loadPlugin("e:/develop/bullet3/bin/pybullet_eglRendererPlugin_vs2010_x64_debug.dll","_eglRendererPlugin") print("plugin=",plugin) p.setGravity(0,0,-10) p.loadURDF("plane.urdf",[0,0,-1]) p.loadURDF("r2d2.urdf") pixelWidth = 320 pixelHeight = 220 while (1): p.stepSimulation() viewMatrix = [1.0, 0.0, -0.0, 0.0, -0.0, 0.1736481785774231, -0.9848078489303589, 0.0, 0.0, 0.9848078489303589, 0.1736481785774231, 0.0, -0.0, -5.960464477539063e-08, -4.0, 1.0] projectionMatrix = [1.0825318098068237, 0.0, 0.0, 0.0, 0.0, 1.732050895690918, 0.0, 0.0, 0.0, 0.0, -1.0002000331878662, -1.0, 0.0, 0.0, -0.020002000033855438, 0.0] #img_arr = p.getCameraImage(pixelWidth, pixelHeight, viewMatrix,projectionMatrix, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL) img_arr = p.getCameraImage(pixelWidth, pixelHeight, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL) #print("img_arr=",img_arr) time.sleep(1) ~~~~~~~~~~~~~
29 lines
1.5 KiB
Batchfile
29 lines
1.5 KiB
Batchfile
IF NOT EXIST bin mkdir bin
|
|
IF NOT EXIST bin\openvr_api.dll copy examples\ThirdPartyLibs\openvr\bin\win32\openvr_api.dll bin
|
|
IF NOT EXIST bin\openvr64pi.dll copy examples\ThirdPartyLibs\openvr\bin\win64\openvr_api.dll bin\openvr64pi.dll
|
|
|
|
#aargh, see https://github.com/ValveSoftware/openvr/issues/412
|
|
|
|
|
|
#find a python version (hopefully just 1) and use this
|
|
dir c:\python* /b /ad > tmp1234.txt
|
|
|
|
set /p myvar1= < tmp1234.txt
|
|
set myvar=c:/%myvar1%
|
|
del tmp1234.txt
|
|
|
|
rem you can also override and hardcode the Python path like this (just remove the # hashmark in next line)
|
|
rem SET myvar=c:\python-3.5.2
|
|
|
|
cd build3
|
|
|
|
|
|
premake4 --double --enable_multithreading --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
|
|
|
|
rem premake4 --double --enable_multithreading --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../binserver" vs2010
|
|
rem premake4 --double --enable_grpc --enable_multithreading --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../binserver" vs2010
|
|
rem premake4 --serial --audio --double --midi --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010
|
|
|
|
start vs2010
|
|
|