ShaderBuffer

from panda3d.core import ShaderBuffer
class ShaderBuffer

Bases: TypedWritableReferenceCount, Namable, GeomEnums

This is a generic buffer object that lives in graphics memory.

New in version 1.10.0.

Inheritance diagram

Inheritance diagram of ShaderBuffer

__init__(*args, **kwargs)
data_size_bytes
getClassType()

C++ Interface: get_class_type()

get_class_type()

C++ Interface: get_class_type()

isPrepared()

C++ Interface: is_prepared(ShaderBuffer self, PreparedGraphicsObjects prepared_objects)

/**
  • Returns true if the data has already been prepared or enqueued for

  • preparation on the indicated GSG, false otherwise.

*/

is_prepared()

C++ Interface: is_prepared(ShaderBuffer self, PreparedGraphicsObjects prepared_objects)

/**
  • Returns true if the data has already been prepared or enqueued for

  • preparation on the indicated GSG, false otherwise.

*/

prepare()

C++ Interface: prepare(const ShaderBuffer self, PreparedGraphicsObjects prepared_objects)

/**
  • Indicates that the data should be enqueued to be prepared in the indicated

  • prepared_objects at the beginning of the next frame. This will ensure the

  • data is already loaded into the GSG if it is expected to be rendered soon.

  • Use this function instead of prepare_now() to preload datas from a user

  • interface standpoint.

*/

prepareNow()

C++ Interface: prepare_now(const ShaderBuffer self, PreparedGraphicsObjects prepared_objects, GraphicsStateGuardianBase gsg)

/**
  • Creates a context for the data on the particular GSG, if it does not

  • already exist. Returns the new (or old) BufferContext. This assumes

  • that the GraphicsStateGuardian is the currently active rendering context

  • and that it is ready to accept new datas. If this is not necessarily the

  • case, you should use prepare() instead.

  • Normally, this is not called directly except by the GraphicsStateGuardian;

  • a data does not need to be explicitly prepared by the user before it may be

  • rendered.

*/

prepare_now()

C++ Interface: prepare_now(const ShaderBuffer self, PreparedGraphicsObjects prepared_objects, GraphicsStateGuardianBase gsg)

/**
  • Creates a context for the data on the particular GSG, if it does not

  • already exist. Returns the new (or old) BufferContext. This assumes

  • that the GraphicsStateGuardian is the currently active rendering context

  • and that it is ready to accept new datas. If this is not necessarily the

  • case, you should use prepare() instead.

  • Normally, this is not called directly except by the GraphicsStateGuardian;

  • a data does not need to be explicitly prepared by the user before it may be

  • rendered.

*/

release()

C++ Interface: release(const ShaderBuffer self, PreparedGraphicsObjects prepared_objects)

/**
  • Frees the data context only on the indicated object, if it exists there.

  • Returns true if it was released, false if it had not been prepared.

*/

releaseAll()

C++ Interface: release_all(const ShaderBuffer self)

/**
  • Frees the context allocated on all objects for which the data has been

  • declared. Returns the number of contexts which have been freed.

*/

release_all()

C++ Interface: release_all(const ShaderBuffer self)

/**
  • Frees the context allocated on all objects for which the data has been

  • declared. Returns the number of contexts which have been freed.

*/

upcastToGeomEnums()

C++ Interface: upcast_to_GeomEnums(const ShaderBuffer self)

upcast from ShaderBuffer to GeomEnums

upcastToNamable()

C++ Interface: upcast_to_Namable(const ShaderBuffer self)

upcast from ShaderBuffer to Namable

upcastToTypedWritableReferenceCount()

C++ Interface: upcast_to_TypedWritableReferenceCount(const ShaderBuffer self)

upcast from ShaderBuffer to TypedWritableReferenceCount

upcast_to_GeomEnums()

C++ Interface: upcast_to_GeomEnums(const ShaderBuffer self)

upcast from ShaderBuffer to GeomEnums

upcast_to_Namable()

C++ Interface: upcast_to_Namable(const ShaderBuffer self)

upcast from ShaderBuffer to Namable

upcast_to_TypedWritableReferenceCount()

C++ Interface: upcast_to_TypedWritableReferenceCount(const ShaderBuffer self)

upcast from ShaderBuffer to TypedWritableReferenceCount

usage_hint