clarify set_one_shot

This commit is contained in:
David Rose 2009-03-17 18:40:10 +00:00
parent 4188b41594
commit 7d2d35c024
1 changed files with 16 additions and 4 deletions

View File

@ -238,10 +238,22 @@ is_valid() const {
// Function: GraphicsOutput::set_one_shot
// Access: Published
// Description: Changes the current setting of the one-shot flag.
// When this is true, the GraphicsOutput will
// automatically detach its texture (if it has one) and
// remove itself from the GraphicsEngine after it
// renders the next frame.
// When this is true, the GraphicsOutput will render one
// frame and then automatically set itself inactive.
// This is particularly useful for buffers that are
// created for the purposes of render-to-texture, for
// static textures that don't need to be continually
// re-rendered once they have been rendered the first
// time.
//
// Setting the buffer inactive is not the same thing as
// destroying it. You are still responsible for passing
// this buffer to GraphicsEngine::remove_window() when
// you no longer need the texture, in order to clean up
// fully. (However, you should not call remove_window()
// on this buffer while the texture is still needed,
// because depending on the render-to-texture mechanism
// in use, this may invalidate the texture contents.)
////////////////////////////////////////////////////////////////////
INLINE void GraphicsOutput::
set_one_shot(bool one_shot) {