14#ifndef INDEXBUFFERCONTEXT_H
15#define INDEXBUFFERCONTEXT_H
33class EXPCL_PANDA_GOBJ IndexBufferContext :
public BufferContext,
public AdaptiveLruPage {
35 INLINE IndexBufferContext(PreparedGraphicsObjects *pgo,
GeomPrimitive *data);
49 virtual void output(std::ostream &out)
const;
50 virtual void write(std::ostream &out,
int indent_level)
const;
53 GeomEnums::UsageHint _usage_hint;
59 static void init_type() {
60 BufferContext::init_type();
62 BufferContext::get_class_type());
65 return get_class_type();
67 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
72 friend class PreparedGraphicsObjects;
75inline std::ostream &operator << (std::ostream &out,
const IndexBufferContext &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.
Encapsulates the data from a GeomPrimitive, pre-fetched for one stage of the pipeline.
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
This is a special class object that holds all the information returned by a particular GSG to indicat...
void mark_unloaded()
Should be called after the buffer has been forced out of graphics memory.
bool changed_usage_hint(const GeomPrimitivePipelineReader *reader) const
Returns true if the data has changed its usage hint since the last time mark_loaded() was called.
bool changed_size(const GeomPrimitivePipelineReader *reader) const
Returns true if the data has changed size since the last time mark_loaded() was called.
void mark_loaded(const GeomPrimitivePipelineReader *reader)
Should be called after the IndexBufferContext has been loaded into graphics memory,...
bool was_modified(const GeomPrimitivePipelineReader *reader) const
Returns true if the data has been modified since the last time mark_loaded() was called.
GeomPrimitive * get_data() const
Returns the pointer to the client-side array data object.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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(),...