14#ifndef VERTEXBUFFERCONTEXT_H
15#define VERTEXBUFFERCONTEXT_H
33class EXPCL_PANDA_GOBJ VertexBufferContext :
public BufferContext,
public AdaptiveLruPage {
35 INLINE VertexBufferContext(PreparedGraphicsObjects *pgo,
50 virtual void output(std::ostream &out)
const;
51 virtual void write(std::ostream &out,
int indent_level)
const;
54 GeomEnums::UsageHint _usage_hint;
60 static void init_type() {
61 BufferContext::init_type();
63 BufferContext::get_class_type());
66 return get_class_type();
68 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
73 friend class PreparedGraphicsObjects;
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 data object is returned by GeomVertexArrayData::get_handle() or modify_handle().
This is the data for one array of a GeomVertexData structure.
TypeHandle is the identifier used to differentiate C++ class types.
This is a special class object that holds all the information returned by a particular GSG to indicat...
bool changed_usage_hint(const GeomVertexArrayDataHandle *reader) const
Returns true if the data has changed its usage hint since the last time mark_loaded() was called.
void mark_unloaded()
Should be called after the buffer has been forced out of graphics memory.
bool was_modified(const GeomVertexArrayDataHandle *reader) const
Returns true if the data has been modified since the last time mark_loaded() was called.
GeomVertexArrayData * get_data() const
Returns the pointer to the client-side array data object.
bool changed_size(const GeomVertexArrayDataHandle *reader) const
Returns true if the data has changed size since the last time mark_loaded() was called.
void mark_loaded(const GeomVertexArrayDataHandle *reader)
Should be called after the VertexBufferContext has been loaded into graphics memory,...
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(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.