Giter VIP home page Giter VIP logo

Comments (3)

xarray avatar xarray commented on August 10, 2024

Sorry for a little late.

The AntTweakBar example currently use a camera draw callback to render UI
elements. This may not be suitable for some practical uses, as draw
callbacks won't keep its own state sets. Thus when you apply shaders to
scene graph, the state will affect the AntTweakBar calls and make the final
results invalid.

A good idea to solve this is to reimplement this example using a custom
drawable which render AntTweakBar in the drawImplementation() method. I
will consider rewrite this example soon. And you are welcomed to
contribute. :-)

Thanks,

Wang Rui

2012/9/9 peterakos [email protected]

Hello.

I have only one node in scene, but i have applied shaders to it using

osg::StateSet* stateset = model_node->getOrCreateStateSet();
stateset->setAttributeAndModes( program, osg::StateAttribute::ON |
osg::StateAttribute::OVERRIDE );

It seems that the ant tweak bar window appears with a lot of problems
(black / white and the labels cannot be distinguished).

Is it tested if there are shaders applied to the scene ?

thank you for your time.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6.

from osgrecipes.

peterakos avatar peterakos commented on August 10, 2024

Hello. Thank you very much for your answer.

(I closed the thread by mistake)
So if i create a Drawble, which calls TwDraw() and add this drawable (using a geometry) to the scene graph, will it be ok ?

Do i have to create manually the shaders which will render the tweak bar ?
Or does the TwDraw() takes care of it manually ?

thnx.

from osgrecipes.

xarray avatar xarray commented on August 10, 2024

If you choose to derive from osg::Drawable. OSG will handle state changes
for you automatically. So the drawable which calls TwDraw() won't be
affected by the shaders unless you set one to the drawable or its parents.
It should be safe for AntTweakBar then to only work under fixed pipeline.

Wang Rui

2012/9/12 peterakos [email protected]

Hello. Thank you very much for your answer.

I closed the thread by mistake)

So if i create a Drawble, which calls TwDraw() and add this drawable
(using a geometry) to the scene graph, will it be ok ?

Do i have to create manually the shaders which will render the tweak bar ?
Or does the TwDraw() takes care of it manually ?

thnx.

Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-8486436.

from osgrecipes.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.