Alessandro Terenzi | 31 Aug 15:43 2014
Picon

iOS: flickering problem when changing orientation and using AutoLayout

Hi,
I'm experiencing a problem related to orientation changes on iOS and AutoLayout.

Specifically, in InterfaceBuilder I created a UIView where I render OSG stuff, I made this view a subview of
the ViewController's main view, then if I add some constraints among those views (in order to resize the
OSG view appropriately), I see that when orientation changes, the OSG view content flickers a lot between
a couple of frames (when I go back to the original orientation everything works again) . If I remove the
constraints then the issue disappears.

Anyone with the same problem? Any suggestion?
Thanks!

Alessandro

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

Paul | 30 Aug 23:24 2014
Picon

View on top of view, (picture in picture)

Hi, I've got a scene that renders some models. I would like to put a seperate camera/node viewport on top of
that..  like a picture in picture type thing.  The scenes are not related, so they don't need to see each other
or anything.
Where do I start?  Thanks :)

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

Ben Morgan | 30 Aug 13:32 2014
Picon

Warped scene with two sets of Geodes

I did post this question on StackOverflow (
http://stackoverflow.com/questions/25576762/warped-scene-with-two-sets-of-geodes
), but I assume that this is a more appropriate place for questions.

I have a few objects that I want to combine into a scene graph:

Street inherits from Geode and has a Geometry child drawable made up
of a GL_LINE_STRIP.
Pointer inherits from PositionAttitudeTransform and contains a Geode
which contains two Geometry polygons.

When I add a bunch of Streets to a Group, it looks just fine. When I
add only the Pointer to a Group, it also looks fine. But if I somehow
have them both in the scene, the second one is screwed up. (This does
not happen if I have only two Pointers.) I posted some screenshots on
the StackOverflow site, in case you want to see them. Probably I’m
making some simple mistake—but I can’t see it!

Here is some code that causes the problem (I tried to shorten it a little):

// My libraries:
#include <asl/util/draw.h>
#include <asl/util/color.h>
using namespace asl;

#include <straph/point.h>
#include <straph/straph.h>
using namespace straph;

// Standard and OSG libraries:
(Continue reading)

Sonya Blade | 30 Aug 08:48 2014
Picon

Modify Geometry of osg::Node loaded with ReadNodeFile

Dear All,

Google search reveals that it's been discussed couple of times in the forum and mailing list, 
it 's been mentioned to use the NodeVisitor for that purpose. But isn't there more direct method 
of retriving the geometry data from loaded model? 

Something like that:
osg::ref_ptr<osg::Node> load_nd = osgDB::readNodeFile("....//Wavefront.obj");
osg::Geometry* geo = load_nd->asGeode()->getDrawable(0)->asGeometry();

Because even if I use the nodeVisitor I have to know exact location of where geometry is stored 
in the loader node.

Regards,
<div><div dir="ltr">Dear All,<div><br></div>
<div>Google search reveals that it's been discussed couple of times in the forum and mailing list,&nbsp;</div>
<div>it 's been mentioned to use the NodeVisitor for that purpose. But isn't there more direct method&nbsp;</div>
<div>of retriving the geometry data from loaded model?&nbsp;</div>
<div><br></div>
<div>Something like that:</div>
<div>osg::ref_ptr&lt;osg::Node&gt; load_nd = osgDB::readNodeFile("....//Wavefront.obj");</div>
<div>osg::Geometry* geo = load_nd-&gt;asGeode()-&gt;getDrawable(0)-&gt;asGeometry();</div>
<div><br></div>
<div>Because even if I use the nodeVisitor I have to know exact location of where geometry is stored&nbsp;</div>
<div>in the loader node.</div>
<div><br></div>
<div>Regards,</div> 		 	   		  </div></div>
Fabrizio Bazzurri | 29 Aug 11:28 2014
Picon

Texture2D Image updating

Hi,

I'm having a problem in my custom shader while updating my texture2D using image->dirty() function.
Following there is the relevant code snippet. 

Code:

osg::StateSet* stateset = geom1->getOrCreateStateSet();

osg::ref_ptr<osg::Program> program = new osg::Program;
osg::ref_ptr<osg::Shader> vertexSource = new osg::Shader(osg::Shader::VERTEX);
osg::ref_ptr<osg::Shader> fragmentSource = new osg::Shader(osg::Shader::FRAGMENT);

vertexSource->setShaderSource(vert);
fragmentSource->setShaderSource(frag);

program->addShader(vertexSource);
program->addShader(fragmentSource);

stateset->setAttributeAndModes(program.get());
stateset->setDataVariance(osg::Object::DYNAMIC);

////
osg::ref_ptr<osg::Image> diffuseImage = osgDB::readImageFile(".\\img0.png");
std::cout << " File " << diffuseImage->getFileName() << " " << std::endl; // it prints img0

osg::ref_ptr<osg::Texture2D> diffuseTex = new osg::Texture2D;
diffuseTex->setDataVariance(osg::Object::DYNAMIC);
diffuseTex->setImage(diffuseImage.get());

stateset->setTextureAttributeAndModes(0, diffuseTex.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE);

osg::ref_ptr<osg::Uniform> cDiffTex = new osg::Uniform(osg::Uniform::SAMPLER_2D, "cDiffTex");
cDiffTex->set(0);
stateset->addUniform(cDiffTex.get());

diffuseImage = osgDB::readImageFile(".\\img1.jpg");
diffuseImage->dirty();
std::cout << " File " << diffuseImage->getFileName() << " " << std::endl; // it prints img1->GOOD the
diffuseImage is updated
std::cout << " Tex " << diffuseTex->getImage()->getFileName() << " " << std::endl; // it prints img0->BAD
the image object of texture is not updated
// NEED TO TELL TEXTURE TO SET THE IMAGE TO HAVE IT UPDATED
//diffuseTex->setImage(diffuseImage);
//std::cout << " Tex " << diffuseTex->getImage()->getFileName() << " " << std::endl;

I simply set an image (img0) to a texture2D (diffuseTex) and what I would  like to do is updating the
image\texture. Unfortunately what I get is that the diffuseTex->getImage() function is pointing to the
original image while the object diffuseImage is correctly updated.
If I'm putting the setImage again on texture it is correctly updated.
Am I doing something wrong in passing the image to a texture? Because I've read that using dirty() function
is possible to update all textures that are sharing the image object with no further actions.
Sorry I'm a newbie in OSG.

Thank you!

Cheers,
Fabrizio[/i]

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

Shyguy | 29 Aug 13:22 2014

What is "WIN32_USE_MP" and "WIN32_USE_DYNAMICBASE"?

I am configuring OSG 3.2.1 with CMake 3.0.0
 
I saw those keywords in cmake check value.
 
What are these meaning?
 
..Always thanks to who answers my humble question.
 
 
 
 
 
 
 
 
 
당신과 제가 다름이 세상을 풍요롭게 합니다...^^v
Differences between U and me make the world plentiful...^^v
<div><div class="wc_wrapper">
<div>I am configuring OSG 3.2.1 with CMake 3.0.0</div>
<div>&nbsp;</div>
<div>I saw those keywords in cmake check value.</div>
<div>&nbsp;</div>
<div>What are these meaning?</div>
<div>&nbsp;</div>
<div>..Always thanks to who answers my humble question.</div>
<div class="_wcSign"><div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&#45817;&#49888;&#44284; &#51228;&#44032; &#45796;&#47492;&#51060; &#49464;&#49345;&#51012; &#54413;&#50836;&#47213;&#44172; &#54633;&#45768;&#45796;...^^v</div>
<div>Differences between U and me make the world plentiful...^^v</div>
</div></div>
</div></div>
Moreno, Nicolas - Exelis | 29 Aug 09:39 2014

[3rdparty] Using OSG into a Qt widget

Hello,

I'm working on a project using OSG 3.2.0 and I want to add Qt 5.3 into this project. My gaol is to display OSG into a QWidget to use Qt GUI around OSG display.

I use CMAKE to generate OSG project files. I set CMAKE_PREFIX_PATH to "C:\Qt\5.3\msvc2012_opengl". With a "Configure", I have Qt5 variables into "Ungrouped Entries" but into "Qt", all variables are not found. Is this normal ?

Moreover, when I try to compile osgQt, it's failed with an error :

Building Custom Rule C:/Lucem/src/22_openscenegraph-3.2.0/src/osgQt/CMakeLists.txt
2>  CMake does not need to re-run because C:\Lucem\vs\22_openscenegraph-3.2.0\src\osgQt\CMakeFiles\generate.stamp is up-to-date.
2>  Generating __/__/include/osgQt/moc_QGraphicsViewAdapter.cpp
2>  moc: Too many input files specified: 'C:/Lucem/vs/22_openscenegraph-3.2.0/src/osgQt/__/__/include/osgQt/moc_QGraphicsViewAdapter.cpp' 'C:/Lucem/src/22_openscenegraph-3.2.0/include/osgQt/QGraphicsViewAdapter'
2>  Usage: C:\Qt\5.3\msvc2012_opengl\bin\moc.exe [options] [header-file] [ <at> option-file]
2>  Qt Meta Object Compiler version 67 (Qt 5.3.1)
// moc using description
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 1.

The problem seems to come from "moc", no ? Can you help me ? I don't know how to solve this problem. Maybe by editing osgQt/CMakeLists.txt ?

Thanks in advance,
Niko


This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail.
<div>
<div>Hello,
<div><br></div>
<div>I'm working on a project using OSG 3.2.0 and I want to add Qt 5.3 into this project. My gaol is to display OSG into a QWidget to use Qt GUI around OSG display.</div>
<div><br></div>
<div>I use CMAKE to generate OSG project files. I set&nbsp;<span>CMAKE_PREFIX_PATH to "</span><span>C:\Qt\5.3\msvc2012_opengl".
 With a "Configure", I have Qt5 variables into&nbsp;</span><span>"Ungrouped Entries"</span><span>&nbsp;but
 into "Qt", all variables are not found. Is this normal ?</span>
</div>
<div><span><br></span></div>
<div>
<span>Moreover, when I try to compile osgQt,&nbsp;</span><span>it's
 failed with an error :</span>
</div>
<div><span><br></span></div>
<div>
<span>Building Custom Rule C:/Lucem/src/22_openscenegraph-3.2.0/src/osgQt/CMakeLists.txt</span><br><span>2&gt;&nbsp; CMake does not need to re-run because C:\Lucem\vs\22_openscenegraph-3.2.0\src\osgQt\CMakeFiles\generate.stamp
 is up-to-date.</span><br><span>2&gt;&nbsp; Generating __/__/include/osgQt/moc_QGraphicsViewAdapter.cpp</span><br><span>2&gt;&nbsp; moc: Too many input files specified: 'C:/Lucem/vs/22_openscenegraph-3.2.0/src/osgQt/__/__/include/osgQt/moc_QGraphicsViewAdapter.cpp'
 'C:/Lucem/src/22_openscenegraph-3.2.0/include/osgQt/QGraphicsViewAdapter'</span><br><span>2&gt;&nbsp; Usage: C:\Qt\5.3\msvc2012_opengl\bin\moc.exe [options] [header-file] [ <at> option-file]</span><br><span>2&gt;&nbsp; Qt Meta Object Compiler version 67 (Qt 5.3.1)</span><br><span>// moc using description</span><br><span>2&gt;C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5):
 error MSB6006: "cmd.exe" exited with code 1.</span>
</div>
<div><span><br></span></div>
<div><span>The problem seems to come from "moc", no ? Can you help me ? I don't know how to solve this problem. Maybe by editing&nbsp;osgQt/CMakeLists.txt
 ?</span></div>
<div><span><br></span></div>
<div><span>Thanks in advance,</span></div>
<div><span>Niko</span></div>
</div>
<br><br>
This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions
 presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by
 any virus transmitted by this e-mail. <br>
</div>
Konstantin | 28 Aug 10:06 2014
Picon

Is setCullMask thread-safe?

Hello!

Can I call setCullMask for viewer's camera from the other thread while viewer is running?

Thanx

<div><div dir="ltr">
<div>
<div>Hello!<br><br>
</div>Can I call setCullMask for viewer's camera from the other thread while viewer is running?<br><br>
</div>Thanx<br><br>
</div></div>
Roman Grigoriev | 27 Aug 22:50 2014
Picon

find nodes in clones

Hi,
I have to use clones of models in my subgraph and animate parts of  model.
My setup is 
1.load model
2.clone model (DEEP_COPY_NODES|DEEP_COPY_USERDATA)
3.find parts nodes by using node name
4. use callback to animate parts
Because of hundreds of clones I want to speed up process by finding parts nodes in base model and somehow
calculate node pointer in clone
Is there some way to get node pointer in clone model if you know node pointer in base model?
Thank you!
Cheers,
Roman

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

Nick Modly | 27 Aug 20:52 2014
Picon

QT and OSG openGL issues

Hi,

I'm currently walking down the oft-treaded path of creating Qt Widget overlays on top of an OSG scene. I've
been doing a lot of reading and searching over the archives, and it seems like there are 2 main approaches.
Eveything I can find on the topic is 3-5 years old, however, so I was wondering if I'd missed anything.

The first approach is to use osgQT::QWidgetImage to render the QWidgets to a texture and display that
within the OSG scene. I've gotten that working, with a little bit of sub-classing to make a full-screen
ortho projection work to create a HUD and to handle events properly. There is a bit of wonkiness to it though
so I also want to try...

The second approach: to use a QGraphicsScene and to do the osg rendering in the drawBackground method. I'm
currently trying to get this approach to work, but running into some issues. I've gathered, from the
archives, that I need to save the openGL state at the beginning, then restore it once finished with the osg
rendering, but I'm not sure exactly what the osg rendering consists of. I tried calling frame() on an
osgviewer from there, but got a fistfull of openGL errors

> QGLContext::makeCurrent(): Failed.
> QGLShader: could not create shader 
> Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile
> QGLShader: could not create shader 
> Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed
to compile
> QGLShaderProgram: could not create shader program 
> Errors linking simple shader: "" 
> QGLShader: could not create shader 
> Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader &
UntransformedPositionVertexShader) failed to compile
> QGLShader: could not create shader 
> Fragment shader for blitShaderProg (MainFragmentShader & ImageSrcFragmentShader) failed to compile
> QGLShaderProgram: could not create shader program 
> Errors linking blit shader: "" 
> QGLContext::makeCurrent(): Failed.

Maybe I am just setting things up wrong?

I have a QWidget that creates a QGraphicsView and an osgViewer::Viewer. I set the viewport of the
GraphicsView to be the GLWidget from the Viewer's graphicsWindow.getGLWidget(). I subclassed the
QGraphicsScene to give it a pointer to the viewer, and in the drawBackground method I saved off the openGL
state, called frame() on the viewer, and restored the state, but the window doesn't render and gives me
those errors. Has anyone had success with this? And if so, has anyone gotten it to work with anything other
than a single-threaded approach?

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

Stephan Wiehr | 27 Aug 17:28 2014
Picon

[build] Building for Linux on ARM

Hi,

I am currently trying to build OpenScenegraph for a custom embedded Linux on an ARM platform (armhf if it
matters) with GLESv2 and Wayland but currently already fail on configure.

Current configure is this:

Code:
./configure \
-DOSG_GL1_AVAILABLE=OFF \
-DOSG_GL2_AVAILABLE=OFF \
-DOSG_GL3_AVAILABLE=OFF \
-DOSG_GLES1_AVAILABLE=OFF \
-DOSG_GLES2_AVAILABLE=ON \
-DOSG_GL_LIBRARY_STATIC=OFF \
-DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF \
-DOSG_GL_MATRICES_AVAILABLE=OFF \
-DOSG_GL_VERTEX_FUNCS_AVAILABLE=OFF \
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=OFF \
-DOSG_GL_FIXED_FUNCTION_AVAILABLE=OFF \
-DBUILD_OSG_EXAMPLES=ON

current result is this:

Code:
-- Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY) 
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES) (found version "2.9.1")
-- checking for module 'gta'
-- package 'gta' not found
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) 
-- Could NOT find SDL (missing: SDL_LIBRARY) (found version "1.2.14")
-- checking for module 'poppler-glib'
-- package 'poppler-glib' not found
-- checking for module 'librsvg-2.0>=2.35'
-- package 'librsvg-2.0>=2.35' not found
-- checking for module 'gtk+-2.0'
-- package 'gtk+-2.0' not found
-- checking for module 'gtkglext-x11-1.0'
-- package 'gtkglext-x11-1.0' not found
-- Could NOT find Boost
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY) 
-- Could NOT find wxWidgets (missing: wxWidgets_FOUND) 
-- Could NOT find JPEG (missing: JPEG_LIBRARY) 
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.3.4")
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) 
-- Could NOT find TIFF (missing: TIFF_LIBRARY) (found version "3.9.5")
-- checking for module 'xrandr'
-- package 'xrandr' not found
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENGL_gl_LIBRARY (ADVANCED)

Can anyone give me a hint or directions on how to get this to a compilable state?
Checking the current configurations that could use GLESv2 (Apple and Android) I couldn't even figure what
I have to set to get my libGLESv2.so being found.

Additionally the question: Which dependencies are actually minimal or important respectively? 
From the configure result it looks like some more libraries and/or header files are missing but I am not sure
how crucial their absence is.

Thank you!

Cheers,
Stephan[/code]

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


Gmane