[osg-users] Intergration with QT

Ali Ozdin alinailozdin at gmail.com
Fri Mar 16 03:18:56 PDT 2018


I have set clear mask for hud camera GL_COLOR_BUFFER_BIT in addition to GL_DEPTH_BUFFER_BIT. The problem was solved.



aozdin wrote:
> Hi Robert,
> 
> Firstly, I am grateful for your quick reply.
> 
> I intend to have a 3D view that is overlay by the Orthographic view as a HUD. That is right. So i am trying to derive hud example. Because of this, i have added the hud camera as a slave.
> You say that slave cameras only clear the depth buffer and I think problem is that. 
> The only thing i did not understand you say that i did not set up the main camera. I am asking to you "How to set up the main camera?" In osgviewerQt example, Nothing is done to viewer's default camera except setting graphic context to default camera. I have already set the graphical context to the default camera in addition to setting it to the slave camera. But nothing changed.
> On the other hand the same code works well if i dont integrate it to QT. There is no problem related to the depth buffer or any other thing.
> 
> Finally, The problem is still unresolved. Any other idea??
> 
> Best regards,
> 
> 
> robertosfield wrote:
> > Hi Ali,
> > 
> > I'm not a Qt expert, but I have just had a look through your code
> > example and don't see anywhere you have set up a the View's main
> > Camera.  I looks like you just add a Slave camara, and that slave
> > Camera only clears the depth buffer.
> > 
> > I don't understand why you have gone for the set up you have, if you
> > just need a single orthographic view then you should just set up the
> > View's master Camera's projection and view matrix accordingly and not
> > both with the addSlave.
> > 
> > If you intend to have a 3D view that is overlay by the Orthographic
> > view as a HUD, and the two are directly related then a slave Camera
> > might be appropriate.  Ask yourself, conceptually is the HUD a
> > different View, or is it contributing to the same View.
> > 
> > Robert.
> > _______________________________________________
> > osg-users mailing list
> > 
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > 
> >  ------------------
> > Post generated by Mail2Forum
> 


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







More information about the osg-users mailing list