[osg-users] Issues with rendering two views of the same scene

2014-04-22 Thread Patrik Andersson
Hi,

I'm setting up a stereo-camera system with OSG 3.0.1, by splitting the
screen horizontally with CompositeViewer and each view is rendered by two
RTT onto HUD cameras/textures.

When I run the program as normal, only the right view was rendered
properly, the left view does not render the corresponding geometry in its
view.

A stats-handler is attached to the views. When I press 'S' three times,
the information about GPU, Cameras and Views are displayed, then the left
view is rendered properly.

The system worked when a third camera was involved and using a single
viewer. But I want to decrease number of cameras which render the geometry
to improve the performance.

Does anyone has experience with this kind of issue? I'm limited to OSG
3.0.1.

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


Re: [osg-users] Is it possible to render in one RTT two cameras?

2014-04-22 Thread Sebastian Messerschmidt

Hi Anton

For example: I have the first camera - this is the main scene and the second 
camera - screenspace 2d otho menu.

Can I render them consistently in one RTT (for future postprocessing)?
Your terminology is a bit confusing. RTT means render-to-texture. So 
what you want is to render to one texture using RTT.
To answer your question: Yes. This is how RTT is used in most of the 
cases; Binding a texture to a camera with FBO/Pixelbuffer via RTT and 
modifying it. The resulting texture then can be bound to the next camera 
etc.


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





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


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


[osg-users] [osgPlugins] loading .obj file from c++

2014-04-22 Thread Sam Mania
Hi,

Sorry for this probably naive question, but I just started working with OSG. 
I've set up a VC++ project and I'm trying to load an obj file. I get an 
Unhandeled exception std::bad_alloc at memory location error. I tried to open 
the obj file using osgviewer and it works fine.

The exception happens in the ReadFile file, at this statement:

Code:
return readNodeFile(filename,Registry::instance()-getOptions());



This is my basic code in c++:


Code:

#include osg\Node
#include osgDB\ReadFile
using namespace osg;
int main(){ 

ref_ptrNode node = osgDB::readNodeFile(C:/Users/Sam/Debby.obj);
return 0;
}



I'm thinking this might have to do with the plugins not activated or linked 
somehow? I'm attaching the obj file if anyone wants to test it. 

I also tried to run any other .osg files that come with the distribution, but 
with the same error.

Thanks a lot for any pointers, and apologies in advance if this is too basic, 
but I tried to look for solutions with no luck.
... 

Thank you!

Cheers,
Sam

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





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


Re: [osg-users] [osgPlugins] loading .obj file from c++

2014-04-22 Thread Sebastian Messerschmidt

Hi Sam,

Hi,

Sorry for this probably naive question, but I just started working with OSG. 
I've set up a VC++ project and I'm trying to load an obj file. I get an 
Unhandeled exception std::bad_alloc at memory location error. I tried to open 
the obj file using osgviewer and it works fine.
What is the size of the file? And what version of OSG an which platform 
are you running on (32/64bit)?

Did you build OSG, or is it a binary package`?

If you can provide the file we could check if it is related to the file 
or your setup.


cheers
Sebastian


The exception happens in the ReadFile file, at this statement:

Code:
return readNodeFile(filename,Registry::instance()-getOptions());



This is my basic code in c++:


Code:

#include osg\Node
#include osgDB\ReadFile
using namespace osg;
int main(){

ref_ptrNode node = osgDB::readNodeFile(C:/Users/Sam/Debby.obj);
return 0;
}



I'm thinking this might have to do with the plugins not activated or linked 
somehow? I'm attaching the obj file if anyone wants to test it.

I also tried to run any other .osg files that come with the distribution, but 
with the same error.

Thanks a lot for any pointers, and apologies in advance if this is too basic, 
but I tried to look for solutions with no luck.
...

Thank you!

Cheers,
Sam

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





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


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


Re: [osg-users] [osgPlugins] loading .obj file from c++

2014-04-22 Thread Tianlan Shao
Hi Sam,
could you please set the environment varible OSG_NOTIFY_LEVEL to DEBUG, and
try again? The log messages will shed some light on the plugin-searching
process.
best regards,
Tianlan Shao

On Tue, Apr 22, 2014 at 5:41 AM, Sam Mania samer.mouba...@gmail.com wrote:

 Hi,

 Sorry for this probably naive question, but I just started working with
 OSG. I've set up a VC++ project and I'm trying to load an obj file. I get
 an Unhandeled exception std::bad_alloc at memory location error. I tried to
 open the obj file using osgviewer and it works fine.

 The exception happens in the ReadFile file, at this statement:

 Code:
 return readNodeFile(filename,Registry::instance()-getOptions());



 This is my basic code in c++:


 Code:

 #include osg\Node
 #include osgDB\ReadFile
 using namespace osg;
 int main(){

 ref_ptrNode node = osgDB::readNodeFile(C:/Users/Sam/Debby.obj);
 return 0;
 }



 I'm thinking this might have to do with the plugins not activated or
 linked somehow? I'm attaching the obj file if anyone wants to test it.

 I also tried to run any other .osg files that come with the distribution,
 but with the same error.

 Thanks a lot for any pointers, and apologies in advance if this is too
 basic, but I tried to look for solutions with no luck.
 ...

 Thank you!

 Cheers,
 Sam

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





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

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


Re: [osg-users] [osgPlugins] loading .obj file from c++

2014-04-22 Thread Robert Osfield
Hi Sam,

I don't use Windows but have witnessed lots of users report trapped by
build/runtume link problems under Windows due to the crappy way that
Windows/Visual Studio manages linking of libraries at runtime.  You
can't mix libraries that are built with different memory allocators
such as debug/release.

I would recommend making sure you don't have different build types on
the same machine that you can accidentally link to at runtime, make
sure that everything is built in a consistent way.

The other solution is just move to an operating system and build tools
that don't make developing C++ application so unnecessarily hard.

Robert.

On 22 April 2014 04:41, Sam Mania samer.mouba...@gmail.com wrote:
 Hi,

 Sorry for this probably naive question, but I just started working with OSG. 
 I've set up a VC++ project and I'm trying to load an obj file. I get an 
 Unhandeled exception std::bad_alloc at memory location error. I tried to open 
 the obj file using osgviewer and it works fine.

 The exception happens in the ReadFile file, at this statement:

 Code:
 return readNodeFile(filename,Registry::instance()-getOptions());



 This is my basic code in c++:


 Code:

 #include osg\Node
 #include osgDB\ReadFile
 using namespace osg;
 int main(){

 ref_ptrNode node = osgDB::readNodeFile(C:/Users/Sam/Debby.obj);
 return 0;
 }



 I'm thinking this might have to do with the plugins not activated or linked 
 somehow? I'm attaching the obj file if anyone wants to test it.

 I also tried to run any other .osg files that come with the distribution, but 
 with the same error.

 Thanks a lot for any pointers, and apologies in advance if this is too basic, 
 but I tried to look for solutions with no luck.
 ...

 Thank you!

 Cheers,
 Sam

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





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


Re: [osg-users] Issues with rendering two views of the same scene

2014-04-22 Thread Robert Osfield
HI Partrick,

There are just too many unkowns about what you are doing and what
system you are using to know what might be going wrong.  What hardware
are you using? What OS?  Have you tried other systems and other OpenGL
drivers?  Did you build the OSG yourself?  Have you tried OSG-3.2?

In principle rendering two views of a single system should work fine,
and combining slave cameras in the mix should also work fine -
examples of the OSG do combinations of this, and I've done lots of
work with RTT techniques.

Robert.

On 22 April 2014 08:22, Patrik Andersson patrik.andersson...@gmail.com wrote:
 Hi,

 I'm setting up a stereo-camera system with OSG 3.0.1, by splitting the
 screen horizontally with CompositeViewer and each view is rendered by two
 RTT onto HUD cameras/textures.

 When I run the program as normal, only the right view was rendered properly,
 the left view does not render the corresponding geometry in its view.

 A stats-handler is attached to the views. When I press 'S' three times, the
 information about GPU, Cameras and Views are displayed, then the left view
 is rendered properly.

 The system worked when a third camera was involved and using a single
 viewer. But I want to decrease number of cameras which render the geometry
 to improve the performance.

 Does anyone has experience with this kind of issue? I'm limited to OSG
 3.0.1.

 Kind regards
 Patrik

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

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


Re: [osg-users] Issues with rendering two views of the same scene

2014-04-22 Thread Patrik Andersson
Hi Robert,

Short answers of the few unknowns: I'm using Windows 7 Enterprise with
NVidia Quadro 4000 (Driver version 320.57), I built OSG by myself, and I'm
limited to OSG-3.0.1.
What more information do you need to help me out?

Kind regards
Patrik


On Tue, Apr 22, 2014 at 10:15 AM, Robert Osfield
robert.osfi...@gmail.comwrote:

 HI Partrick,

 There are just too many unkowns about what you are doing and what
 system you are using to know what might be going wrong.  What hardware
 are you using? What OS?  Have you tried other systems and other OpenGL
 drivers?  Did you build the OSG yourself?  Have you tried OSG-3.2?

 In principle rendering two views of a single system should work fine,
 and combining slave cameras in the mix should also work fine -
 examples of the OSG do combinations of this, and I've done lots of
 work with RTT techniques.

 Robert.

 On 22 April 2014 08:22, Patrik Andersson patrik.andersson...@gmail.com
 wrote:
  Hi,
 
  I'm setting up a stereo-camera system with OSG 3.0.1, by splitting the
  screen horizontally with CompositeViewer and each view is rendered by two
  RTT onto HUD cameras/textures.
 
  When I run the program as normal, only the right view was rendered
 properly,
  the left view does not render the corresponding geometry in its view.
 
  A stats-handler is attached to the views. When I press 'S' three times,
 the
  information about GPU, Cameras and Views are displayed, then the left
 view
  is rendered properly.
 
  The system worked when a third camera was involved and using a single
  viewer. But I want to decrease number of cameras which render the
 geometry
  to improve the performance.
 
  Does anyone has experience with this kind of issue? I'm limited to OSG
  3.0.1.
 
  Kind regards
  Patrik
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] Issues with rendering two views of the same scene

2014-04-22 Thread Robert Osfield
On 22 April 2014 09:32, Patrik Andersson patrik.andersson...@gmail.com wrote:
 Hi Robert,

 Short answers of the few unknowns: I'm using Windows 7 Enterprise with
 NVidia Quadro 4000 (Driver version 320.57), I built OSG by myself, and I'm
 limited to OSG-3.0.1.
 What more information do you need to help me out?

Have you tried other systems?  Other versions of the OSG?

Do the OSG examples work OK?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Issues with rendering two views of the same scene

2014-04-22 Thread Patrik Andersson
No, I'm not able to test on any other system and any other versions of OSG.
The examples are working properly.


On Tue, Apr 22, 2014 at 10:38 AM, Robert Osfield
robert.osfi...@gmail.comwrote:

 On 22 April 2014 09:32, Patrik Andersson patrik.andersson...@gmail.com
 wrote:
  Hi Robert,
 
  Short answers of the few unknowns: I'm using Windows 7 Enterprise with
  NVidia Quadro 4000 (Driver version 320.57), I built OSG by myself, and
 I'm
  limited to OSG-3.0.1.
  What more information do you need to help me out?

 Have you tried other systems?  Other versions of the OSG?

 Do the OSG examples work OK?
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] Issues with rendering two views of the same scene

2014-04-22 Thread Robert Osfield
On 22 April 2014 09:44, Patrik Andersson patrik.andersson...@gmail.com wrote:
 No, I'm not able to test on any other system and any other versions of OSG.
 The examples are working properly.

Testing out other systems and other versions of the OSG will provide a
bit more scope to the possible nature of the problem.  With some many
unkowns there really isn't much others like myself can help with,
doing these others tests helps eradicate some of the possibilities
from the investigation.

At this point there really isn't much else I can do or say, you are
the one with the hardware and software that is showing the problems,
you are the one with direct ability to test out different
combinations.  You should have access to the full source code of the
OSG as well as your own application.  I'm afraid the ball is your
court.

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


Re: [osg-users] Issues with rendering two views of the same scene

2014-04-22 Thread Patrik Andersson
I see my limitations make it impossible to evaluate if it is hardware/built
related. But I have figured something out something, how should I set the
StateSet for the scene-data. I removed the current added stateset and now
the scene isn't rendered in any of the views. How should the StateSet be
set between the different views?


On Tue, Apr 22, 2014 at 10:58 AM, Robert Osfield
robert.osfi...@gmail.comwrote:

 On 22 April 2014 09:44, Patrik Andersson patrik.andersson...@gmail.com
 wrote:
  No, I'm not able to test on any other system and any other versions of
 OSG.
  The examples are working properly.

 Testing out other systems and other versions of the OSG will provide a
 bit more scope to the possible nature of the problem.  With some many
 unkowns there really isn't much others like myself can help with,
 doing these others tests helps eradicate some of the possibilities
 from the investigation.

 At this point there really isn't much else I can do or say, you are
 the one with the hardware and software that is showing the problems,
 you are the one with direct ability to test out different
 combinations.  You should have access to the full source code of the
 OSG as well as your own application.  I'm afraid the ball is your
 court.

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

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


Re: [osg-users] A bug in multi-threaded osgTerrain (with proposed fix) plus assorted questions

2014-04-22 Thread Sylvain Comtois
Hi,

   I have a similar problem when i create an OSGTerrain node in a multithread 
configuration. The crash occur in the init function of the GeometryTechnique 
class. Note i use OSG 3.2.

   To solve this problem, i made a small modification to OSG itself. 

   I replace the line 
  if (!_currentBufferData || !assumeMultiThreaded)
   by
  if (!_currentBufferData  !assumeMultiThreaded)
   in the GeometryTechnique::init function.

   I also replace the line 
  init(getDirtyMask(), false);
   by 
  init(getDirtyMask(), true);
   in the TerrainTile::traverse function.

   With this modification, the currentBuffer is create in the Update traversal 
(one thread) instead of the cull/draw traversal (multi-thread).

   Maybe it's better to wait for OSG team approval before you made this 
modification. 

Cheers,
Sylvain

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





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


Re: [osg-users] setLightingMode crash in multithread mode

2014-04-22 Thread Sylvain Comtois
Hi Robert,

   I use two way to modify my scene graph. 

   The first one is using the UpdateCallback each time it is possible. 
   The second one is when we are outside the ViewerBase::frame() function.
   Our application have a lot of threads and i use a mutex to be sure the OSG 
tree is never access in the same time by two or more threads.

The code like this:

   mRenderingTreeMutex.lock
   mViewer-frame()
   mRenderingTreeMutex.Unlock

   And each time i touch the OSG tree, i use the same mutex.

   mRenderingTreeMutex.lock
   Modifiying OSG tree
   mRenderingTreeMutex.Unlock

   So in my case i call the Viewer::setLightingMode between my 
mRenderingTreeMutex and the function modify the internal variable 
_lightingMode. According to the debugger, this variable is process during the 
cull_draw that is made by all camera's thread in the same time.

   So, during one thread call the _globalStateSet-removeMode(GL_LIGHTING) 
function, another one use the _globalStateSet variable and this variable is the 
same for all threads that cause the crash.

   Everything append in the void SceneView::setLightingMode(LightingMode mode) 
function.

   To temporary solve my problem, i add a mutex to protect the access to the 
_globalStateSet variable.

   Maybe this variable can be process in the update instead of the cull/draw?

Thank you!

Cheers,
Sylvain

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





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


Re: [osg-users] setLightingMode crash in multithread mode

2014-04-22 Thread Robert Osfield
Hi Sylvain,

n 22 April 2014 14:30, Sylvain Comtois sylvain.comt...@gel.ulaval.ca wrote:
 Hi Robert,

I use two way to modify my scene graph.

The first one is using the UpdateCallback each time it is possible.
The second one is when we are outside the ViewerBase::frame() function.
Our application have a lot of threads and i use a mutex to be sure the OSG 
 tree is never access in the same time by two or more threads.

 The code like this:

mRenderingTreeMutex.lock
mViewer-frame()
mRenderingTreeMutex.Unlock

And each time i touch the OSG tree, i use the same mutex.

mRenderingTreeMutex.lock
Modifiying OSG tree
mRenderingTreeMutex.Unlock

So in my case i call the Viewer::setLightingMode between my 
 mRenderingTreeMutex and the function modify the internal variable 
 _lightingMode. According to the debugger, this variable is process during the 
 cull_draw that is made by all camera's thread in the same time.

So, during one thread call the _globalStateSet-removeMode(GL_LIGHTING) 
 function, another one use the _globalStateSet variable and this variable is 
 the same for all threads that cause the crash.

Everything append in the void SceneView::setLightingMode(LightingMode 
 mode) function.

To temporary solve my problem, i add a mutex to protect the access to the 
 _globalStateSet variable.

Maybe this variable can be process in the update instead of the cull/draw?

Thanks for the update.  Looking through where
SceneView::setLightingMode() gets called the one that looks suspicious
is the SceneView::inheritCullSettings.  The inheritCullSettings is
meant to update the SceneView's local data to reflect settings that
are inherited from above.  What it shouldn't be doing is modifying
external data - which in this case is the _globalStateSet as this is
the data structured that is shared between the different viewer
Cameras that are being threaded.

SceneView's design is a bit of hang up of it's role in the early days
of the OSG development, before the days of multi-threading.  The
particular bug you've uncovered is likely something that others users
haven't come across simply because most users of multi-theaded OSG
apps don't need to go change LightingMode like yours does.

I haven't yet worked out the best solution, but my current inclination
is to move the OpenGL lighting configuration in response to the
View(er)::setLightingMode() to be moved out of SceneView and into
View::setLightingMode(), the SceneView::inheritCullSettings would then
ignore the local LightingMode settings. Or for use to move the setting
of the Light/GLMode modes in SceneView from working on the global
stateset to one of the local StateSet's that SceneView manages.

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


Re: [osg-users] A bug in multi-threaded osgTerrain (with proposed fix) plus assorted questions

2014-04-22 Thread Sylvain Comtois
Hi,

Humm, forget my solution. She's not working.

Thank you!

Cheers,
Sylvain

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





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


Re: [osg-users] Pop Buffers with OpenSceneGraph

2014-04-22 Thread Aurelien Albert
Hi,


 5. Because the technique depends on the usage of a vertex shader I would add 
 two static methods one returns a basic osg::Program with phong shading and 
 another one only returns the shader code with the necessary uniforms and a 
 vertex quantization function that should be used in the shader. 


Maybe there's an interesting idea in osgEarth : the use pseudo-loaders to 
create library-specific objects. It's possible to write a plugin which create 
shaders in the following way, by mapping popgeometry file extension to a 
pseudo-loader. The file name let you know the shader type :


Code:
osg::Shader* vertexShader = osgDB:readShaderFile(vertexShader.popgeometry)
osg::Shader* fragmentShader = osgDB:readShaderFile(fragmentShader.popgeometry)




You can create osg::Node, osg::Shader or any osg::Object subclass with a 
plugin, and even add parameters, in the filename or in the options parameters 
:


Code:
osg::Shader* vertexShader = 
osgDB:readShaderFile(vertexShader.lod1.popgeometry)
osg::Shader* vertexShader = 
osgDB:readShaderFile(vertexShader.lod2.popgeometry)
osg::Shader* vertexShader = 
osgDB:readShaderFile(vertexShader.lod3.popgeometry)
osg::Shader* fragmentShader = 
osgDB:readShaderFile(fragmentShader.phong.popgeometry, options)
osg::Shader* fragmentShader = 
osgDB:readShaderFile(fragmentShader.flat.popgeometry, options)
osg::Shader* fragmentShader = 
osgDB:readShaderFile(fragmentShader.debug.popgeometry, options)




Have a look here, there is a list of all factory methods available to plugins 
: 
http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a01311.html#a78e08a10faa6c81a5c255d14f7c30cd7

And the base class for the plugins : 
http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00658.html

To write a new plugin, an easy way is copy/paste the ReaderWriterOBJ.cpp file 
from the obj plugin, in ReaderWriterPopGeometry.cpp and replace all the 
code/parameters related to obj file format by code to handle PopGeometry 
objects creation (not from actually files, but using options parameters and 
your algorithms)


Aurelien

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





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


Re: [osg-users] [osgPlugins] loading .obj file from c++

2014-04-22 Thread Sam Mania
Thanks all.

@Sebastian:
I'm using Windows 7, 32bit, Visual Studio 2012. I'm using the binaries, this is 
the version: OpenSceneGraph-3.0.1-VS10.0.30319-x86-release-12741
The file size is 875KB. Attached is the obj file (with its mtl file)

I only have one version of OSG on the machine.

@Tialano:
I did that now. But I don't get any additional information when running the 
code. This is the output on the console before the exception is thrown.


Code:
First-chance exception at 0x74CC0F22 in OSG.exe: Microsoft C++ exception: 
std::bad_alloc at memory location 0x004AF9E4.
First-chance exception at 0x74CC0F22 in OSG.exe: Microsoft C++ exception: 
std::bad_alloc at memory location 0x004AF1A0.
First-chance exception at 0x74CC0F22 in OSG.exe: Microsoft C++ exception: 
[rethrow] at memory location 0x.
Unhandled exception at at 0x74CC0F22 in OSG.exe: Microsoft C++ exception: 
std::bad_alloc at memory location 0x004AF1A0.
OSG.exe has triggered a breakpoint.
First-chance exception at 0x522A5BF4 (osg80-osgDB.dll) in OSG.exe: 0xC005: 
Access violation writing location 0x7453C7EC.
Unhandled exception at 0x522A5BF4 (osg80-osgDB.dll) in OSG.exe: 0xC005: 
Access violation writing location 0x7453C7EC.




... 

Thank you!

Cheers,
Sam

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




Attachments: 
http://forum.openscenegraph.org//files/debby_182.zip


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


Re: [osg-users] [build] osg and Qt5 and debian wheezy

2014-04-22 Thread Bernd Hahnebach
Hi Robert, Thanks for your answer, and your informations regarding the topic. 
It helped a lot.


robertosfield wrote:
 ...
 If you application is using the osgQt library and this lib is linked
 to Qt4 then mixing the viability of mixing Qt5 libs in your
 application will be down to Qt4/5 compatibility, something I can't
 answer as I'm no Qt expert but I guess it's reasonable to assume that
 this could cause problems...

It actually uses osgQt which uses Qt4

Code:

$ ldd IfcPlusPlusViewer | grep libosgQt
libosgQt.so.99 = /usr/lib/libosgQt.so.99 (0x7f5960fab000)
$ ldd /usr/lib/libosgQt.so.99 | grep Qt
libQtCore.so.4 = /usr/lib/x86_64-linux-gnu/libQtCore.so.4 (0x7f7223e6e000)
libQtGui.so.4 = /usr/lib/x86_64-linux-gnu/libQtGui.so.4 (0x7f72231c4000)
libQtOpenGL.so.4 = /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4 
(0x7f7222ec6000)




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





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


Re: [osg-users] [build] Problems with compiling osg3.2 with qt5.2.1 and Cmake2.8.12

2014-04-22 Thread Liu PeiFu
Hi,
I was about to compiling osg3.2 with qt5.2.1(windows 32bit, vs 2010, opengl). 
When try to configure it with Cmake(GUI)2.8.12.2, there shows some warning:
/
CMake Warning at C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/FindQt4.cmake:659 (message):
  C:/Qt/Qt5.2.1/5.2.1/msvc2010_opengl/bin/qmake.exe reported QT_INSTALL_LIBS
  as C:/Qt/Qt5.2.1/5.2.1/msvc2010_opengl/lib but QtCore could not be found
  there.  Qt is NOT installed correctly for the target build environment.
Call Stack (most recent call first):
  CMakeLists.txt:585 (FIND_PACKAGE)
/
After searched on the Internet, I tried as the following:
(1) add a Cache Entry DESIRED_QT_VERSION and set its value to 5(STRING);
(2)set the CMAKE_PREFIX_PATH to C:\Qt\Qt5.2.1\5.2.1\msvc2010_opengl;
then I configured again and there're some errors:
/
CMake Error at 
C:/Qt/Qt5.2.1/5.2.1/msvc2010_opengl/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:16
 (message):
  Failed to find glu32 in  with CMAKE_CXX_LIBRARY_ARCHITECTURE .
Call Stack (most recent call first):
  
C:/Qt/Qt5.2.1/5.2.1/msvc2010_opengl/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:52
 (_qt5gui_find_extra_libs)
  C:/Qt/Qt5.2.1/5.2.1/msvc2010_opengl/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:152 
(include)
  
C:/Qt/Qt5.2.1/5.2.1/msvc2010_opengl/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:94
 (find_package)
  CMakeLists.txt:560 (FIND_PACKAGE)

... 
is there anyone could help me? The attched file is my CmakeCahe.txt.
Thank you!

Cheers,
Liu

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




Attachments: 
http://forum.openscenegraph.org//files/cmakecache_174.txt


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