Re: [osg-users] How to add shadows to deferred shading?

2015-10-27 Thread Sebastian Messerschmidt

Hi folks,

Sorry for hijacking this thread, but after a relatively long time I'll 
have to work on deferred shadow mapping again.



I did sample implementation using mentioned osgRecipes' 
EffectCompositor some time ago: 
https://bitbucket.org/kornerr/osg-deferred-shading


I checked out the example and it is working, but not really deferred, as 
the shadows are applied by rendering the scene three times ( gbuffer 
pass,  from the light source, applying the shadow map to the scene) if I 
understood the code correctly.
It is that last part which ruins it. I've been crawling around in the 
ShadowMap code but I'm lost on how to do the following:


1. Use the culling/rendering to shadow map texture-code which is already 
there

2. Get the matrix used by 1.) into an uniform
3. NOT let the shadow-technique render apply to the scene, but leave the 
application to me (for instance in a later pass)


I'm simply to stupid to find the appropriate piece in the code, which 
applies the shadow map.


cheers
Sebastian



2015-09-16 13:35 GMT+07:00 Trajce Nikolov NICK 
>:


Hi Daniel,

here is some work from Wang Rui (the effectcompositor) that has DR
implemented with some sample shaders

https://github.com/xarray/osgRecipes

Nick

On Wed, Sep 16, 2015 at 8:32 AM, Daniel Schmid
> wrote:

Hi Sebastian

I read in lot of posts that you have experience with deferred
rendering in osg. Could you share some of your insights and
probably even samples or code snippets that could bring some
more light into this topic?

I'm basically interested in:
- construction of G-Buffer
- integration of Shadow (VDSM), maybe even for multiple lights?
- choice and integration of postprocessing framework
- antialiasing method / shader

It would be of so much help!

Thank you!

Cheers,
Daniel

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





___
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


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


Re: [osg-users] Setting update callback for osgSim::LightPointNode has no effect

2015-10-27 Thread Robert Osfield
HI Nick,

The way the OSG implement node callbacks are as traversal callbacks that
are nested within the traverse of the node itself, so it's in effect a
traverse children callback.  In the case of osgSim::LightPointNode it's
implemented as a leaf node so doesn't bother calling
NodeVisitor::traverse() to traverse any further so the callbacks aren't
called.

The best I workaround I can think of is subclassing from LightPointNode and
overriding the LightPointNode::traverse() method to add in a
NodeVisitor::traverse() call as well as the LightPointNode::traverse().
Another route might be to add the update callback to the parent.  Or
perhaps just subclass from LightPointNode and treat this subclass as your
update callback etc.

Robert.

On 27 October 2015 at 12:23, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi community,
>
> I installed an update callback to a osgSim::LightPointNode .. However it
> is never called. Any hints, clue?
>
> Thanks as always!
>
> 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


Re: [osg-users] Oculus+OSG

2015-10-27 Thread Björn Blissing

Chris Hanson wrote:
> Is the additional performance penalty for OGL apps (versus DX) from context 
> sharing still an issue?


Well, I still see some frame drops in the OpenGL example compared to the 
DirectX version, which is running without any drops at all. But it's much 
better compared to the previous SDK version. Now I am getting a frame drop 
maybe once every 2 minutes compared to getting drops every other second.

Best regards
Björn

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





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


Re: [osg-users] How to add shadows to deferred shading?

2015-10-27 Thread michael kapelko
Hi.
I failed to implement shadows myself and failed to understand osgShadow, so
ended up simply using it in a separate pass, as you outlined. Can't help
here, sorry.

2015-10-27 16:02 GMT+07:00 Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de>:

> Hi folks,
>
> Sorry for hijacking this thread, but after a relatively long time I'll
> have to work on deferred shadow mapping again.
>
>
> I did sample implementation using mentioned osgRecipes' EffectCompositor
> some time ago: 
> https://bitbucket.org/kornerr/osg-deferred-shading
>
>
> I checked out the example and it is working, but not really deferred, as
> the shadows are applied by rendering the scene three times ( gbuffer pass,
> from the light source, applying the shadow map to the scene) if I
> understood the code correctly.
> It is that last part which ruins it. I've been crawling around in the
> ShadowMap code but I'm lost on how to do the following:
>
> 1. Use the culling/rendering to shadow map texture-code which is already
> there
> 2. Get the matrix used by 1.) into an uniform
> 3. NOT let the shadow-technique render apply to the scene, but leave the
> application to me (for instance in a later pass)
>
> I'm simply to stupid to find the appropriate piece in the code, which
> applies the shadow map.
>
> cheers
> Sebastian
>
>
> 2015-09-16 13:35 GMT+07:00 Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com>:
>
>> Hi Daniel,
>>
>> here is some work from Wang Rui (the effectcompositor) that has DR
>> implemented with some sample shaders
>>
>> https://github.com/xarray/osgRecipes
>>
>> Nick
>>
>> On Wed, Sep 16, 2015 at 8:32 AM, Daniel Schmid <
>> daniel.sch...@swiss-simtec.ch> wrote:
>>
>>> Hi Sebastian
>>>
>>> I read in lot of posts that you have experience with deferred rendering
>>> in osg. Could you share some of your insights and probably even samples or
>>> code snippets that could bring some more light into this topic?
>>>
>>> I'm basically interested in:
>>> - construction of G-Buffer
>>> - integration of Shadow (VDSM), maybe even for multiple lights?
>>> - choice and integration of postprocessing framework
>>> - antialiasing method / shader
>>>
>>> It would be of so much help!
>>>
>>> Thank you!
>>>
>>> Cheers,
>>> Daniel
>>>
>>> --
>>> Read this topic online here:
>>> http://forum.openscenegraph.org/viewtopic.php?p=65140#65140
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> 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 
> listosg-users@lists.openscenegraph.orghttp://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] Setting update callback for osgSim::LightPointNode has no effect

2015-10-27 Thread Trajce Nikolov NICK
Hi community,

I installed an update callback to a osgSim::LightPointNode .. However it is
never called. Any hints, clue?

Thanks as always!

Nick

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


Re: [osg-users] OSGNode VBO Control

2015-10-27 Thread Robert Osfield
Hi Ignitus,

On 27 October 2015 at 15:43, Ignitus Boyone  wrote:

> I can spend sometime exploring render order. The scene has a few dynamic
> elements and I believe if the uploads for those elements happens after the
> VBO draw-calls then I am likely suffering  a longer pipeline stall then I
> really can afford.


It still sounds like you've decided upon what the problem is, what it may
not be an issue at all.

Don't make any assumptions what performance problem might be before doing
benchmarking, there are many things that affect performance, and many
different solutions.

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


[osg-users] how to set width and Stipple of a osgText::BoundingBox?

2015-10-27 Thread Lv Qing
Hi,

I want to modify text.cpp so can set osgText::BoundingBox's width and line 
Stipple.

Here is how osg draw BOUNDINGBOX in text.cpp:

 if (_drawMode & BOUNDINGBOX)
{

if (_textBB.valid())
{
state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF);

const osg::Matrix& matrix = _autoTransformCache[contextID]._matrix;

osg::Vec3 
c00(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix);
osg::Vec3 
c10(osg::Vec3(_textBB.xMax(),_textBB.yMin(),_textBB.zMin())*matrix);
osg::Vec3 
c11(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMin())*matrix);
osg::Vec3 
c01(osg::Vec3(_textBB.xMin(),_textBB.yMax(),_textBB.zMin())*matrix);



gl.Color4f(colorMultiplier.r()*_textBBColor.r(),colorMultiplier.g()*_textBBColor.g(),colorMultiplier.b()*_textBBColor.b(),colorMultiplier.a()*_textBBColor.a());
gl.Begin(GL_LINE_LOOP);
gl.Vertex3fv(c00.ptr());
gl.Vertex3fv(c10.ptr());
gl.Vertex3fv(c11.ptr());
gl.Vertex3fv(c01.ptr());
gl.End();
}
}

I have added this two line before gl.Begin(GL_LINE_LOOP):

glLineWidth (2.0);
glLineStipple (1, 0x0F0F);

It seems not work,need help!

Thank you!

Cheers,
Lv

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





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


Re: [osg-users] OSGNode VBO Control

2015-10-27 Thread Ignitus Boyone
Hi,

I can spend sometime exploring render order. The scene has a few dynamic 
elements and I believe if the uploads for those elements happens after the VBO 
draw-calls then I am likely suffering  a longer pipeline stall then I really 
can afford.  

... 

Thank you!

Cheers,
Ignitus

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





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


Re: [osg-users] OSGNode VBO Control

2015-10-27 Thread Robert Osfield
Hi Ignitus,

I can't help feel that you are diving into low level stuff way you've
established that it's required.

The OSG can manage update's to VBO's for you, it doesn't current support
updating parts of osg::Array, potentially you can implement this yourself
with a custom draw callback or custom Drawable, but personally I'd
recommend not attempting anything like this early in your project.

My recommendation would be to implement what you need just using standard
OSG components and once you have what you want rendered onscreen then do
performance profiling (with an optimized build) on the target platforms to
see whether you have the performance you are after.  If you have the
performance you need, job done, not need to waste any more time.  If you
don't have the performance you need then start looking at what the
bottleneck is.  Only once you've established what the bottleneck is should
you start considering looking at re-organizing your scene graph. Using
custom custom VBO management would the amongst the last things I'd try.

Robert.

On 27 October 2015 at 14:40, Ignitus Boyone  wrote:

> Hi,
>
> I'm starting to work my way through the source for Geometry and Drawable,
> but more experienced minds might be able to point me in the right
> directions sooner.
>
> I'm working on a AR HUD and because a later point in the project might
> require the  loading of complex models to represent avatars or vehicles
> inside the AR space we have chosen to use OSG as a starting point. The
> current UI is currently relatively primitive and basically consist entirely
> of billboards of varying textures with minor text glyphs to indicate
> various properties.
>
> I've implemented most of the billboards in a single VBO based Geometry
> node.  Because the target hardware is lacking I wanted to play with partial
> updates to the VBO contents based on our current draw performance.  First
> pass I simply created a post function for manually controlling where in the
> draw thread buffer transfers occur, but it has become apparent to me from
> profiling that this might only be marking the VBO as dirty and the actual
> upload occurring during the next draw frame.
>
>
>
> Code:
> void OSGVboMarker::post()
>{
> if (m_frontVBO.isInitialized && m_bDirtyBit)
> {
> m_swapLock.lock();
> int count = m_frontVBO.vertices->size();
> m_pGeometry->setVertexArray( m_frontVBO.vertices );
>
> m_pGeometry->setNormalArray(m_frontVBO.normal,
> osg::Array::BIND_OVERALL);
> m_pGeometry->setColorArray(m_frontVBO.color,
> osg::Array::BIND_OVERALL);
>
>
> m_pGeometry->setTexCoordArray(0,m_frontVBO.texCoords,
> osg::Array::BIND_PER_VERTEX);
>
> m_pGeometry->setVertexAttribArray(5,
> m_frontVBO.centers, osg::Array::BIND_PER_VERTEX);
> m_pGeometry->setVertexAttribArray(6,
> m_frontVBO.scaleValues, osg::Array::BIND_PER_VERTEX);
>
> m_pDrawArrays->setCount(count);
> m_pDrawArrays->set(osg::PrimitiveSet::QUADS, 0,
> count);
>
>
>
>
> So, I have two questions related to the above.
>
> 1. When do modified VBO nodes push memory to the card.
> 2. Is it possible to manually control this operation and possibly do sub
> buffer updates.
> ...
>
> Thank you!
>
> Cheers,
> Ignitus
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65456#65456
>
>
>
>
>
> ___
> 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] OSGNode VBO Control

2015-10-27 Thread Ignitus Boyone
Hi,

I'm starting to work my way through the source for Geometry and Drawable, but 
more experienced minds might be able to point me in the right directions sooner.

I'm working on a AR HUD and because a later point in the project might require 
the  loading of complex models to represent avatars or vehicles inside the AR 
space we have chosen to use OSG as a starting point. The current UI is 
currently relatively primitive and basically consist entirely of billboards of 
varying textures with minor text glyphs to indicate various properties. 

I've implemented most of the billboards in a single VBO based Geometry node.  
Because the target hardware is lacking I wanted to play with partial updates to 
the VBO contents based on our current draw performance.  First pass I simply 
created a post function for manually controlling where in the draw thread 
buffer transfers occur, but it has become apparent to me from profiling that 
this might only be marking the VBO as dirty and the actual upload occurring 
during the next draw frame. 



Code:
void OSGVboMarker::post()
   {
if (m_frontVBO.isInitialized && m_bDirtyBit)
{
m_swapLock.lock();
int count = m_frontVBO.vertices->size();
m_pGeometry->setVertexArray( m_frontVBO.vertices );

m_pGeometry->setNormalArray(m_frontVBO.normal, 
osg::Array::BIND_OVERALL);
m_pGeometry->setColorArray(m_frontVBO.color, 
osg::Array::BIND_OVERALL);

m_pGeometry->setTexCoordArray(0,m_frontVBO.texCoords, 
osg::Array::BIND_PER_VERTEX);

m_pGeometry->setVertexAttribArray(5, 
m_frontVBO.centers, osg::Array::BIND_PER_VERTEX);
m_pGeometry->setVertexAttribArray(6, 
m_frontVBO.scaleValues, osg::Array::BIND_PER_VERTEX);

m_pDrawArrays->setCount(count);
m_pDrawArrays->set(osg::PrimitiveSet::QUADS, 0, count);




So, I have two questions related to the above. 

1. When do modified VBO nodes push memory to the card.
2. Is it possible to manually control this operation and possibly do sub buffer 
updates. 
... 

Thank you!

Cheers,
Ignitus

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





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


Re: [osg-users] how to set width and Stipple of a osgText::BoundingBox?

2015-10-27 Thread Robert Osfield
Hi Lv,

I haven't tried modifying the drawing style of bounding box of an
osgText::Text before, but it should be possible by decorating the Text
subgraph with an osg::StateSet with the osg::LineStipple and osg::LineWidth
StateAttributes attached to the StateSet to control the stipple and line
width respectively.

The only restriction on doing this with osgText::Text will be that osgText
manages the StateSet of the Text object automatically, to enable the
correct texture to be assigned and to be shared between Text elements.
This means your own osg::StateSet should be assigned to an Node that
decorates the Text object rather that the Text itself.

Robert.

On 27 October 2015 at 16:22, Lv Qing  wrote:

> Hi,
>
> I want to modify text.cpp so can set osgText::BoundingBox's width and line
> Stipple.
>
> Here is how osg draw BOUNDINGBOX in text.cpp:
>
>  if (_drawMode & BOUNDINGBOX)
> {
>
> if (_textBB.valid())
> {
>
> state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF);
>
> const osg::Matrix& matrix =
> _autoTransformCache[contextID]._matrix;
>
> osg::Vec3
> c00(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix);
> osg::Vec3
> c10(osg::Vec3(_textBB.xMax(),_textBB.yMin(),_textBB.zMin())*matrix);
> osg::Vec3
> c11(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMin())*matrix);
> osg::Vec3
> c01(osg::Vec3(_textBB.xMin(),_textBB.yMax(),_textBB.zMin())*matrix);
>
>
>
> gl.Color4f(colorMultiplier.r()*_textBBColor.r(),colorMultiplier.g()*_textBBColor.g(),colorMultiplier.b()*_textBBColor.b(),colorMultiplier.a()*_textBBColor.a());
> gl.Begin(GL_LINE_LOOP);
> gl.Vertex3fv(c00.ptr());
> gl.Vertex3fv(c10.ptr());
> gl.Vertex3fv(c11.ptr());
> gl.Vertex3fv(c01.ptr());
> gl.End();
> }
> }
>
> I have added this two line before gl.Begin(GL_LINE_LOOP):
>
> glLineWidth (2.0);
> glLineStipple (1, 0x0F0F);
>
> It seems not work,need help!
>
> Thank you!
>
> Cheers,
> Lv
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65460#65460
>
>
>
>
>
> ___
> 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] how to set width and Stipple of a osgText::BoundingBox?

2015-10-27 Thread Robert Osfield
Hi Lv,

osgText::Text implementation is very pretty old now, with a design driven
by the needs of very old hardware.  If I were to rewrite osgText I would
not implement it the has been.  I would not recommend adding OpenGL coding
into osgText::Text as this breaks OSG's ability to do lazy state updating.

Robert.

On 27 October 2015 at 16:48, Lv Qing  wrote:

> Thx!Robert!
>
> The situation is,we  have modified the text.cpp to create some other
> styles rather than boundingbox.
>
> Like a BoundingLine,one end to one of the corner of a BoundingBox,the
> other end linked to a osg::Node.
>
>So if a text have a BoundingLine and a BoundingBox,I just want draw the
> BoundingBox as normal,but draw the BoundingLine with LineStipple .So I
> think one osg::StateSet may not solve this problem.
>
>   I am not quiet  familiar with the openGL programming since I use osg at
> first.I search the web found people use this code to set
> Linewidth and Stipple
>
> glLineWidth (2.0);
> glLineStipple (1, 0x0F0F);
>
> And I look into text.cpp,found lots of code like use openGL directly,such
> as :
>
>  //glClear(GL_STENCIL_BUFFER_BIT);
>
>  // enable stencil buffer
> glEnable(GL_STENCIL_TEST);
>
> // write a one to the stencil buffer everywhere we are about to draw
> glStencilFunc(GL_ALWAYS, 1, 1);
>
> // write only to the stencil buffer if we pass the depth test
> glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
>
> // Disable writing to the color buffer so we only write to the stencil
> // buffer and the depth buffer
> glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
>
> // make sure the depth buffer is enabled
> //glEnable(GL_DEPTH_TEST);
> //glDepthMask(GL_TRUE);
> //glDepthFunc(GL_LESS);
>
> // Arrrgh! Why does the code only seem to work correctly if I call
> this?
> glDepthMask(GL_FALSE);
>
>
>
>  So I think use the openGL code to draw different style may be the qucik
> way.
>
>
>
>
> ...
>
> Thank you!
>
> Cheers,
> Lv
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65462#65462
>
>
>
>
>
> ___
> 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] how to set width and Stipple of a osgText::BoundingBox?

2015-10-27 Thread Lv Qing
Thx!Robert!

The situation is,we  have modified the text.cpp to create some other styles 
rather than boundingbox.

Like a BoundingLine,one end to one of the corner of a BoundingBox,the other 
end linked to a osg::Node.

   So if a text have a BoundingLine and a BoundingBox,I just want draw the 
BoundingBox as normal,but draw the BoundingLine with LineStipple .So I think 
one osg::StateSet may not solve this problem.

  I am not quiet  familiar with the openGL programming since I use osg at 
first.I search the web found people use this code to set
Linewidth and Stipple

glLineWidth (2.0); 
glLineStipple (1, 0x0F0F); 

And I look into text.cpp,found lots of code like use openGL directly,such as :

 //glClear(GL_STENCIL_BUFFER_BIT);

 // enable stencil buffer
glEnable(GL_STENCIL_TEST);

// write a one to the stencil buffer everywhere we are about to draw
glStencilFunc(GL_ALWAYS, 1, 1);

// write only to the stencil buffer if we pass the depth test
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);

// Disable writing to the color buffer so we only write to the stencil 
// buffer and the depth buffer
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);

// make sure the depth buffer is enabled
//glEnable(GL_DEPTH_TEST);
//glDepthMask(GL_TRUE);
//glDepthFunc(GL_LESS);

// Arrrgh! Why does the code only seem to work correctly if I call this?
glDepthMask(GL_FALSE);



 So I think use the openGL code to draw different style may be the qucik way.




... 

Thank you!

Cheers,
Lv

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





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


Re: [osg-users] Third-Person Camera Manipulator

2015-10-27 Thread Michael Chapman
Hi,

This turned out to be an issue with the FBX exporter in Blender. The issue only 
occurred when I was exporting my model as the "FBX 7.4 binary" option. When I 
switched to the "FBX 6.1 ascii" option, then the model exported with the 
correct scale and coordinate frame. Evidently, the osg fbx plugin is intended 
to be used with the older ascii file format.

Thank you!

Cheers,
Michael

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





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


Re: [osg-users] Setting update callback for osgSim::LightPointNode has no effect

2015-10-27 Thread Trajce Nikolov NICK
Thanks Robert for the hints and the explanation!

Cheers,
Nick

On Tue, Oct 27, 2015 at 2:25 PM, Robert Osfield 
wrote:

> HI Nick,
>
> The way the OSG implement node callbacks are as traversal callbacks that
> are nested within the traverse of the node itself, so it's in effect a
> traverse children callback.  In the case of osgSim::LightPointNode it's
> implemented as a leaf node so doesn't bother calling
> NodeVisitor::traverse() to traverse any further so the callbacks aren't
> called.
>
> The best I workaround I can think of is subclassing from LightPointNode
> and overriding the LightPointNode::traverse() method to add in a
> NodeVisitor::traverse() call as well as the LightPointNode::traverse().
> Another route might be to add the update callback to the parent.  Or
> perhaps just subclass from LightPointNode and treat this subclass as your
> update callback etc.
>
> Robert.
>
> On 27 October 2015 at 12:23, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi community,
>>
>> I installed an update callback to a osgSim::LightPointNode .. However it
>> is never called. Any hints, clue?
>>
>> Thanks as always!
>>
>> 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