bluecadet / Cinder-BluecadetViews

Scene graph Cinder block with touch management and various tools for UI dev
MIT License
11 stars 3 forks source link

Expose FboView's clear color #131

Closed mattfelsen closed 6 years ago

mattfelsen commented 6 years ago

Calling the setter checks if the new value is different from the current, so in theory you can be sloppy and call this every frame without causing your fbo content to be re-rendered, even though you would never do that :) Does the use of invalidate(false, true) look correct in order to force a redraw?

mattfelsen commented 6 years ago

Minor note: the whitespace indentation for mClearColor (line 86) matches the spacing for mFboFormat & mFbo above in VS, but looks wider when viewed here on the github website. 🤷‍♂️

benjaminbojko commented 6 years ago

Looks great! The invalidate call is correct, yup. The first bool is for transforms, so it will recalculate all subtree matrices. The second is for content, so it will force a redraw of everything upwards on the tree.