14#ifndef TEXTURECONTEXT_H
15#define TEXTURECONTEXT_H
33class EXPCL_PANDA_GOBJ TextureContext :
public BufferContext,
public AdaptiveLruPage {
35 INLINE TextureContext(PreparedGraphicsObjects *pgo,
Texture *tex,
int view);
59 virtual void output(std::ostream &out)
const;
60 virtual void write(std::ostream &out,
int indent_level)
const;
72 static void init_type() {
73 BufferContext::init_type();
75 BufferContext::get_class_type());
78 return get_class_type();
80 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
85 friend class PreparedGraphicsObjects;
88inline std::ostream &operator << (std::ostream &out,
const TextureContext &context) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void update_data_size_bytes(size_t new_data_size_bytes)
Should be called (usually by a derived class) when the on-card size of this object has changed.
This is a special class object that holds all the information returned by a particular GSG to indicat...
virtual uint64_t get_native_buffer_id() const
Similar to get_native_id, but some implementations use a separate identifier for the buffer object as...
virtual uint64_t get_native_id() const
Returns an implementation-defined handle or pointer that can be used to interface directly with the u...
void mark_needs_reload()
Should be called to indicate the texture should be reloaded at the nearest opportunity.
bool was_simple_image_modified() const
Returns true if the texture's "simple" image has been modified since the last time mark_simple_loaded...
Texture * get_texture() const
Returns the pointer to the associated Texture object.
bool was_properties_modified() const
Returns true if the texture properties (unrelated to the image) have been modified since the last tim...
bool was_modified() const
Returns true if the texture properties or image have been modified since the last time mark_loaded() ...
void mark_simple_loaded()
Should be called after the texture's "simple" image has been loaded into graphics memory.
void mark_unloaded()
Should be called after the texture has been forced out of texture memory.
UpdateSeq get_simple_image_modified() const
Returns a sequence number which is guaranteed to change at least every time the texture's "simple" im...
UpdateSeq get_image_modified() const
Returns a sequence number which is guaranteed to change at least every time the texture image data (i...
void mark_loaded()
Should be called after the texture has been loaded into graphics memory, this updates the internal fl...
int get_view() const
Returns the specific view of a multiview texture this context represents.
UpdateSeq get_properties_modified() const
Returns a sequence number which is guaranteed to change at least every time the texture properties (u...
bool was_image_modified() const
Returns true if the texture image has been modified since the last time mark_loaded() was called.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
TypeHandle is the identifier used to differentiate C++ class types.
This is a sequence number that increments monotonically.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.