From 052e7242fe33ac02bd66485b328490a20a15919d Mon Sep 17 00:00:00 2001 From: Guido Ranzuglia Date: Fri, 14 Oct 2016 05:34:04 +0200 Subject: [PATCH] - fixed "glerror for 0 argument passed to glpointsize" bug --- wrap/gl/gl_mesh_attributes_multi_viewer_bo_manager.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wrap/gl/gl_mesh_attributes_multi_viewer_bo_manager.h b/wrap/gl/gl_mesh_attributes_multi_viewer_bo_manager.h index e084448e..d5a5125a 100644 --- a/wrap/gl/gl_mesh_attributes_multi_viewer_bo_manager.h +++ b/wrap/gl/gl_mesh_attributes_multi_viewer_bo_manager.h @@ -1664,12 +1664,11 @@ namespace vcg pointsize = glopts->_perpoint_pointsize; glPointSize(pointsize); } - + GLenum err; if (glopts->_perpoint_dot_enabled) { glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glColor(vcg::Color4b(vcg::Color4b::Black)); glDepthRange(0.0, 0.9999); glDepthFunc(GL_LEQUAL); glPointSize(glopts->_perpoint_pointsize + 0.5); @@ -1682,7 +1681,10 @@ namespace vcg if ((glopts != NULL) && (glopts->_perpoint_dot_enabled)) { - glPointSize(glopts->_perpoint_pointsize - 1); + float psize = 0.0001; + if ((glopts->_perpoint_pointsize - 1) > 0) + psize = (glopts->_perpoint_pointsize - 1); + glPointSize(psize); if (isBORenderingAvailable()) drawPointsBO(req); else @@ -1696,10 +1698,8 @@ namespace vcg size_t pointsnum = _mesh.VN(); if (InternalRendAtts::replicatedPipelineNeeded(_currallocatedboatt)) pointsnum = _mesh.FN() * 3; - updateClientState(req); glDrawArrays(GL_POINTS,0,GLsizei(pointsnum)); - /*disable all client state buffers*/ InternalRendAtts tmp; updateClientState(tmp);