diff --git a/examples/SharedMemory/plugins/eglPlugin/eglRendererPlugin.cpp b/examples/SharedMemory/plugins/eglPlugin/eglRendererPlugin.cpp index aee061da9..1bcfc6341 100644 --- a/examples/SharedMemory/plugins/eglPlugin/eglRendererPlugin.cpp +++ b/examples/SharedMemory/plugins/eglPlugin/eglRendererPlugin.cpp @@ -69,6 +69,8 @@ PyInit_eglRenderer(void) initeglRenderer(void) #endif { +#if PY_MAJOR_VERSION >= 3 return 0; +#endif } #endif //EGL_ADD_PYTHON_INIT diff --git a/examples/pybullet/examples/eglRenderTest.py b/examples/pybullet/examples/eglRenderTest.py index 8adb64cb9..5e3143b80 100644 --- a/examples/pybullet/examples/eglRenderTest.py +++ b/examples/pybullet/examples/eglRenderTest.py @@ -4,7 +4,7 @@ import time import pkgutil egl = pkgutil.get_loader('eglRenderer') -p.connect(p.SHARED_MEMORY_SERVER) +p.connect(p.DIRECT) plugin = p.loadPlugin(egl.get_filename(), "_eglRendererPlugin") print("plugin=",plugin) @@ -37,4 +37,4 @@ while (p.isConnected()): #print("img_arr=",img_arr) -p.unloadPlugin(plugin) \ No newline at end of file +p.unloadPlugin(plugin) diff --git a/examples/pybullet/examples/testrender_egl.py b/examples/pybullet/examples/testrender_egl.py index 1f7fb00ae..0f0b89e03 100644 --- a/examples/pybullet/examples/testrender_egl.py +++ b/examples/pybullet/examples/testrender_egl.py @@ -66,14 +66,14 @@ while (1): #note that sending the data to matplotlib is really slow #reshape is not needed - #np_img_arr = np.reshape(rgb, (h, w, 4)) - #np_img_arr = np_img_arr*(1./255.) + np_img_arr = np.reshape(rgb, (h, w, 4)) + np_img_arr = np_img_arr*(1./255.) #show #plt.imshow(np_img_arr,interpolation='none',extent=(0,1600,0,1200)) #image = plt.imshow(np_img_arr,interpolation='none',animated=True,label="blah") - image.set_data(rgb)#np_img_arr) + image.set_data(np_img_arr) ax.plot([0]) #plt.draw() #plt.show()