[osg-users] error happened when I use opengl in osg

2013-09-16 Thread ??????
I am using osg in the MFC simple document application,and now I want to draw ocean in the window,in fact there is a plugin called osgocean which can draw ocean perfectly.but it not satisfied my need,because I should treat the ocean as a osg node for the further process. I look for the info in th

[osg-users] complete texture

2013-09-16 Thread Sajjadul Islam
Hi, Does the following line return a complete texture object Code: osg::Texture::TextureObject* tex = _texref->getTextureObject( osgCompute::GLMemory::getContext()->getState()->getContextID() ); I am going through a source and to map it to my own requirement i need to know if

Re: [osg-users] MatrixTransforms and MatrixD

2013-09-16 Thread Robert Osfield
Hi Simon, The OSG by default uses double Matrices (osg::Matrix is typedef'd to osg::Matrixd) for all internal transforms and camera matrices. The matrices are all accumulated in doubles and passed to OpenGL as doubles. Most OpenGL drivers will then cast the matrices down to floats when passing do

Re: [osg-users] The resize event from the window creation cannot be handled

2013-09-16 Thread Alberto Luaces
Alberto Luaces writes: > Maybe it is removed on purpose, > but I couldn't spot where in the code it is done. > I have discovered that osgViewer::Viewer::realize calls setStartTick(), which in turns clears the event queue, because the time stamps from previous events would be then incorrect. It

[osg-users] MatrixTransforms and MatrixD

2013-09-16 Thread Voelcker, Simon
Hi, I am using MatrixTransform nodes with matrices that contain quite large numbers. When I stack two of these transforms, I notice severe floating point inaccuracies in the scene, although I use double precision matrices to set up my transform nodes. Is it possible that OSG uses only single pr

Re: [osg-users] The resize event from the window creation cannot be handled

2013-09-16 Thread Alberto Luaces
Hi Robert, Yes, I understand it is not properly a resize, but this usage is common in some frameworks in order to know the initial dimensions of the window and properly initialize projection matrices, etc. Besides that, OSG indeed creates the event —at least on X11 (osgGA::EventQueue::windowResiz

Re: [osg-users] The resize event from the window creation cannot be handled

2013-09-16 Thread Robert Osfield
Hi Alberto, Strictly speaking I would interpret a resize event as one relating to when a resized. When a window is first created it isn't being resized so a resize event isn't probably appropriate. I could see how it might be convenient a resize event for those using it this way. For tracking t

[osg-users] The resize event from the window creation cannot be handled

2013-09-16 Thread Alberto Luaces
Hi, I need to know the dimensions of the window OSG creates because I have to adapt the GUI of my program to the proportions of the view. An elegant way of doing it is to capture the RESIZE events in order to get the current dimensions of the window. However, at window creation OSG creates the e

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Mateusz Janiak
Hi Sebastian, Thank You for Your suggestions. I will try their various combonations to distinguish which one gives the closest results to what I wanted to achieve. ... Thank you! Cheers, Mateusz -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Sebastian Messerschmidt
Hi Mateusz, From reading your message I'd say you don't really need semitransparent geometries at all. Try to stick to a wireframe box or coloring the selction set. Regarding the order: yes. If you draw your instanced spheres first, you can safely render the sides of your box in perfect orderi

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Mateusz Janiak
Hi Sebastian , Well, I need instancing as I render about 1M spehers presenting material atoms structure. The Box I want to add is just a marker for a part of the whole material, so user can focus easier on it. Moreover, box will always contain instanced spheres inside, so the order is somehow f

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Sebastian Messerschmidt
Hi Mateusz, [quote="SMesserschmidt"] When you use instanced drawing you cannot have correct semi-transparent objects, as there is no sorting involved. One option is to sort your instanced obejcts in every frame or to use some order independent transparency approach. [quote] Could You provide

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Mateusz Janiak
[quote="SMesserschmidt"] When you use instanced drawing you cannot have correct semi-transparent objects, as there is no sorting involved. One option is to sort your instanced obejcts in every frame or to use some order independent transparency approach. [quote] Could You provide me avaiable te

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Sebastian Messerschmidt
Hello Mateusz, When you use instanced drawing you cannot have correct semi-transparent objects, as there is no sorting involved. One option is to sort your instanced obejcts in every frame or to use some order independent transparency approach. Also concerning your Material and stateset proble

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Mateusz Janiak
Hi, I have implemented the simplest fragment shader applying only particular color to my primitives as this was sufficient. However now I want to create a composition of a simple osg::ShapeDrawable for a osg::Box and my instanced material (spheres), where Box should be semitransparent and so sh

Re: [osg-users] OSG errors when running on a virtual machine

2013-09-16 Thread AJ Kruze
Thanks for the tip, Alistair. I found precompiled Mesa libraries at the two links below and copied open32.dll and glu32.dll into the executable's directory. It seems to be working better now, though I get the following error messages. But I understand this is beyond OSG, I'll try to figure it ou