diff --git a/btgui/OpenGLWindow/CommonRenderInterface.h b/btgui/OpenGLWindow/CommonRenderInterface.h index 6cc62f6bc..58bb42c23 100644 --- a/btgui/OpenGLWindow/CommonRenderInterface.h +++ b/btgui/OpenGLWindow/CommonRenderInterface.h @@ -43,6 +43,7 @@ struct CommonRenderInterface virtual void drawLine(const float from[4], const float to[4], const float color[4], float lineWidth) = 0; virtual void drawLine(const double from[4], const double to[4], const double color[4], double lineWidth) = 0; virtual void drawPoint(const float* position, const float color[4], float pointDrawSize)=0; + virtual void drawPoint(const double* position, const double color[4], double pointDrawSize)=0; virtual int registerShape(const float* vertices, int numvertices, const int* indices, int numIndices,int primitiveType=B3_GL_TRIANGLES, int textureIndex=-1)=0; virtual void updateShape(int shapeIndex, const float* vertices)=0; diff --git a/btgui/OpenGLWindow/GLInstancingRenderer.cpp b/btgui/OpenGLWindow/GLInstancingRenderer.cpp index 6eb62a5cf..58aed9646 100644 --- a/btgui/OpenGLWindow/GLInstancingRenderer.cpp +++ b/btgui/OpenGLWindow/GLInstancingRenderer.cpp @@ -1339,10 +1339,19 @@ void GLInstancingRenderer::renderScene() } + +void GLInstancingRenderer::drawPoint(const double* position, const double color[4], double pointDrawSize) +{ + float pos[4]={position[0],position[1],position[2],0}; + float clr[4] = {color[0],color[1],color[2],color[3]}; + drawPoints(pos,clr,1,3*sizeof(float),float(pointDrawSize)); +} + void GLInstancingRenderer::drawPoint(const float* positions, const float color[4], float pointDrawSize) { drawPoints(positions,color,1,3*sizeof(float),pointDrawSize); } + void GLInstancingRenderer::drawPoints(const float* positions, const float color[4], int numPoints, int pointStrideInBytes, float pointDrawSize) { diff --git a/btgui/OpenGLWindow/GLInstancingRenderer.h b/btgui/OpenGLWindow/GLInstancingRenderer.h index 27e26faf8..68880093d 100644 --- a/btgui/OpenGLWindow/GLInstancingRenderer.h +++ b/btgui/OpenGLWindow/GLInstancingRenderer.h @@ -104,6 +104,7 @@ public: virtual void drawLines(const float* positions, const float color[4], int numPoints, int pointStrideInBytes, const unsigned int* indices, int numIndices, float pointDrawSize); virtual void drawPoints(const float* positions, const float color[4], int numPoints, int pointStrideInBytes, float pointDrawSize); virtual void drawPoint(const float* position, const float color[4], float pointSize=1); + virtual void drawPoint(const double* position, const double color[4], double pointDrawSize=1); virtual void updateCamera(int upAxis=1); virtual void getCameraPosition(float cameraPos[4]);