Re: [osg-users] how do I make the light always hit the front of the camera?

2021-03-09 Thread newli...@gmail.com
Hi, Robert . First of all, thank you for your interest and answer. I'm rendering using osg::Light and osg::LightSource with a spotlight pointing down. The exact position is set using light->setPosition() The direction of the light is set with the code below. osg::vec3d world =world +

Re: [osg-users] Question about array binding

2021-03-09 Thread Robert Osfield
HI Werner, I can't think of think of reason that would cause a problem. It's quite a while since I look at the associated code so it might be simply that I've forgotten constraints. Have a look at the osg::Geometry::drawImplementation() to see if there is a constraint on vertex attributes

[osg-users] Question about array binding

2021-03-09 Thread Werner Modenbach
Hi all, I was hunting a long time for some strange effect. I discovered the reason but have some understanding issues. Why is Code 1 not working but code 2? I would prefer Code 1 because of less data. Code 1) (my original code is not working)         osg::ref_ptr osgVertexFlagsVector;        

Re: [osg-users] how do I make the light always hit the front of the camera?

2021-03-09 Thread Robert Osfield
Hi ? You don't say how you are rendering your present lights so providing guidance on how to adjust it isn't possible, you'll need to provide more information about your render system and what it relies upon for controlling the position and direction of the light. Also it's hard to understand