Hello Carsten,

Thanks for the code snippet. it did compile and ran. I made some stupid
mistakes. Now the the application that i m trying to develop crushes with
some key press event.

So i am trying to elaborate the design issue to you so that you can help me
think in a right way.

I want to choose one of the 3 different types of lights with key-press event
and generate GPU shader for three different types of lights.


1. I have a root scene and has 4 children ; DirectLight, PointLight,
SpotLight and Beacon node. Each light has the corresponding core and each of
their beacon refer to  the Beacon node
   which contains the transformation core.

2. While creating the scene graph i have set a particular node to be the
children of one of the light nodes which is subject to change with  the key
press event to illuminate that node
    with different lights.

3. That particular node is actually a loaded object using the
SceneFileHandler. And i m applying the GPU shader to that using
SwitchMaterial.


When i want to choose different light with key press event the program
crashes with  the following error:

[EMAIL PROTECTED]:~/myOpenSG/shader$ ./shadeMe
WARNING:  SHLChunk: link status:  Link successful. The GLSL vertex shader
will run in hardware. The GLSL fragment shader will run in hardware.
spot light crash 0
shadeMe: /usr/local/include/OpenSG/OSGNodeImpl.inl:86: osg::NodePtr
osg::Node::getChild(osg::UInt32): Assertion `(childIndex <
_mfChildren.size())' failed.
Aborted (core dumped)



Another issue about RefPtr<>. Consider the following scenario:


RefPtr<NodePtr> utahTransformNode;

/*
create a global transform pointer
that will be updated in the display
function
*/
RefPtr<TransformPtr> utahTransformCore;

/* The above variables are in the global scope*/

utahTransformNode = makeCoredNode<Transform>(utahTransformCore;);


I have error while compiling. Even though i worked around the compiler
error. I would like to know what is conceptually wrong here.
The error says:

No matching function call.


Please let me know if you need any more information regarding any of the
issues discussed above.


Thanks

Sajjad
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to