Panda3D
|
This class maintains different copies of a page of data between stages of the graphics pipeline (or any other pipelining context). More...
#include "pipelineCycler.h"
Public Member Functions | |
PipelineCycler (Pipeline *pipeline=NULL) | |
PipelineCycler (const PipelineCycler< CycleDataType > ©) | |
CycleDataType * | cheat () const |
Returns a pointer without counting it. | |
CycleDataType * | elevate_read (const CycleDataType *pointer, Thread *current_thread) |
See PipelineCyclerBase::elevate_read(). | |
CycleDataType * | elevate_read_stage (int pipeline_stage, const CycleDataType *pointer, Thread *current_thread) |
See PipelineCyclerBase::elevate_read_stage(). | |
CycleDataType * | elevate_read_stage_upstream (int pipeline_stage, const CycleDataType *pointer, bool force_to_0, Thread *current_thread) |
See PipelineCyclerBase::elevate_read_stage_upstream(). | |
CycleDataType * | elevate_read_upstream (const CycleDataType *pointer, bool force_to_0, Thread *current_thread) |
See PipelineCyclerBase::elevate_read_upstream(). | |
void | operator= (const PipelineCycler< CycleDataType > ©) |
const CycleDataType * | read (Thread *current_thread) const |
See PipelineCyclerBase::read(). | |
const CycleDataType * | read_stage (int pipeline_stage, Thread *current_thread) const |
See PipelineCyclerBase::read_stage(). | |
const CycleDataType * | read_stage_unlocked (int pipeline_stage) const |
See PipelineCyclerBase::read_stage_unlocked(). | |
const CycleDataType * | read_unlocked (Thread *current_thread) const |
See PipelineCyclerBase::read_unlocked(). | |
CycleDataType * | write (Thread *current_thread) |
See PipelineCyclerBase::write(). | |
CycleDataType * | write_stage (int pipeline_stage, Thread *current_thread) |
See PipelineCyclerBase::write_stage(). | |
CycleDataType * | write_stage_upstream (int pipeline_stage, bool force_to_0, Thread *current_thread) |
See PipelineCyclerBase::write_stage_upstream(). | |
CycleDataType * | write_upstream (bool force_to_0, Thread *current_thread) |
See PipelineCyclerBase::write_upstream(). |
This class maintains different copies of a page of data between stages of the graphics pipeline (or any other pipelining context).
The class object maintains up to n copies of a CycleData structure, one for each stage of the pipeline. The head of the pipeline is responsible for making changes to its copy, which are then cycled through the pipeline at each frame.
To access the data, you must first ask for a readable pointer. In order to make changes to the data, you must ask for a writable pointer. Both kinds of pointers should be released when you are done, as a sanity check. The CycleDataReader and CycleDataWriter classes transparently handle this.
If pipelining support is not enabled at compile time (that is, DO_PIPELINING is not defined), this object compiles to a minimum object that presents the same interface but with minimal runtime overhead.
We define this as a struct instead of a class to guarantee byte placement within the object, so that (particularly for the trivial implementation) the inherited struct's data is likely to be placed by the compiler at the "this" pointer.
Definition at line 54 of file pipelineCycler.h.
CycleDataType * PipelineCycler< CycleDataType >::cheat | ( | ) | const [inline] |
Returns a pointer without counting it.
This is only intended for use as the return value for certain nassertr() functions, so the application can recover after a failure to manage the read and write pointers correctly. You should never call this function directly.
Reimplemented from PipelineCyclerTrivialImpl.
Definition at line 392 of file pipelineCycler.I.
CycleDataType * PipelineCycler< CycleDataType >::elevate_read | ( | const CycleDataType * | pointer, |
Thread * | current_thread | ||
) | [inline] |
See PipelineCyclerBase::elevate_read().
Definition at line 299 of file pipelineCycler.I.
CycleDataType * PipelineCycler< CycleDataType >::elevate_read_stage | ( | int | pipeline_stage, |
const CycleDataType * | pointer, | ||
Thread * | current_thread | ||
) | [inline] |
See PipelineCyclerBase::elevate_read_stage().
Definition at line 343 of file pipelineCycler.I.
CycleDataType * PipelineCycler< CycleDataType >::elevate_read_stage_upstream | ( | int | pipeline_stage, |
const CycleDataType * | pointer, | ||
bool | force_to_0, | ||
Thread * | current_thread | ||
) | [inline] |
See PipelineCyclerBase::elevate_read_stage_upstream().
Definition at line 354 of file pipelineCycler.I.
CycleDataType * PipelineCycler< CycleDataType >::elevate_read_upstream | ( | const CycleDataType * | pointer, |
bool | force_to_0, | ||
Thread * | current_thread | ||
) | [inline] |
See PipelineCyclerBase::elevate_read_upstream().
Definition at line 310 of file pipelineCycler.I.
Referenced by Texture::unlocked_ensure_ram_image().
const CycleDataType * PipelineCycler< CycleDataType >::read | ( | Thread * | current_thread | ) | const [inline] |
See PipelineCyclerBase::read().
Reimplemented from PipelineCyclerTrivialImpl.
Definition at line 266 of file pipelineCycler.I.
Referenced by Texture::unlocked_ensure_ram_image().
const CycleDataType * PipelineCycler< CycleDataType >::read_stage | ( | int | pipeline_stage, |
Thread * | current_thread | ||
) | const [inline] |
See PipelineCyclerBase::read_stage().
Reimplemented from PipelineCyclerTrivialImpl.
Definition at line 332 of file pipelineCycler.I.
const CycleDataType * PipelineCycler< CycleDataType >::read_stage_unlocked | ( | int | pipeline_stage | ) | const [inline] |
See PipelineCyclerBase::read_stage_unlocked().
Reimplemented from PipelineCyclerTrivialImpl.
Definition at line 321 of file pipelineCycler.I.
const CycleDataType * PipelineCycler< CycleDataType >::read_unlocked | ( | Thread * | current_thread | ) | const [inline] |
See PipelineCyclerBase::read_unlocked().
Reimplemented from PipelineCyclerTrivialImpl.
Definition at line 255 of file pipelineCycler.I.
CycleDataType * PipelineCycler< CycleDataType >::write | ( | Thread * | current_thread | ) | [inline] |
See PipelineCyclerBase::write().
Reimplemented from PipelineCyclerTrivialImpl.
Definition at line 277 of file pipelineCycler.I.
CycleDataType * PipelineCycler< CycleDataType >::write_stage | ( | int | pipeline_stage, |
Thread * | current_thread | ||
) | [inline] |
See PipelineCyclerBase::write_stage().
Reimplemented from PipelineCyclerTrivialImpl.
Definition at line 365 of file pipelineCycler.I.
CycleDataType * PipelineCycler< CycleDataType >::write_stage_upstream | ( | int | pipeline_stage, |
bool | force_to_0, | ||
Thread * | current_thread | ||
) | [inline] |
See PipelineCyclerBase::write_stage_upstream().
Reimplemented from PipelineCyclerTrivialImpl.
Definition at line 376 of file pipelineCycler.I.
CycleDataType * PipelineCycler< CycleDataType >::write_upstream | ( | bool | force_to_0, |
Thread * | current_thread | ||
) | [inline] |
See PipelineCyclerBase::write_upstream().
Reimplemented from PipelineCyclerTrivialImpl.
Definition at line 288 of file pipelineCycler.I.
Referenced by Texture::unlocked_ensure_ram_image(), and VideoTexture::unlocked_ensure_ram_image().