- fixed "glerror for 0 argument passed to glpointsize" bug
This commit is contained in:
parent
20fa52181f
commit
052e7242fe
|
|
@ -1664,12 +1664,11 @@ namespace vcg
|
||||||
pointsize = glopts->_perpoint_pointsize;
|
pointsize = glopts->_perpoint_pointsize;
|
||||||
glPointSize(pointsize);
|
glPointSize(pointsize);
|
||||||
}
|
}
|
||||||
|
GLenum err;
|
||||||
if (glopts->_perpoint_dot_enabled)
|
if (glopts->_perpoint_dot_enabled)
|
||||||
{
|
{
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
glColor(vcg::Color4b(vcg::Color4b::Black));
|
|
||||||
glDepthRange(0.0, 0.9999);
|
glDepthRange(0.0, 0.9999);
|
||||||
glDepthFunc(GL_LEQUAL);
|
glDepthFunc(GL_LEQUAL);
|
||||||
glPointSize(glopts->_perpoint_pointsize + 0.5);
|
glPointSize(glopts->_perpoint_pointsize + 0.5);
|
||||||
|
|
@ -1682,7 +1681,10 @@ namespace vcg
|
||||||
|
|
||||||
if ((glopts != NULL) && (glopts->_perpoint_dot_enabled))
|
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())
|
if (isBORenderingAvailable())
|
||||||
drawPointsBO(req);
|
drawPointsBO(req);
|
||||||
else
|
else
|
||||||
|
|
@ -1696,10 +1698,8 @@ namespace vcg
|
||||||
size_t pointsnum = _mesh.VN();
|
size_t pointsnum = _mesh.VN();
|
||||||
if (InternalRendAtts::replicatedPipelineNeeded(_currallocatedboatt))
|
if (InternalRendAtts::replicatedPipelineNeeded(_currallocatedboatt))
|
||||||
pointsnum = _mesh.FN() * 3;
|
pointsnum = _mesh.FN() * 3;
|
||||||
|
|
||||||
updateClientState(req);
|
updateClientState(req);
|
||||||
glDrawArrays(GL_POINTS,0,GLsizei(pointsnum));
|
glDrawArrays(GL_POINTS,0,GLsizei(pointsnum));
|
||||||
|
|
||||||
/*disable all client state buffers*/
|
/*disable all client state buffers*/
|
||||||
InternalRendAtts tmp;
|
InternalRendAtts tmp;
|
||||||
updateClientState(tmp);
|
updateClientState(tmp);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue