TextureContext

from panda3d.core import TextureContext
class TextureContext

Bases: BufferContext, AdaptiveLruPage

This is a special class object that holds all the information returned by a particular GSG to indicate the texture’s internal context identifier.

Textures typically have an immediate-mode and a retained-mode operation. When using textures in retained-mode (in response to Texture::prepare()), the GSG will create some internal handle for the texture and store it here. The texture stores all of these handles internally.

Inheritance diagram

Inheritance diagram of TextureContext

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

C++ Interface: get_class_type()

getImageModified()

C++ Interface: get_image_modified(TextureContext self)

/**
  • Returns a sequence number which is guaranteed to change at least every time

  • the texture image data (including mipmap levels) are modified.

*/

getImageModifiedPages()

C++ Interface: get_image_modified_pages(TextureContext self, int n)

/**
  • Returns a SparseArray indicating which pages of the texture have been

  • modified since the last call to mark_loaded().

*/

getNativeBufferId()

C++ Interface: get_native_buffer_id(TextureContext self)

/**
  • Similar to get_native_id, but some implementations use a separate

  • identifier for the buffer object associated with buffer textures.

  • Returns 0 if the underlying implementation does not support this, or

  • if this is not a buffer texture.

*/

getNativeId()

C++ Interface: get_native_id(TextureContext self)

/**
  • Returns an implementation-defined handle or pointer that can be used

  • to interface directly with the underlying API.

  • Returns 0 if the underlying implementation does not support this.

*/

getPropertiesModified()

C++ Interface: get_properties_modified(TextureContext self)

/**
  • Returns a sequence number which is guaranteed to change at least every time

  • the texture properties (unrelated to the image) are modified.

*/

getTexture()

C++ Interface: get_texture(TextureContext self)

/**
  • Returns the pointer to the associated Texture object.

*/

getView()

C++ Interface: get_view(TextureContext self)

/**
  • @deprecated since 1.11.0: always returns 0.

*/

getViewModifiedPages()

C++ Interface: get_view_modified_pages(TextureContext self, int view, int n)

/**
  • Returns a SparseArray indicating which pages of the texture have been

  • modified since the last call to mark_loaded().

*/

get_class_type()

C++ Interface: get_class_type()

get_image_modified()

C++ Interface: get_image_modified(TextureContext self)

/**
  • Returns a sequence number which is guaranteed to change at least every time

  • the texture image data (including mipmap levels) are modified.

*/

get_image_modified_pages()

C++ Interface: get_image_modified_pages(TextureContext self, int n)

/**
  • Returns a SparseArray indicating which pages of the texture have been

  • modified since the last call to mark_loaded().

*/

get_native_buffer_id()

C++ Interface: get_native_buffer_id(TextureContext self)

/**
  • Similar to get_native_id, but some implementations use a separate

  • identifier for the buffer object associated with buffer textures.

  • Returns 0 if the underlying implementation does not support this, or

  • if this is not a buffer texture.

*/

get_native_id()

C++ Interface: get_native_id(TextureContext self)

/**
  • Returns an implementation-defined handle or pointer that can be used

  • to interface directly with the underlying API.

  • Returns 0 if the underlying implementation does not support this.

*/

get_properties_modified()

C++ Interface: get_properties_modified(TextureContext self)

/**
  • Returns a sequence number which is guaranteed to change at least every time

  • the texture properties (unrelated to the image) are modified.

*/

get_texture()

C++ Interface: get_texture(TextureContext self)

/**
  • Returns the pointer to the associated Texture object.

*/

get_view()

C++ Interface: get_view(TextureContext self)

/**
  • @deprecated since 1.11.0: always returns 0.

*/

get_view_modified_pages()

C++ Interface: get_view_modified_pages(TextureContext self, int view, int n)

/**
  • Returns a SparseArray indicating which pages of the texture have been

  • modified since the last call to mark_loaded().

*/

upcastToAdaptiveLruPage()

C++ Interface: upcast_to_AdaptiveLruPage(const TextureContext self)

upcast from TextureContext to AdaptiveLruPage

upcastToBufferContext()

C++ Interface: upcast_to_BufferContext(const TextureContext self)

upcast from TextureContext to BufferContext

upcast_to_AdaptiveLruPage()

C++ Interface: upcast_to_AdaptiveLruPage(const TextureContext self)

upcast from TextureContext to AdaptiveLruPage

upcast_to_BufferContext()

C++ Interface: upcast_to_BufferContext(const TextureContext self)

upcast from TextureContext to BufferContext

wasImageModified()

C++ Interface: was_image_modified(TextureContext self)

/**
  • Returns true if the texture image has been modified since the last time

  • mark_loaded() was called.

*/

wasImagePageModified()

C++ Interface: was_image_page_modified(TextureContext self, int z, int n)

/**
  • Returns true if the given page of the texture image has been modified since

  • the last time mark_loaded() was called.

*/

wasModified()

C++ Interface: was_modified(TextureContext self)

/**
  • Returns true if the texture properties or image have been modified since

  • the last time mark_loaded() was called.

*/

wasPropertiesModified()

C++ Interface: was_properties_modified(TextureContext self)

/**
  • Returns true if the texture properties (unrelated to the image) have been

  • modified since the last time mark_loaded() was called.

*/

was_image_modified()

C++ Interface: was_image_modified(TextureContext self)

/**
  • Returns true if the texture image has been modified since the last time

  • mark_loaded() was called.

*/

was_image_page_modified()

C++ Interface: was_image_page_modified(TextureContext self, int z, int n)

/**
  • Returns true if the given page of the texture image has been modified since

  • the last time mark_loaded() was called.

*/

was_modified()

C++ Interface: was_modified(TextureContext self)

/**
  • Returns true if the texture properties or image have been modified since

  • the last time mark_loaded() was called.

*/

was_properties_modified()

C++ Interface: was_properties_modified(TextureContext self)

/**
  • Returns true if the texture properties (unrelated to the image) have been

  • modified since the last time mark_loaded() was called.

*/