Re: [osg-users] osgviewerQt example - 3D disappears if Viewer height is zero

2014-04-15 Thread Alistair Baxter
Yeah, we had to override the Qt resizeEvent function for our osgQt::GLWidget 
subclass to ensure that neither width nor height were being set to zero before 
calling the parent's version.

Alistair Baxter
Software Engineer

Join us for the 2014 Houston Roadshow on 4th April
More details on our Calendar: http://www.mve.com/calendar

Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] VertexAttribArrayList serialization

2014-04-15 Thread Sebastian Messerschmidt

Hi Robert,

I'm a bit lost with the issue. Isn't the osgb-format supposed to be stable?
Can you at least point me to the revision where this might have changed?
Summarized: It seems files written by the trunk-revision 14033 cannot be 
read by older versions (osg111, 3.3.1). Also files containing vertex 
attribute arrays cannot be read by the revision it was written with.


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


Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-15 Thread Trajce Nikolov NICK
Hi Michael,

this sounds good but I just tried and it seam without changing the OSG code
it is not possible as well. The StandardShadowMap does not holds any
instance of the StandardShadowMap::ViewData where the _stateset is kept.

Nick


On Tue, Apr 15, 2014 at 7:29 AM, michael kapelko korn...@gmail.com wrote:

 I would derive from StandardShadowMap to gain access to _stateset
 variable. Then, osg::StateSet::getAttribute can return osg::Program it
 contains.


 2014-04-14 22:44 GMT+07:00 Trajce Nikolov NICK 
 trajce.nikolov.n...@gmail.com:

 I looked at the code of StandardShadowMap.cpp and I think this object at
 line: 544 osg::Program has to be exposed to the interface as well. Robert,
 will You accept such a change, it is minor but will change the interface
 with one getProgram() method and will not brake anything. This case is good
 example of such a need when you for example wants to mix the shaders of the
 ShadowMap with your own

 Nick


 On Mon, Apr 14, 2014 at 12:35 PM, Trajce Nikolov NICK 
 trajce.nikolov.n...@gmail.com wrote:

 Knowing the problem a bit I think the question is how to access the
 osg::Program of the shader technique for binding vertex attributes like the
 binormal and tangents arrays.

 Nick


 On Mon, Apr 14, 2014 at 11:07 AM, Jaime xatp...@hotmail.com wrote:

 Thanks kornerr.

 I was checking your code, but the problem is that I don't want deferred
 shading, because I need transparency too.

 I think I should use LightSpacePerspectiveShadowMap because there I can
 use setShadowVertex/FragementeShader.

 Nick helped me with his code (thanks again Nick!), but we need to pass
 the attributes (binormal and tangent) to the shader, and then it has to be
 used by osg Shadow Mapping.

 So, does anybody know how to pass attributes to this shaders??

 Thanks a lot!

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





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




 --
 trajce nikolov nick




 --
 trajce nikolov nick

 ___
 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




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


[osg-users] multi-threading troubles with 2 graphic cards

2014-04-15 Thread Thierry Pébayle
Dear all,

I'm trying to render a town with 2 graphic cards in the same computer: i7-3770 
(quad core with hyper-threading = 8 cores virtual), 2x gtx780ti, xubuntu 12.04, 
OSG3.2.0.

A separate X server run on each card and there is only one monitor(screen) 
attach to each card.
So I run the application twice (one per X server) with separate graphical 
context and DrawThreadPerContext threading model.

I monitor cpu core usage with sar command (from sysstat package).
The system sees 8 cores as expected.

The two Application+cull threads are running on two separate cores (that's 
nice) but the two draw threads are allways running on the same core resulting 
in a lack of performance...

Have you got any idea to solve this trouble ?

Thank you!

Cheers,
Thierry

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





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


[osg-users] A suspicious bug of MatrixD

2014-04-15 Thread Tianlan Shao
Dear all,
The following code in the header file MatrixD looks very suspicious to me:

inline Vec3d getScale() const {
  Vec3d x_vec(_mat[0][0],_mat[1][0],_mat[2][0]);
  Vec3d y_vec(_mat[0][1],_mat[1][1],_mat[2][1]);
  Vec3d z_vec(_mat[0][2],_mat[1][2],_mat[2][2]);
  return Vec3d(x_vec.length(), y_vec.length(), z_vec.length());
}

Shouldn't the index order be the other way around? I mean it should be

inline Vec3d getScale() const {
  Vec3d x_vec(_mat[0][0],_mat[0][1],_mat[0][2]);
  Vec3d y_vec(_mat[1][0],_mat[1][1],_mat[1][2]);
  Vec3d z_vec(_mat[2][0],_mat[2][1],_mat[2][2]);
  return Vec3d(x_vec.length(), y_vec.length(), z_vec.length());
}

The behaviour of my program was strange before I fix this problem. I'm not
100% percent sure, but since it's of fundamental importance, I still
decided to report.

Best regards,
Tianlan Shao
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Definding against aggressive domain

2014-04-15 Thread Thomas Hogarth
Hi

I hate these types of people.

I've had some troll sitting on hogbox.com for years now. I brought
hogbox.co.uk when I was a student and couldn't afford .com at the time.

Then someone brought .com and occasionally sends me emails saying they will
sell it to me for a price in the hundreds of dollars. I just reply saying
they're a troll and I will never pay them over the odds for a hobby url.

Anyhow, frustration vented. As we have the decent URLs I agree it doesn't
really matter, especially as there is no money changing hands on these
urls. The worst that might happen is someone gets there forum login pinched
when they go to openschemegraph.com ;)

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


Re: [osg-users] ShadowMap + Other shaders (bump, specular, etc) example???

2014-04-15 Thread michael kapelko
Well, you said you want osg::Program at StandardShadowMap.cpp:544. That
osg::Program is set to _stateset just on the next line. So if osg::Program
of _stateset doesn't work for you, there's no use exposing it.


2014-04-15 17:50 GMT+07:00 Trajce Nikolov NICK 
trajce.nikolov.n...@gmail.com:

 Hi Michael,

 this sounds good but I just tried and it seam without changing the OSG
 code it is not possible as well. The StandardShadowMap does not holds any
 instance of the StandardShadowMap::ViewData where the _stateset is kept.

 Nick


 On Tue, Apr 15, 2014 at 7:29 AM, michael kapelko korn...@gmail.comwrote:

 I would derive from StandardShadowMap to gain access to _stateset
 variable. Then, osg::StateSet::getAttribute can return osg::Program it
 contains.


 2014-04-14 22:44 GMT+07:00 Trajce Nikolov NICK 
 trajce.nikolov.n...@gmail.com:

 I looked at the code of StandardShadowMap.cpp and I think this object at
 line: 544 osg::Program has to be exposed to the interface as well. Robert,
 will You accept such a change, it is minor but will change the interface
 with one getProgram() method and will not brake anything. This case is good
 example of such a need when you for example wants to mix the shaders of the
 ShadowMap with your own

 Nick


 On Mon, Apr 14, 2014 at 12:35 PM, Trajce Nikolov NICK 
 trajce.nikolov.n...@gmail.com wrote:

 Knowing the problem a bit I think the question is how to access the
 osg::Program of the shader technique for binding vertex attributes like the
 binormal and tangents arrays.

 Nick


 On Mon, Apr 14, 2014 at 11:07 AM, Jaime xatp...@hotmail.com wrote:

 Thanks kornerr.

 I was checking your code, but the problem is that I don't want
 deferred shading, because I need transparency too.

 I think I should use LightSpacePerspectiveShadowMap because there I
 can use setShadowVertex/FragementeShader.

 Nick helped me with his code (thanks again Nick!), but we need to pass
 the attributes (binormal and tangent) to the shader, and then it has to be
 used by osg Shadow Mapping.

 So, does anybody know how to pass attributes to this shaders??

 Thanks a lot!

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





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




 --
 trajce nikolov nick




 --
 trajce nikolov nick

 ___
 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




 --
 trajce nikolov nick

 ___
 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