[osg-users] Missing Text

2017-04-13 Thread Théo Nassour
Hi,

Anyone knows why do i have missing text in my osgText ? 
I have both HUD objects and Text in the Scene

Thank you!

Cheers,
Théo

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




Attachments: 
http://forum.openscenegraph.org//files/3d_680.png


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


[osg-users] Offline screen render without pbuffer on virtual machine

2017-02-14 Thread Théo Nassour
Hi,

I have an application, that renders offline, and the rendered result is 
displayed by WPF control, copying osg::Image to System.ImageControl (c#).

Using the application on a normal PC, every thing was going well, till i wanted 
to test the application on VirtualBox, and VMWare. And getting either nothing 
or a complete crashes.

I Debigged the application and i noticed on the VM, the graphic context is not 
created, cause is need : PixelBufferWin32, which it needs WGLExtensions, which 
it need wglCreatePbufferARB. 
wglCreatePbufferARB :(WGL_ARB_pbuffer) is not supported by OpenGL for VM. I 
tried : VirtualBox with OpenGL 2.1 and VMWare with OpenGL 3.1.

Any suggestions ?

Thank you!

Cheers,
Théo

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





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


Re: [osg-users] Heap Corruption

2017-01-11 Thread Théo Nassour
Hello Heitbrink,

I'll try you're solution, and then i ll tell you ,
Thanks


d_a_heitbrink wrote:
> What threading model are you using?
> 
> One thing you need to be conscious of is when you update/modify your 
> scenegraph and who is using it at that time. Some operations might better be 
> served using different callback mechanisms, such as using 
> viewer->addUpdateOperation.
> 
> You might try switching your threading model to single threaded, and see if 
> that improves/ or changes the situation. This may or may be related to the 
> issue, heap corruption errors are notoriously difficult to debug.
> 
> Also keep in mind when you get a heap corruption exception, what is happening 
> behind the scenes is typically for debug builds every X number of heap 
> operations, the CRT will check the consistency of the heap. If it fails then, 
> it throws a exception. Often the location of what corrupts the memory is not 
> related to where it is detected. You can use:
> 
> _CrtSetDbgFlag
> _CrtCheckMemory
> 
> To have some control over when and how often the CRT checks the heap. If you 
> are really aggressive about this, this will totally kill performance.


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





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


Re: [osg-users] Heap Corruption

2017-01-11 Thread Théo Nassour
Hello Bruno,
 How to provide a deallocator ?
Thanks in advance

Bruno Oliveira wrote:
> Another possibility is that your code is allocating and deallocating memory 
> in separate module DLLs. However, in Windows, each DLL has separate memory 
> spaces and that cannot be done.
> 
> 
> You should check if that's the case by any reason (e.g. creating a 
> osg::ref_ptr in a dll of your own and allowing osg::ref_ptr to be deallocaed 
> automatically by another dll module).
> 
> This is solved by providing proper deallocators.
> 
> 
> 2017-01-10 12:04 GMT+00:00 Voerman, L. < ()>:
> 
> > Hi Théo,I think you basically found out that the osg notify system is not 
> > thread safe, the call to osg::Notify from 
> > osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Drawable & drawable) 
> > Line 1036    C++
> > 
> >     OSG_NOTICE<<"CullVisitor::apply(Geode&) detected NaN,"
> > is probably running in parallel with a different thread calling osg::Notify 
> > as well while triggering a resize of the buffer (too). 
> > Setting OSG_NOTIFY_LEVEL=WARN will probably avoid this crash.
> > 
> > 
> > Regards, Laurens.
> > 
> > 
> > On Tue, Jan 10, 2017 at 12:39 PM, Alberto Luaces < ()> wrote:
> > 
> > > Ok, the next I would do is to see what is OSG trying to print in this
> > > stack frame (the ninth from the beginning):
> > > 
> > >      osg130-osgUtild.dll!std::operator<< 
> > > >(std::basic_ostream > & _Ostr, const char * 
> > > _Val) Line 806    C++
> > > 
> > > maybe that could serve as a hint...
> > > 
> > > --
> > > Alberto
> > > 
> > > ___
> > > osg-users mailing list
> > >  ()
> > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> > 
> > 
> > ___
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> > 
> 
> 
>  --
> Post generated by Mail2Forum


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





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


Re: [osg-users] Heap Corruption

2017-01-10 Thread Théo Nassour
Hi every one, and thanks for you're replies,

I am sorry Bruno but, i havent understood what you Said. Can you explain more 
please :

> Another possibility is that your code is allocating and deallocating memory 
> in separate module DLLs. However, in Windows, each DLL has separate memory 
> spaces and that cannot be done. 
> 
> 
> You should check if that's the case by any reason (e.g. creating a 
> osg::ref_ptr in a dll of your own and allowing osg::ref_ptr to be deallocaed 
> automatically by another dll module). 
> 
> This is solved by providing proper deallocators. 
> 


And Voerman 
Thanks and will disable All osg notify in this case, cause we are using commong 
logging from Nugget packages.


Thank you!

Cheers,
Théo

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





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


Re: [osg-users] Heap Corruption

2017-01-10 Thread Théo Nassour
Hi,

Yes in fact this is one of my libraries, and it is in Debug x64, and i have 
checked : 
/MDd also


Thank you!

Cheers,
Théo

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





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


[osg-users] Heap Corruption

2017-01-10 Thread Théo Nassour
Hi,

I am working on an application with the current configuration : 
WPF, CLI/C++ (for the communication between c++ and c#), c++ for OSG.
I am using VS2015 C++11.

I am getting always Heap Corruption Exception :
Here is the Stack trace:

 ucrtbased.dll!_calloc_base()Unknown
 ucrtbased.dll!_free_dbg()Unknown
 osg130-osgd.dll!operator delete(void * block) Line 21C++
 osg130-osgd.dll!std::_Deallocate(void * _Ptr, unsigned __int64 _Count, 
unsigned __int64 _Sz) Line 139C++
 osg130-osgd.dll!std::allocator::deallocate(char * _Ptr, unsigned 
__int64 _Count) Line 639C++
 
osg130-osgd.dll!std::basic_stringbuf,std::allocator
 >::overflow(int _Meta) Line 182C++
 msvcp140d.dll!std::basic_streambuf 
>::xsputn(const char * _Ptr, __int64 _Count) Line 411C++
 msvcp140d.dll!std::basic_streambuf 
>::sputn(const char * _Ptr, __int64 _Count) Line 209C++
 osg130-osgUtild.dll!std::operator<< 
>(std::basic_ostream > & _Ostr, const char * _Val) 
Line 806C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Drawable & drawable) 
Line 1036C++
 osg130-osgd.dll!osg::NodeVisitor::apply(osg::Geometry & drawable) Line 92  
  C++
 osg130-osgd.dll!osg::Geometry::accept(osg::NodeVisitor & nv) Line 39C++
 osg130-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv) Line 63C++
 osg130-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node) Line 189
C++
 
osg130-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node
 & node) Line 322C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Geode & node) Line 
974C++
 osg130-osgd.dll!osg::Geode::accept(osg::NodeVisitor & nv) Line 37C++
 osg130-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv) Line 63C++
 osg130-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node) Line 189
C++
 
osg130-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node
 & node) Line 322C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Transform & node) 
Line 1247C++
 osg130-osgd.dll!osg::NodeVisitor::apply(osg::MatrixTransform & node) Line 
157C++
 osg130-osgd.dll!osg::MatrixTransform::accept(osg::NodeVisitor & nv) Line 
37C++
 osg130-osgd.dll!osg::Switch::traverse(osg::NodeVisitor & nv) Line 41C++
 osg130-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node) Line 189
C++
 
osg130-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node
 & node) Line 322C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & node) Line 
1224C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Switch & node) Line 
1315C++
>SICLAV.OsgRendering.dll!SICLAV::nodes::Tree3D::accept(osg::NodeVisitor & 
> nv) Line 31C++
 osg130-osgd.dll!osg::Switch::traverse(osg::NodeVisitor & nv) Line 41C++
 osg130-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node) Line 189
C++
 
osg130-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node
 & node) Line 322C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & node) Line 
1224C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Switch & node) Line 
1315C++
 osg130-osgd.dll!osg::Switch::accept(osg::NodeVisitor & nv) Line 40C++
 osg130-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv) Line 63C++
 osg130-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node) Line 189
C++
 
osg130-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node
 & node) Line 322C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Transform & node) 
Line 1247C++
 osg130-osgd.dll!osg::NodeVisitor::apply(osg::MatrixTransform & node) Line 
157C++
 osg130-osgd.dll!osg::MatrixTransform::accept(osg::NodeVisitor & nv) Line 
37C++
 osg130-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv) Line 63C++
 osg130-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node) Line 189
C++
 
osg130-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node
 & node) Line 322C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Transform & node) 
Line 1247C++
 osg130-osgd.dll!osg::NodeVisitor::apply(osg::MatrixTransform & node) Line 
157C++
 osg130-osgd.dll!osg::MatrixTransform::accept(osg::NodeVisitor & nv) Line 
37C++
 osg130-osgd.dll!osg::Switch::traverse(osg::NodeVisitor & nv) Line 41C++
 osg130-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node) Line 189
C++
 
osg130-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node
 & node) Line 322C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group & node) Line 
1224C++
 osg130-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Switch & node) Line 
1315C++
 SICLAV.OsgRendering.dll!

[osg-users] Multi touch with WPF

2016-06-27 Thread Théo Nassour
Hi,

I want to know if Someone has an exemple of making osg Multi-touch work under a 
WPF control ?

Thank you!

Cheers,
Théo

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





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


Re: [osg-users] osgFX::Outline and Stencil

2016-06-27 Thread Théo Nassour
Hi,

Thank you i found the solution, I had a ClearNode in the scene with the wrong 
setClearMask()

Thank you!

Cheers,
Théo

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





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


[osg-users] osgUtil::PlaneIntersector and Invalid Pointer and Tesselation Error

2016-06-23 Thread Théo NASSOUR
Hi,

I am using plane intersection to get the intersection of all meshes in my scene 
with a plane.  :

Code:

osg::ref_ptr intersector = new 
osgUtil::PlaneIntersector(mIntersectionPlane);

intersector->setRecordHeightsAsAttributes(true);
intersector->setPrecisionHint(osgUtil::PlaneIntersector::PrecisionHint::USE_DOUBLE_CALCULATIONS);

osgUtil::IntersectionVisitor mIntersectionVisitor; // Defined as a member 
usually

mIntersectionVisitor.reset();
mIntersectionVisitor.setTraversalMask(utils::MASK_SCENE_DATA);
mIntersectionVisitor.setIntersector(intersector.get());

view->getSceneData()->accept(mIntersectionVisitor);

osgUtil::PlaneIntersector::Intersections& intersections = 
intersector->getIntersections();




and in another function : i am computing the corresponding geode to the 
intersections:


Code:

inline osg::ref_ptr getSlice(const 
osgUtil::PlaneIntersector::Intersections & intersections)
{
osg::ref_ptr geode = new osg::Geode;
osg::ref_ptr geometry = new osg::Geometry;
osgUtil::Tessellator tessellator;

// set the normal in the same way color.
osg::ref_ptr normals = new osg::Vec3Array;
// Compute Vertices
osg::ref_ptr vertices = new osg::Vec3Array;

for (const auto& intersection : intersections)
{
  for (const auto& vertex : intersection.polyline)
  {
  vertices->push_back(vertex);
  normals->push_back(osg::Vec3(0.0f, 0.0f, 1.0f));
  }
  vertices->push_back(*intersection.polyline.begin());
  normals->push_back(osg::Vec3(0.0f, 0.0f, 1.0f));
  vertices->push_back(*intersections.begin()->polyline.begin());
  normals->push_back(osg::Vec3(0.0f, 0.0f, 1.0f));
}

geometry->setVertexArray(vertices);
geometry->setNormalArray(normals, osg::Array::BIND_OVERALL);
geometry->addPrimitiveSet(new osg::DrawArrays(GL_POLYGON, 0, vertices->size()));

tessellator.setWindingType(osgUtil::Tessellator::WindingType::TESS_WINDING_NONZERO);
tessellator.setTessellationType(osgUtil::Tessellator::TESS_TYPE_GEOMETRY);
tessellator.retessellatePolygons(*geometry);

geode->addDrawable(geometry.get());
geode->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::ON);

return geode.get();
}




Now : 
My first Problem is : Somtimes thee last element in the NodePath of 
Intersections in the intersection is an invalid pointer, I don't Know why.

My Secend Problem is : Somtimes when i have meshes with Holes, the Holes are 
not Computed, all the mesh is filled.

Thank you!

Cheers,
Théo

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





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


[osg-users] osgFX::Outline and Stencil

2016-06-23 Thread Théo NASSOUR
Hi,

I have Two views in my scene, both of them are in a Composite Viewer. I have 
added the outline to the truck, and then i have added the truck to my scene. 
Why only under the viewport of the cube i have the outline.

Here is a part of my code, and i have attached an image of the result

///OSG Scene : View
osg::ref_ptr mView;
osg::ref_ptr mCubeView;
///OSG Scene : Viewer
osg::ref_ptr mViewer;

...

osg::ref_ptr ds = osg::DisplaySettings::instance();
ds->setMinimumNumStencilBits(8);
mView->getCamera()->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | 
GL_STENCIL_BUFFER_BIT);
mView->getCamera()->setClearStencil(0);
mView->getCamera()->setViewport(new osg::Viewport(0, 0, mTraits->width, 
mTraits->height));
mViewer->addView(mView.get());
mCubeView->getCamera()->setClearMask(GL_DEPTH_BUFFER_BIT | 
GL_STENCIL_BUFFER_BIT);
mCubeView->getCamera()->setRenderOrder(osg::Camera::POST_RENDER);
mCubeView->getCamera()->setClearStencil(0);
mCubeView->getCamera()->setViewport(new osg::Viewport((mTraits->width - 175), 
(mTraits->height - 175), 150, 150,));
mViewer->addView(mCubeView.get());
...
mView->setSceneData(mSceneData.get());
...

{
osg::ref_ptr outlineModel = 
osgDB::readNodeFile("D:\\Data\\New_Test\\OpenSceneGraph-3.4.0\\OpenSceneGraph\\build\\x64\\bin\\dumptruck.osgt");
// create outline effect
osg::ref_ptr outline = new osgFX::Outline;
mSceneData->addChild(outline.get());
outline->setWidth(8);
outline->setColor(osg::Vec4(1, 1, 0, 1));
outline->addChild(outlineModel.get());
}

Thank you!

Cheers,
Théo

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




Attachments: 
http://forum.openscenegraph.org//files/truck_628.png


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