Re: [osg-users] OSG 3.0.1 on iOS 5

2012-02-22 Thread Büsra Gülten
Hi Stephan,

thank you for your reply. 

After I compared my project with the iPhone-Example on github, I found out that 
the file PerlinNoise.cpp is missed in OpenSceneGraph-3.0.1-zip (which I 
downloaded from OSG-Website). This was the reason for the osgUtil-error 
mentioned above. 

Another point I want to indicate is when main-method look like this: 


 
 @autoreleasepool 
 {
 return UIApplicationMain(argc, argv, nil, 
 NSStringFromClass([osgAppDelegate class]));
 }
 


building of app is failed with this message: 


 ScopedLock: Parse Issue. Unknown type name 'namespace'. 
 Parse Issue. Expected '.' after top level declarator
 
 Notify: Lexical or Preprocessor Issue. 'ostream' file not found. 


Any idea what this could be mean?

Thank you!

Cheers,
Büsra

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





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


Re: [osg-users] osg, macosx-x86_64 imageio plugin color byte swap problem

2012-02-22 Thread Stephan Maximilian Huber
Hi Chris,

I tested the imageio-plugin on os x 10.7 with an older 32bit build (from
Nov 2011) and it works for me. I tested only png and jpg files.



HTH,

Stephan

 Am 21.02.12 19:51, schrieb Chris Hanson:
 I had a user contact me for some assistance on this issue. I'm not an
 OSX/imageio guy, so I don't know the ramifications of this, and I thought
 I'd throw it out for the wider community to comment on before proposing a
 patch.
 
 From the user:
 We have found some image color ordering issue on MacOS Snow Leopard 10.6.
 We do x86_64 build, with imageio plugin.
 We set CMAKE flag: OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio
 For some reason, for all tested images, color channels Red and Blue were
 swapped.
 For instance in RGBA case, we have BGRA image.
 
   Now, I'm not familiar with the imageio plugin, but it seems like if it
 was horribly broken and returning the wrong channel order, someone would
 have noticed by now.
 
   Has anyone had problems with this on OSX 32-bit or 64-bit?
 
 
 
 
 ___
 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] OSG 3.0.1 on iOS 5

2012-02-22 Thread Stephan Maximilian Huber
Hi,

Am 22.02.12 09:51, schrieb Büsra Gülten:

 Another point I want to indicate is when main-method look like this: 
 
 

 @autoreleasepool 
 {
 return UIApplicationMain(argc, argv, nil, 
 NSStringFromClass([osgAppDelegate class]));
 }


Looks like your main-file gets compiled as Objective C only and chokes
about some c++-stuff. Try renaming the file from *.m to *.mm

cheers,
Stephan

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


Re: [osg-users] osg, macosx-x86_64 imageio plugin color byte swap problem

2012-02-22 Thread Ulrich Hertlein
Hi Chris,

On 22/02/12 20:29 , Stephan Maximilian Huber wrote:
 I tested the imageio-plugin on os x 10.7 with an older 32bit build (from
 Nov 2011) and it works for me. I tested only png and jpg files.

I've also tested imageio on 10.7 with a current 64-bit build (trunk) and it 
works okay
(png, jpg, gif).

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


[osg-users] [osgCompute] Computation on a rendered texture quad

2012-02-22 Thread Jaco Cronje
Hi,

What does the applyAsRenderTarget function do, and when should I call it ?

I have a TextureQuad with a osgCuda::TextureRect on it. The textureRect is 
updated every frame with a frame from a video.
I want to render the quad on the screen and use the same osgCuda::TextureRect 
in my Computation that is attached to the same scenegraph.
The computation only reads from the texture.

The problem is that when I call the map function, I get the 
[osgCuda::TextureMemory::alloc()]: unable to register image object 
(cudaGraphicsGLRegisterImage()) error.

If I don't display the TextureQuad, then the errors goes away. But I need to 
display the TextureQuad. Do I need to call applyAsRenderTarget somewhere ??

Thank you!

Cheers,
Jaco

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





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


Re: [osg-users] Disable all antialiasing

2012-02-22 Thread Aurelien Albert
Hi,

I'm facing a problem when creating my FBO :


Code:
Warning: detected OpenGL error 'invalid operation' at After Renderer::compile
RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cd6
Warning: FrameBufferObject: could not create the FBO
RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x0
Warning: detected OpenGL error 'invalid value' at after RenderBin::draw(..)
Warning: FrameBufferObject: could not create the FBO
RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x0
PixelBufferWin32::bindPBufferToTextureImplementation, wglBindTexImageARB error: 
LÆopÚration a rÚussi.

Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..)
Warning: detected OpenGL error 'invalid operation' at end of SceneView::draw()
Warning: detected OpenGL error 'invalid operation' at start of 
State::apply(StateSet*)
Warning: detected OpenGL error 'invalid operation' at end of 
State::apply(StateSet*)



My code :


Code:
p_renderTexture = new osg::Texture2D();
p_renderTexture-setTextureSize(200, 200);
p_renderTexture-setInternalFormat(GL_RGBA_INTEGER_EXT);
p_renderTexture-setSourceFormat(GL_RGBA32I_EXT);
p_renderTexture-setSourceType(GL_BYTE);
p_renderTexture-setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::NEAREST);
p_renderTexture-setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::NEAREST);
p_renderTexture-setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
p_renderTexture-setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
p_renderTexture-setDataVariance(osg::Object::DYNAMIC); 
p_renderTexture-setUseHardwareMipMapGeneration(false);
p_renderTexture-setResizeNonPowerOfTwoHint(false);




I think there is something wrong with that :

Code:
p_renderTexture-setInternalFormat(GL_RGBA_INTEGER_EXT);
p_renderTexture-setSourceFormat(GL_RGBA32I_EXT);
p_renderTexture-setSourceType(GL_BYTE);




For another application, I use :


Code:
p_renderTexture-setInternalFormat(GL_RGBA32F_ARB);
p_renderTexture-setSourceFormat(GL_RGBA);
p_renderTexture-setSourceType(GL_FLOAT);




which works well to render to a floating point FBO


Thanks for your help !

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





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


Re: [osg-users] Disable all antialiasing

2012-02-22 Thread Aurelien Albert
Hum... I think I'm swapped two parameters.

The following seems to work :


Code:
p_renderTexture-setInternalFormat(GL_RGBA32I_EXT);
p_renderTexture-setSourceFormat(GL_RGBA_INTEGER_EXT);
p_renderTexture-setSourceType(GL_BYTE);




Could you explain me the difference between these 3 parameters ?

setInternalFormat = is it the data storage format ? so here, R, G, B and A 
components stored as a single 32 bit integer ?

setSourceFormat= I don't really understand this parameter...


setSourceType= I don't really understand this parameter...

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





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


[osg-users] Controlling osgViewer through QScriptEngine

2012-02-22 Thread Philipp Moeller
Hello,

has anybody tried to integrate osgViewer with a QScriptEngine? I'm
currently adding scripting support to a Qt based application and wanted
to see if anybody else has experience with it.

Currently I see only one option: write a class derived from QObject that
has the necessary slots to forward everything to the corresponding Qt
functions. A prime candidate for such a wrapper would be osg::Camera or
a osgGA::CameraManipulator or possibly a GUIEventHandler.

Manipulating the scene graph itself through a QScript should be possible
by wrapping the graph in a QAbstractItemModel and exposing this model to
the QScriptEnginge.

Did someone do something similar yet that could be reused or serve as an
example? Any roadblocks I don't see (thread safety probably)?

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


Re: [osg-users] Getting animations initial frame bones matrix

2012-02-22 Thread Aitor Ardanza
Hi,

I managed to see the information I need debugint the proyect in visual studio, 
but I don't know how to reach it ..


Code:

for(int 
i=0;i\_AnimationManager-getOSGManager()-getAnimationList().size();i++){
osg::ref_ptrosgAnimation::Animation anim = 
_AnimationManager-getOSGManager()-getAnimationList()[i];
if(!anim-getName().compare(name)){
osgAnimation::ChannelList channelList = anim-getChannels();
for(int j=0;j\ channelList.size();j++)
{
osgAnimation::Channel* channel = channelList[j];
osgAnimation::TemplateTarget osgAnimation::Target* target = 
channelList[j]-getTarget();
}
}
}



- target 
- osgAnimation::Target
  + osg::Reference
 _Weight
 _priorityWeight
 _lastPriority
- _Target
  - osgAnimation::TemplateTargetosg::Vec3f*
  + osgAnimation::Target
  - _target
   + _v
  + osg::Reference
 _Weight
 _priorityWeight
 _lastPriority

I don't know how to reach _v!
Any suggestion???!!!

Thank you!

Cheers,
Aitor

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





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


Re: [osg-users] Is a render to texture master camera critical?

2012-02-22 Thread Martin Großer
Hi,

I try the RTT master camera and for one view it works fine, but when I want to 
use multiple views in a composite viewer my trackball manipulators don't work. 
Only the first view get a new viewmatrix.

There are any experiance about rtt cameras and camera manipulators? 

Thank you!

Cheers,
Martin

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





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


[osg-users] Missing ot12-OpenThreadsd.dll when building staticlly

2012-02-22 Thread Renato Oliveira
Hi,

I am having an issue when building my code staticlly. when the applicaiton 
runs, i get the error that the ot12-OpenThreadsd.dll is missing. I am using 
openscenegraph staticlly and also osgNV and osgNVPhysx staticlly. using only 
openscenegraph static libs does not give me any problem in my code ( i followed 
the osgstaticviewer example ), however, including osgNV and osgNVPhysx, which 
is also build staticlly, complains about the DLL missing.

Is anyone familiar with osgNV and is there a setting that i am missing?

Thank you!

Cheers,
Renato

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





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


Re: [osg-users] Is a render to texture master camera critical?

2012-02-22 Thread Martin Großer
Hi,

Additionally, the manipulator for the first view only works if I move the 
window at the beginning. It seems to me it only works after the first window 
redraw event. I am not sure. My RTT camera has a viewport with x = 0, y = 0, 
width = textureWidth and height = textureHeight. Is that the problem?

Thank you!

Cheers,
Martin

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





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


Re: [osg-users] Strange results from osgviewer

2012-02-22 Thread Chris Blizniak
Hi,

The version of OSG I'm currently using is 3.0.1.
I tried both source code and binaries, the same problems in both cases.

Apart from the issue with displaying some of the 3D models I have noticed that 
I cannot see any textures I use them in my program. Even the examples provided 
with OSG do not display any textures. 

Is it required to have dependencies like 'libpng' and 'libz' etc. present in 
the system before building OSG?

Because this is the only thing I missed when I was setting up OSG on my 
computer.


Thank you!

Cheers,
Chris

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





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


Re: [osg-users] Strange results from osgviewer

2012-02-22 Thread Robert Osfield
Hi Chris,


On 22 February 2012 14:57, Chris Blizniak bliznia...@hotmail.com wrote:
 The version of OSG I'm currently using is 3.0.1.
 I tried both source code and binaries, the same problems in both cases.

Could you try svn/trunk.  There have been a few updates to the
serializers/.osgt/.osgb/.osgx support since 3.0.1 so there is chance
the problem is now resolved, although as I can't spot a specific bug
fix for the type of problem your are seeing this is a bit of long
shot.

One thing of note is that I don't recall other Windows users using
3.0.1 reporting problems as you've described so there is chance there
is something specific about your setup.

Trying out svn/trunk is worth trying out either ways as if it does
turn out there is bug lurking a fix to this will be made against
svn/trunk before it gets rolled out to stable releases.

 Apart from the issue with displaying some of the 3D models I have noticed 
 that I cannot see any textures I use them in my program. Even the examples 
 provided with OSG do not display any textures.

This is likely simply an issue of now having the image plugins that
these models require to handle images in them.


 Is it required to have dependencies like 'libpng' and 'libz' etc. present in 
 the system before building OSG?

This are optional dependencies - you don't need them to build the OSG,
but if you have models that use formats such as png you'll need the
associated dependencies.  You can use the published 3rd party
dependencies to get the most commonly used external dependencies.

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


Re: [osg-users] Disable all antialiasing

2012-02-22 Thread Sergey Polischuk
Internal format is storage format, it specifies channels number, optionally: 
data type, number of bits per channel etc
Source format is specification of components number, meaning and order
Source type is storage data type in image used to load texture from image

22.02.2012, 17:14, Aurelien Albert aurelien.alb...@alyotech.fr:
 Hum... I think I'm swapped two parameters.

 The following seems to work :

 Code:
 p_renderTexture-setInternalFormat(GL_RGBA32I_EXT);
 p_renderTexture-setSourceFormat(GL_RGBA_INTEGER_EXT);
 p_renderTexture-setSourceType(GL_BYTE);

 Could you explain me the difference between these 3 parameters ?

 setInternalFormat = is it the data storage format ? so here, R, G, B and A 
 components stored as a single 32 bit integer ?

 setSourceFormat= I don't really understand this parameter...

 setSourceType= I don't really understand this parameter...

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

 ___
 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] Is a render to texture master camera critical?

2012-02-22 Thread Martin Großer
Hello all,

I note only my post sent per mail. I tried the forum and this was the first 
time. Sorry about the confusing mails. However I hope someone understand my 
problem.

I would like to state my question even more clearly. When I define a viewport 
like setViewport(0,0,800,600) to change the influence range of the trackball 
manipulator to the right top corner like (400,300,400,300)?

I think that could solve my problem.

Thanks

Cheers,
Martin

 Original-Nachricht 
 Datum: Wed, 22 Feb 2012 15:56:15 +0100
 Von: Martin Großer grosser.mar...@gmx.de
 An: osg-users@lists.openscenegraph.org
 Betreff: Re: [osg-users] Is a render to texture master camera critical?

 Hi,
 
 Additionally, the manipulator for the first view only works if I move the
 window at the beginning. It seems to me it only works after the first
 window redraw event. I am not sure. My RTT camera has a viewport with x = 0, 
 y =
 0, width = textureWidth and height = textureHeight. Is that the problem?
 
 Thank you!
 
 Cheers,
 Martin
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=45684#45684
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg, macosx-x86_64 imageio plugin color byte swap problem

2012-02-22 Thread Chris Hanson
On Wed, Feb 22, 2012 at 2:55 AM, Ulrich Hertlein u.hertl...@sandbox.dewrote:

 Hi Chris,
 On 22/02/12 20:29 , Stephan Maximilian Huber wrote:
  I tested the imageio-plugin on os x 10.7 with an older 32bit build (from
  Nov 2011) and it works for me. I tested only png and jpg files.
 I've also tested imageio on 10.7 with a current 64-bit build (trunk) and
 it works okay
 (png, jpg, gif).


  Thanks for the feedback.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] KeySwitchMatrixManipulator

2012-02-22 Thread Gianni Ambrosio
Hi,
I set my own KeySwitchMatrixManipulator in an osg viewer as follows:

osgViewer::View::setCameraManipulator(keyswitchManipulator.get());

Now, is there a way to set one of the manipulators programmatically? I mean, 
the default manipulator is a TrackballManipulator, but in a particular case I 
would like to force a NodeTrackerManipulator (the second one in the 
KeySwitchMatrixManipulator list). Can you help me please?

Regards,
Gianni

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





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


Re: [osg-users] KeySwitchMatrixManipulator

2012-02-22 Thread Robert Osfield
HI Gianni,

On 22 February 2012 16:17, Gianni Ambrosio ga...@vi-grade.com wrote:
 Hi,
 I set my own KeySwitchMatrixManipulator in an osg viewer as follows:

 osgViewer::View::setCameraManipulator(keyswitchManipulator.get());

 Now, is there a way to set one of the manipulators programmatically? I mean, 
 the default manipulator is a TrackballManipulator, but in a particular case I 
 would like to force a NodeTrackerManipulator (the second one in the 
 KeySwitchMatrixManipulator list). Can you help me please?

You simply use KeySwitchMatrixManipulator::selectMatrixManipulator(num)
where num is the index of the manipulator you want to select.  See the
applications/osgviewer/osgviewer.cpp to see an example of this in
action.

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


Re: [osg-users] Rendering an OpenSceneGraph scene in Qt QuickRendering an OpenSceneGraph scene in QML Rendering an OpenSceneGraph scene in QML

2012-02-22 Thread jamie robertson
Hi,

Have you seen the qml ogre demo? I assume you could do the same thing for osg.

Regards,

Jamie

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





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


[osg-users] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Jason Daly


Hi, all,

I'm interested in determining how many OpenGL draw calls are made during 
the rendering of a frame (counting and storing them as a Stats 
variable).  I'm sure this is possible, but I wonder if it would be 
feasible to do without significantly affecting performance.


Anyone have any thoughts?

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


Re: [osg-users] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Buckley, Bob CTR MDA/DES
gDEBugger has the ability to view OpenGL Call history.
Can't speak on the performance hit.
But, sounds like you need it in the app itself.
I don't know of an internal mechanism.
However, should be able to easily CASE a thin inlined OpenGL layer with metrics 
embedded.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
Sent: Wednesday, February 22, 2012 11:35 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Counting OpenGL Draw calls in Stats


Hi, all,

I'm interested in determining how many OpenGL draw calls are made during 
the rendering of a frame (counting and storing them as a Stats 
variable).  I'm sure this is possible, but I wonder if it would be 
feasible to do without significantly affecting performance.

Anyone have any thoughts?

--J
___
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] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Jason Daly


Thanks, Bob.

I've used gDEBugger for this before, but for this case, I need to get it 
into the OSG Stats proper.  The capability isn't there yet, so I'm 
looking into adding it.  I'm trying to gauge how feasible it would be to 
add this feature without adversely affecting performance.


The current frame Stats don't seem too heavy, but they're mainly taking 
measurements before and after the frame, not counting events that happen 
during the frame.


--J


On 02/22/2012 03:22 PM, Buckley, Bob CTR MDA/DES wrote:

gDEBugger has the ability to view OpenGL Call history.
Can't speak on the performance hit.
But, sounds like you need it in the app itself.
I don't know of an internal mechanism.
However, should be able to easily CASE a thin inlined OpenGL layer with metrics 
embedded.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
Sent: Wednesday, February 22, 2012 11:35 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Counting OpenGL Draw calls in Stats


Hi, all,

I'm interested in determining how many OpenGL draw calls are made during
the rendering of a frame (counting and storing them as a Stats
variable).  I'm sure this is possible, but I wonder if it would be
feasible to do without significantly affecting performance.

Anyone have any thoughts?

--J
___
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] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Buckley, Bob CTR MDA/DES
OpenGL video driver comes to mind.
Anything in the spec that facilitates this across platforms?

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
Sent: Wednesday, February 22, 2012 1:34 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Counting OpenGL Draw calls in Stats


Thanks, Bob.

I've used gDEBugger for this before, but for this case, I need to get it 
into the OSG Stats proper.  The capability isn't there yet, so I'm 
looking into adding it.  I'm trying to gauge how feasible it would be to 
add this feature without adversely affecting performance.

The current frame Stats don't seem too heavy, but they're mainly taking 
measurements before and after the frame, not counting events that happen 
during the frame.

--J


On 02/22/2012 03:22 PM, Buckley, Bob CTR MDA/DES wrote:
 gDEBugger has the ability to view OpenGL Call history.
 Can't speak on the performance hit.
 But, sounds like you need it in the app itself.
 I don't know of an internal mechanism.
 However, should be able to easily CASE a thin inlined OpenGL layer with 
 metrics embedded.

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
 Sent: Wednesday, February 22, 2012 11:35 AM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Counting OpenGL Draw calls in Stats


 Hi, all,

 I'm interested in determining how many OpenGL draw calls are made during
 the rendering of a frame (counting and storing them as a Stats
 variable).  I'm sure this is possible, but I wonder if it would be
 feasible to do without significantly affecting performance.

 Anyone have any thoughts?

 --J
 ___
 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
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Help: problems of intersectorVisitor with Qtmutex

2012-02-22 Thread wang shuiying


Hello,

My program has an osg::viewer as a view widget of a Qt window. An 
intersectorVisitor object  is initialised at the start of the program.  
The osg::viewer updates its children nodes  as a normal viewer does, and 
updates the transform matrix of intersectorVisitor at the same time. I 
make another thread to do call of node-accept(intersectorVisitor), 
where the node is the root node of osg::viewer. In case that the two 
processes might conflict with each other I set lock with Qmutex when the 
osg::viewer updates and when  node-accept(intersectorVisitor) is 
called in another thread.  But the result turns out to be wrong. When I 
let the two processes run freely without locking them, then the result 
is right.


I am wondering what happens here. That is to say, what 
intersectorVositor will do when it itself is locked or the nodes that it 
visits are locked.


Thank you very much in advance!

Shuiying


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


Re: [osg-users] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Buckley, Bob CTR MDA/DES
A co-worker sent me this:

http://www.opengl.org/sdk/tools/GLIntercept/
It wraps opengl32.dll so that it can log all calls to OpenGL
Unfortunately, it appears to be Windows only.


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Buckley, Bob 
CTR MDA/DES
Sent: Wednesday, February 22, 2012 2:02 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Counting OpenGL Draw calls in Stats

OpenGL video driver comes to mind.
Anything in the spec that facilitates this across platforms?

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
Sent: Wednesday, February 22, 2012 1:34 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Counting OpenGL Draw calls in Stats


Thanks, Bob.

I've used gDEBugger for this before, but for this case, I need to get it 
into the OSG Stats proper.  The capability isn't there yet, so I'm 
looking into adding it.  I'm trying to gauge how feasible it would be to 
add this feature without adversely affecting performance.

The current frame Stats don't seem too heavy, but they're mainly taking 
measurements before and after the frame, not counting events that happen 
during the frame.

--J


On 02/22/2012 03:22 PM, Buckley, Bob CTR MDA/DES wrote:
 gDEBugger has the ability to view OpenGL Call history.
 Can't speak on the performance hit.
 But, sounds like you need it in the app itself.
 I don't know of an internal mechanism.
 However, should be able to easily CASE a thin inlined OpenGL layer with 
 metrics embedded.

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
 Sent: Wednesday, February 22, 2012 11:35 AM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Counting OpenGL Draw calls in Stats


 Hi, all,

 I'm interested in determining how many OpenGL draw calls are made during
 the rendering of a frame (counting and storing them as a Stats
 variable).  I'm sure this is possible, but I wonder if it would be
 feasible to do without significantly affecting performance.

 Anyone have any thoughts?

 --J
 ___
 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
___
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] setViewMatrixAsLookAt in Qt

2012-02-22 Thread Tom Pearce
Hi Chris,

Can you give a bit more info about what you've tried and why it isn't working?

I haven't worked with osgViewerQt before, but it looks like it inherits from 
osgViewer::Viewer, runs in single threaded mode, and frame() is called by the 
paintGL method, which is presumably triggered by the QApplication's event loop. 
 In this case, it ought to be safe to set the camera position in other events 
in the same loop, such as user interaction through the sliders you want to use.

What I'd recommend is connecting the sliders via the signal/slot mechanism to a 
function you define, which reads the value of each slider and creates an 
osg::Vec3 from them.  This will be your eye vector.  You also will define the 
center vector (the point the camera aims at) and the up vector of the 
camera.

To actually get the camera, use ViewerQT::getCamera() (inherited from 
osgViewer::Viewer).  Then make the call to setViewMatrixAsLookAt with the 
vectors from above.

Hope that helps,
Tom

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





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


Re: [osg-users] [osgPlugins] Problem in loading Shape file

2012-02-22 Thread Ulrich Hertlein
Hi Lalit,

On 24/12/11 0:32 , Lalit Manchwari wrote:
 I followed your instruction and now program is not crashing. But in some file 
 it does
 not load the complete shape file. I have attached here a shape file and its 
 snapshot
 (with complete view).
 
 Please could you help.

When opening the 'polygon.shp' file I'm getting the following from osgviewer:

ESRIShape loader : .dbf file containe different record number that .shp file.
   .dbf record skipped.

This appears to indicate a problem with the .shp loader, but I don't know 
enough about
shape files to make any further comment, sorry.

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


Re: [osg-users] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Jason Daly

On 02/22/2012 05:53 PM, Buckley, Bob CTR MDA/DES wrote:

A co-worker sent me this:

http://www.opengl.org/sdk/tools/GLIntercept/
It wraps opengl32.dll so that it can log all calls to OpenGL
Unfortunately, it appears to be Windows only.



Hi, Bob,

I'm not really interested in any other solutions outside of OSG itself.

What I'm considering specifically is adding code to count the actual 
OpenGL draw calls made by OSG (mainly in PrimitiveSet.cpp) and placing 
the count into an osg::Stats variable (much like the FPS, update, cull, 
and draw times, number of groups and geodes in the scene, etc).  I'd 
like to add GL draw calls as a stat that can be queried in code (and 
conceivably could be put into the StatsHandler display).


I'm just not sure whether or not collecting this count would be too 
heavy for general use.  If it can't be done without a driver layer or 
some kind of non-standard instrumentation (like gDEBugger), then we'd 
rather just not do it.


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


Re: [osg-users] Testing of OpenSceneGraph svn/trunk in prep for 3.1 dev release

2012-02-22 Thread Torben Dannhauer
Hi Robert,

OSG compiles and runs as expected on Kubuntu 10.04

I'll compile it on windows 7 with VS2008 Sp1 today evening.



Cheers,
Torben

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





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