Strange, thought the reply-to address was set from osg-users...this was what I accidentally sent to Robert only:

Hi Robert,

Thanks for your reply, I realize you're busy with 3.4.1 right now. But if you can find the time to look into this I have also attached a simple example reproducing the issue in code. Commenting in adding of the geode will hide the light points.

/Andreas


On 2017-08-18 11:12, Robert Osfield wrote:
Hi Andreas,

On 18 August 2017 at 08:30, Andreas Ekstrand <andreas.ekstr...@remograph.com <mailto:andreas.ekstr...@remograph.com>> wrote:

    Did someone manage to reproduce this problem? Any suggestions are
    welcome, I really don't understand what's happening here...


I haven't had a chance to test the issue yet. In the latest OSG there are rewrites of various parts of the OSG to move fully over to use vertex arrays and supporting VAO's, my guess is this work touched upon osgSim::LightPoint* functionality and introduced a regression, as to what this might be I can't say without reproduce the issue and investigating the related code.

In general the behaviour you describe sounds like vertex array state that is not being set up correctly so the values used by the driver are just the last ones to be set rather than the one intended.

Robert.


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

#include <map>

#include <osg/ref_ptr>
#include <osg/Vec3>
#include <osg/Vec4>
#include <osg/Group>
#include <osg/Geode>
#include <osg/Geometry>
#include <osgViewer/Viewer>
#include <osgSim/LightPoint>
#include <osgSim/LightPointNode>

int main(int argc, char **argv)
{
  osgViewer::Viewer viewer;
  osg::ref_ptr<osg::Group> topGroup = new osg::Group();

  osg::ref_ptr<osgSim::LightPointNode> lpNode = new osgSim::LightPointNode();
  lpNode->addLightPoint(osgSim::LightPoint(osg::Vec3(-10.0f, 0.0f, 0.0f), 
osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f)));
  lpNode->addLightPoint(osgSim::LightPoint(osg::Vec3(10.0f, 0.0f, 0.0f), 
osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f)));
  topGroup->addChild(lpNode);

  osg::ref_ptr<osg::Geode> geode = new osg::Geode();
  osg::ref_ptr<osg::Geometry> geometry = new osg::Geometry();
  osg::ref_ptr<osg::Vec3Array> vertices = new osg::Vec3Array();
  vertices->push_back(osg::Vec3(-1.0f, -1.0f, 0.0f));
  vertices->push_back(osg::Vec3(1.0f, -1.0f, 0.0f));
  vertices->push_back(osg::Vec3(1.0f, 1.0f, 0.0f));
  vertices->push_back(osg::Vec3(-1.0f, 1.0f, 0.0f));
  geometry->setVertexArray(vertices);
  geometry->addPrimitiveSet(new osg::DrawArrays(GL_QUADS, 0, 4));
  geode->addDrawable(geometry);
  //topGroup->addChild(geode);

  viewer.setSceneData(topGroup);
  viewer.realize();
  return viewer.run();
}
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to