Compositor: Add resetOrderOffset()
To allow for custom compositors and passes created by C++ code alongside those created by Compositor::create(), add a resetOrderOffset() function which resets _order_offset back to zero. This will allow FlightGear to prevent repeated compositor reloads from increasing _order_offset indefinitely, which soon results in render orders beyond those set statically for the GUI and upcoming VR mirror compositors.
This commit is contained in:
parent
a68a0b1ccb
commit
d4496d3b2c
@ -137,6 +137,7 @@ public:
|
||||
Pass * getPass(const std::string &name) const;
|
||||
|
||||
int getOrderOffset() const { return _order_offset; }
|
||||
static void resetOrderOffset() { _order_offset = 0; }
|
||||
protected:
|
||||
osg::View *_view;
|
||||
osg::GraphicsContext *_gc;
|
||||
|
Loading…
Reference in New Issue
Block a user