We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The points drawn using the same code in osgqt are square, while the points drawn using the window created by osg's built - in functions are round.
osg::ref_ptrosg::Node createPoint() { osg::ref_ptrosg::Group root = new osg::Group; osg::ref_ptrosg::Geode geode = new osg::Geode; root->addChild(geode); osg::ref_ptrosg::Geometry geometry = new osg::Geometry; geode->addDrawable(geometry); osg::ref_ptrosg::Vec3Array vertices = new osg::Vec3Array; vertices->push_back(osg::Vec3(30.0f, 30.0f, 30.0f)); geometry->setVertexArray(vertices); geometry->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POINTS, 0, vertices->size()));
osg::ref_ptr<osg::Vec4Array> colors = new osg::Vec4Array; colors->push_back(osg::Vec4(255.0f, 1.0f, 0.0f, 1.0f)); geometry->setColorArray(colors, osg::Array::BIND_OVERALL); osg::ref_ptr<osg::StateSet> stateSet = geode->getOrCreateStateSet(); stateSet->setMode(GL_POINT_SMOOTH, osg::StateAttribute::ON); stateSet->setMode(GL_BLEND, osg::StateAttribute::ON); osg::ref_ptr<osg::BlendFunc> blendFunc = new osg::BlendFunc; blendFunc->setFunction(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); stateSet->setAttributeAndModes(blendFunc, osg::StateAttribute::ON); osg::ref_ptr<osg::Point> point = new osg::Point; point->setSize(30.0f); stateSet->setAttributeAndModes(point, osg::StateAttribute::ON); return root;
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The points drawn using the same code in osgqt are square, while the points drawn using the window created by osg's built - in functions are round.
osg::ref_ptrosg::Node createPoint()
{
osg::ref_ptrosg::Group root = new osg::Group;
osg::ref_ptrosg::Geode geode = new osg::Geode;
root->addChild(geode);
osg::ref_ptrosg::Geometry geometry = new osg::Geometry;
geode->addDrawable(geometry);
osg::ref_ptrosg::Vec3Array vertices = new osg::Vec3Array;
vertices->push_back(osg::Vec3(30.0f, 30.0f, 30.0f));
geometry->setVertexArray(vertices);
geometry->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POINTS, 0, vertices->size()));
}
The text was updated successfully, but these errors were encountered: