Hello Carsten,

thanks for your answer, it made a lot of stuff plain to me.
I nearly got everything ported to OpenSG, but there are some questions left.

When I add the ChunkOverrideGroup, does this override every chunk in
the tree, even if there is no equivalent one in the OverrideGroup?
I added a PolygonChunk, DepthCunk, ColorMaskChunk and a StencilChunk.
Is e.g. a TextureBaseChunk removed from the geometry by the
OverrideGroup?

I ask this, because I get some errors saying "Incomplete Attachment".

Node(282) : 0 children |  attachments | Parent : NULL | 05196160
[
LOG: Dump Geometry NI
    attachments
    {
    }
]
{
}
Volume: from -2.5, -2.5, -0.5 to 2.5, 2.5, 0.5
  [05193758] [269] [<unnamed>] -- [051939A0] [270] [Group] [<unnamed>]
    [05192C40] [265] [<unnamed>] -- [05192EE0] [266] [Transform] [<unnamed>]
      [05192738] [263] [<unnamed>] -- [05192988] [264] [Group] [<unnamed>]
    [05151828] [293] [<unnamed>] -- [05151B58] [294] [Stage] [<unnamed>]
      [05153D90] [303] [<unnamed>] -- [051522A0] [295] [ChunkOverrideGroup] [<un
named>]
        [05153A48] [302] [<unnamed>] -- [05153828] [301] [VisitSubTree] [<unname
d>]
    [051931B8] [267] [<unnamed>] -- [05193460] [268] [DirectionalLight] [<unname
d>]
      [05150380] [285] [<unnamed>] -- [0514FC20] [284] [Transform] [<unnamed>]
        [05196160] [282] [<unnamed>] -- [05194E98] [277] [Geometry] [<unnamed>]
Node(319) : 0 children |  attachments | Parent : NULL | 05157940
[
LOG: Dump Geometry NI
    attachments
    {
    }
]
{
}
Volume: from -5, -5, 0 to 5, 5, 0
GLUT winid: 1
Reshape: 300,300
WARNING: Incomplete Attachment
WARNING: (F:\Lib\OpenSG2_Repo\Source\System\State\Base\OSGLightChunk.cpp,136):
light:activate:precheck failed: (null) (0x506)
WARNING: (F:\Lib\OpenSG2_Repo\Source\System\State\Base\OSGLightChunk.cpp,136):
light:activate:precheck failed: (null) (0x506)
WARNING: Incomplete Attachment
WARNING: (F:\Lib\OpenSG2_Repo\Source\System\State\Base\OSGLightChunk.cpp,136):
light:activate:precheck failed: (null) (0x506)
WARNING: (F:\Lib\OpenSG2_Repo\Source\System\State\Base\OSGLightChunk.cpp,136):
light:activate:precheck failed: (null) (0x506)
WARNING: Incomplete Attachment
WARNING: (F:\Lib\OpenSG2_Repo\Source\System\State\Base\OSGLightChunk.cpp,136):
light:activate:precheck failed: (null) (0x506)
WARNING: (F:\Lib\OpenSG2_Repo\Source\System\State\Base\OSGLightChunk.cpp,136):
light:activate:precheck failed: (null) (0x506)


Can anybody tell me, what Attachment is missing and perhaps where out
of this warnings?


2010/6/9 Carsten Neumann <carsten_neum...@gmx.net>:

>> Here is some OpenGL code, doing what I want to do in OpenSG.
>>
>>         // first rendering
>>       glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | 
>> GL_STENCIL_BUFFER_BIT);
>>       glClearStencil(0x0);
>>
>>       glMatrixMode(GL_MODELVIEW);
>>       glLoadIdentity();
>>
>>       glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
>>       glDepthMask(GL_FALSE);
>>       glEnable(GL_STENCIL_TEST);
>>       glEnable(GL_CULL_FACE);


How can I enable/disable the Culling or set the DepthMask to false?
I didn't find this options in the chunks.
Or is e.g. the StencilTesting enabled, as soon as I add a StencilChunk
to a Material?


>>
>>       glCullFace(GL_FRONT);
>>       glStencilFunc(GL_ALWAYS,0,0xff);
>>       glStencilOp(GL_KEEP, GL_INCR, GL_INCR);
>>
>>       drawGeometry();
>>
>>       //second rendering
>>       glCullFace(GL_BACK);
>>       glStencilOp(GL_KEEP, GL_DECR, GL_DECR);
>>       glStencilFunc(GL_ALWAYS,0,0xff);
>>
>>       drawGeometry();
>>
>> Where can I clear the Buffer-bits and the Buffers themselves?
>
> clearing of buffers is controlled by the Background of your Viewport.
>
> SFInt32 _sfClearStencilBit is the value written to the stencil buffer
> (negative values mean the buffer is not cleared).
>
> SFReal32 _sfDepth is the clear depth.
> SFBool   _sfClearDepth controls if the depth buffer is cleared
> SFBool   _sfClearColor controls if the color buffer is cleared
>
>> Where can I set the Stencil-Function-Parameters or the Stencil-Operations?
>
> This is controlled by the StencilChunk. You can either add one to all
> your Materials or place a Node with a ChunkOverrideGroup near the root
> of your scene.
> Front/Backface culling is controlled by the PolygonChunk (SFCullFace).
> ColorMask is controlled by the ColorMaskChunk and DepthMask by the
> DepthChunk.
>



thanks a lot,
Constantin

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to