[osg-users] picking behaviour using osgViewer::View::computeIntersections

2016-05-06 Thread Swanger, Glen T.
We are using the osgViewer::View::computeIntersections method to detect 
actionable elements in our scene as the mouse rolls over them in screen space 
so that we can highlight them for the user.  This works well in most cases, but 
for some geometry as you move the mouse over the same actionable element we may 
lose the intersection hit on that object; consequently, we remove the highlight 
from the object which leads to a confusing flashing effect for the user.  I ran 
our application in wireframe mode and saw that this problem occurs even if you 
move the mouse within the same triangle primitive.  I've made sure the window 
coordinates provided to the method are consistent with the mouse movement and 
I've logged the node paths for all the hits returned from this method to make 
sure I wasn't missing anything by looking at just the top most hit.  We 
compared our modeling techniques with geometry that doesn't result in this 
problem and nothing seems inconsistent.  Does anyone have an
  idea what might be causing this problem, or point us to something else we can 
look at.

Thanks,
Glen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Using multiples texture for a geometry

2016-05-06 Thread Florian GOLESTIN
Hi Robert,

I followed your suggestion and indeed the exported scenes seem different but I 
don't get this difference.

Please see in attachment for the source code and the exported scenes.

This source code create one drawable with two faces and two TextCoords buffers. 
The result is the same: if I apply the two texture it's dark. If I apply only 
one texture (either on the left or the right side) the unique texture is 
displayed correctly.

I've compared the .osgt scenes.
So there is obviously two 

Code:

Data 1 {
GL_TEXTURE_2D ON 
}




and two 

Code:

Data 1 {
osg::Texture2D {
UniqueID 4 
}
Value OFF 
}



Only one has a reference to the image but I think this is explained because the 
both have the same UniqueID.

And two

Code:

osg::Vec2Array {
UniqueID 11 
Binding BIND_PER_VERTEX 
vector 8 {
0 0 
0 0 
0 0 
0 0 
0 0 
0 1 
1 1 
1 0 
}
}



With different Textcoord as expected (this second part correspond to my right 
part).

I also tried to create two textures but no more chance.

I'm continuing investigating but I'm kind of stuck

Florian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67054#67054




Attachments: 
http://forum.openscenegraph.org//files/two_textures_115.osg
http://forum.openscenegraph.org//files/one_texture_359.osg
http://forum.openscenegraph.org//files/main_415.cpp


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


Re: [osg-users] OpenGL CoreProfile / error in on OS X

2016-05-06 Thread Florent Berthaut

Hi all,

Any feedback on that issue ?
Is there something I need to change in my code to get OpenGL > 3 with 
OpenSceneGraph on OS X ?


Regards,

Florent



Le 28/04/2016 18:21, Florent Berthaut a écrit :

Hi all,

I am trying to port my GNU/Linux project (with OSG 3.4.0) to OS X.
I first installed OSG with Macports.

However the glsl shaders do not compile with anything above version 
110, whereas i need at least version 3 and when available 4.2 (for 
image load store features).


I saw this post, which relates to the same issue (choosing OpenGL Core 
Profile instead of Compatibility profile):

http://forum.openscenegraph.org/viewtopic.php?t=9992=osx

It would seem that the issue has been fixed, but looking at the source 
code of OSG 3.4.0, 3.5.0 and 3.5.1, it does not seem that the correct 
calls have been added.
I tried adding them before recompiling OSG but then i get a bunch of 
errors.


If i change the shaders syntax and use version 110, in order to match 
compatibility profile on OSX, they compile but the application then 
crashes.

Here is backtrace of the crash :

0 com.apple.driver.AppleIntelHD4000GraphicsGLDriver 0x00010f85dd5c 
IntelVertexArray::setElemData(unsigned int, unsigned int, unsigned 
short, unsigned int) + 308
1   com.apple.driver.AppleIntelHD4000GraphicsGLDriver 
0x00010f85dc1a 
IntelVertexArray::extractState(GLDVertexArrayDataRec const*, unsigned 
long long) + 170
2   libGPUSupportMercury.dylib0x7fff92e075bb 
gpusLoadCurrentVertexArray + 195
3   com.apple.driver.AppleIntelHD4000GraphicsGLDriver 
0x00010f85b179 Gen7::updateDispatch(GLDContextRec*, 
GLDRenderDispatch*, unsigned int*) + 1393
4   GLEngine  0x7fff8ee5dad4 
gleDoDrawDispatchCore + 533
5   GLEngine  0x7fff8ee00636 
gleSetupAndDrawArraysOrElementsOutOfLine_ListExec + 886

6   GLEngine  0x7fff8ed8aa6a gleCallList + 170
7   libosgUtil.130.dylib  0x00010779085d 
osgUtil::RenderLeaf::render(osg::RenderInfo&, osgUtil::RenderLeaf*)



Is there something specific I need to do in my code in order to 
activate the OpenGL Core Profile ?



Thanks in advance,

Regards,

Florent


--
http://hitmuri.net


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



--
http://hitmuri.net

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