This loader request will call Texture::get_ram_image() in a sub-thread, to force the texture's image to be re-read from disk. More...
#include "textureReloadRequest.h"
Public Member Functions | |
TextureReloadRequest (const string &name, PreparedGraphicsObjects *pgo, Texture *texture, bool allow_compressed) | |
Create a new TextureReloadRequest, and add it to the loader via load_async(), to begin an asynchronous load. More... | |
virtual TypeHandle | force_init_type () |
bool | get_allow_compressed () const |
Returns the "allow compressed" flag associated with this asynchronous TextureReloadRequest. More... | |
PreparedGraphicsObjects * | get_prepared_graphics_objects () const |
Returns the PreparedGraphicsObjects object associated with this asynchronous TextureReloadRequest. More... | |
Texture * | get_texture () const |
Returns the Texture object associated with this asynchronous TextureReloadRequest. More... | |
virtual TypeHandle | get_type () const |
bool | is_ready () const |
Returns true if this request has completed, false if it is still pending. More... | |
![]() | |
AsyncTask (const string &name=string()) | |
void | clear_delay () |
Removes any delay specified for the task. More... | |
void | clear_name () |
Resets the task's name to empty. More... | |
double | get_average_dt () const |
Returns the average amount of time elapsed during each of the task's previous run cycles, in seconds. More... | |
double | get_delay () const |
Returns the delay value that has been set via set_delay, if any. More... | |
const string & | get_done_event () const |
Returns the event name that will be triggered when the task finishes. More... | |
double | get_dt () const |
Returns the amount of time elapsed during the task's previous run cycle, in seconds. More... | |
int | get_elapsed_frames () const |
Returns the number of frames that have elapsed since the task was started, according to the task manager's clock. More... | |
double | get_elapsed_time () const |
Returns the amount of time that has elapsed since the task was started, according to the task manager's clock. More... | |
AsyncTaskManager * | get_manager () const |
Returns the AsyncTaskManager that this task is active on. More... | |
double | get_max_dt () const |
Returns the maximum amount of time elapsed during any one of the task's previous run cycles, in seconds. More... | |
string | get_name_prefix () const |
Returns the initial part of the name, up to but not including any trailing digits following a hyphen or underscore. More... | |
int | get_priority () const |
Returns the task's current priority value. More... | |
int | get_sort () const |
Returns the task's current sort value. More... | |
int | get_start_frame () const |
Returns the frame number at which the task was started, according to the task manager's clock. More... | |
double | get_start_time () const |
Returns the time at which the task was started, according to the task manager's clock. More... | |
State | get_state () const |
Returns the current state of the task. More... | |
const string & | get_task_chain () const |
Returns the AsyncTaskChain on which this task will be running. More... | |
AtomicAdjust::Integer | get_task_id () const |
Returns a number guaranteed to be unique for each different AsyncTask object in the universe. More... | |
double | get_wake_time () const |
If this task has been added to an AsyncTaskManager with a delay in effect, this returns the time at which the task is expected to awaken. More... | |
bool | has_delay () const |
Returns true if a delay has been set for this task via set_delay(), or false otherwise. More... | |
bool | is_alive () const |
Returns true if the task is currently active or sleeping on some task chain, meaning that it will be executed in its turn, or false if it is not active. More... | |
virtual void | output (ostream &out) const |
void | recalc_wake_time () |
If the task is currently sleeping on a task chain, this resets its wake time to the current time + get_delay(). More... | |
void | remove () |
Removes the task from its active manager, if any, and makes the state S_inactive (or possible S_servicing_removed). More... | |
void | set_delay (double delay) |
Specifies the amount of time, in seconds, by which this task will be delayed after it has been added to the AsyncTaskManager. More... | |
void | set_done_event (const string &done_event) |
Sets the event name that will be triggered when the task finishes. More... | |
void | set_name (const string &name) |
void | set_priority (int priority) |
Specifies a priority value for this task. More... | |
void | set_sort (int sort) |
Specifies a sort value for this task. More... | |
void | set_task_chain (const string &chain_name) |
Specifies the AsyncTaskChain on which this task will be running. More... | |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©) | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More... | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. More... | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. More... | |
void | operator= (const TypedObject ©) |
![]() | |
int | get_ref_count () const |
Returns the current reference count. More... | |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. More... | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More... | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More... | |
void | ref () const |
Explicitly increments the reference count. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
virtual bool | unref () const |
Explicitly decrements the reference count. More... | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref (WeakPointerToVoid *ptv) |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
![]() | |
Namable (const string &initial_name="") | |
Namable (const Namable ©) | |
void | clear_name () |
Resets the Namable's name to empty. More... | |
const string & | get_name () const |
bool | has_name () const |
Returns true if the Namable has a nonempty name set, false if the name is empty. More... | |
Namable & | operator= (const Namable &other) |
void | output (ostream &out) const |
Outputs the Namable. More... | |
void | set_name (const string &name) |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. More... | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Additional Inherited Members | |
![]() | |
enum | DoneStatus { DS_done, DS_cont, DS_again, DS_pickup, DS_exit, DS_pause, DS_interrupt } |
enum | State { S_inactive, S_active, S_servicing, S_servicing_removed, S_sleeping, S_active_nested } |
This loader request will call Texture::get_ram_image() in a sub-thread, to force the texture's image to be re-read from disk.
It is used by GraphicsStateGuardian::async_reload_texture(), when get_incomplete_render() is true.
Definition at line 34 of file textureReloadRequest.h.
|
inline |
Create a new TextureReloadRequest, and add it to the loader via load_async(), to begin an asynchronous load.
Definition at line 23 of file textureReloadRequest.I.
|
inline |
Returns the "allow compressed" flag associated with this asynchronous TextureReloadRequest.
Definition at line 65 of file textureReloadRequest.I.
|
inline |
Returns the PreparedGraphicsObjects object associated with this asynchronous TextureReloadRequest.
Definition at line 43 of file textureReloadRequest.I.
|
inline |
Returns the Texture object associated with this asynchronous TextureReloadRequest.
Definition at line 54 of file textureReloadRequest.I.
|
inline |
Returns true if this request has completed, false if it is still pending.
Definition at line 76 of file textureReloadRequest.I.