Hi Ivan,

You'll need to implement the computeBound on the drawable to make sure
that the cull traversal knows where you object is and doesn't cull it.
See the osgteapot example, and do a search through the OSG for
examples of subclasses from osg::Drawable.

Robert.

On 12/12/06, Ivan Bolčina <[EMAIL PROTECTED]> wrote:
Thanks, that worked OK. I still have one problem. I see drawing only when
drawn straight ahead. If I draw on other locations, I don't see any drawing.
It seems that drawing and field of view are somehow out of sync??


2006/12/11, Gordon Tomlinson <[EMAIL PROTECTED]>:
>
>
>
> Its not too hard to do, the way I have do this is to derive my own node
from osg::Drawable
>
> and the main function to them create is virtual void drawImplementation(
osg::State& state ) const ( there are a few others )
>
> But you do all your opengl in drawImplementation(...) make sure you leave
Opengl in the same state you entered otherwise you will screw OSG's state
management
>
> And in your osg::Drawable constructor call  setUseDisplayList(false)
otherwise you will only get called once, also you will have to see the
bounding box up..
>
> See the OSG examples on creating nodes and simply replace drawable with
your custom drawable
>
>
> Works well for us.... ( apologies for not having a sample I can share at
this time)
>
>
>
>
>
> Best Regards
>
>
>
> Gordon
>
>
__________________________________________________________
>
> Gordon Tomlinson
> Email  : gordon.tomlinson @ overwatch.com
> YIM/AIM : Gordon3dBrit
> MSN IM : Gordon3dBrit @ 3dSceneGraph.com
>
>
>
__________________________________________________________
>
> Telephone (Cell): (+1) 214-477-8914
> Telephone (Work): (+1) 703-437-7651
>
>
> "Self defence is not a function of learning tricks
> but is a function of how quickly and intensely one
> can arouse one's instinct for survival"
> - Master Tambo Tetsura
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Ivan Bolèina
> Sent: Monday, December 11, 2006 3:03 PM
> To: osg users
> Subject: [osg-users] How to render one node just by using generic OpenGL
API
>
>
> I want to render one node using glBegin() and other OpenGL commands. The
point is, I don't have static geometry, so I would like to render it on my
own.
>
> thanks
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
>


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to