fix setup.py to work better on Windows and Linux (with default eglPlugin static built-in,

just use pybullet.loadPlugin("eglRendererPlugin") before loading/creating any objects.
use end/startRendering (swap buffers) before the rendering in the eglPlugin
This commit is contained in:
bla
2018-09-09 22:58:08 -07:00
parent 9698c3d600
commit 8f711462e0
5 changed files with 26 additions and 49 deletions

View File

@@ -38,8 +38,13 @@ subject to the following restrictions:
#include "OpenGLWindow/Win32OpenGLWindow.h"
typedef Win32OpenGLWindow DefaultOpenGLWindow;
#else
#ifdef BT_USE_EGL
#include "OpenGLWindow/EGLOpenGLWindow.h"
typedef EGLOpenGLWindow DefaultOpenGLWindow;
#else
#include "OpenGLWindow/X11OpenGLWindow.h"
typedef X11OpenGLWindow DefaultOpenGLWindow;
#endif
#endif
#include "OpenGLWindow/GLInstancingRenderer.h"
@@ -935,6 +940,8 @@ void EGLRendererVisualShapeConverter::clearBuffers(TGAColor& clearColor)
void EGLRendererVisualShapeConverter::render()
{
m_data->m_window->endRendering();
m_data->m_window->startRendering();
/*
ATTRIBUTE_ALIGNED16(float viewMat[16]);
ATTRIBUTE_ALIGNED16(float projMat[16]);
@@ -956,8 +963,6 @@ void EGLRendererVisualShapeConverter::render()
m_data->m_instancingRenderer->updateCamera(m_data->m_upAxis);
m_data->m_instancingRenderer->renderScene();
m_data->m_window->endRendering();
m_data->m_window->startRendering();
}