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

static getClassType()TypeHandle
getImageModified()UpdateSeq

Returns a sequence number which is guaranteed to change at least every time the texture image data (including mipmap levels) are modified.

getNativeBufferId()int

Similar to getNativeId(), 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()int

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()UpdateSeq

Returns a sequence number which is guaranteed to change at least every time the texture properties (unrelated to the image) are modified.

getSimpleImageModified()UpdateSeq

Returns a sequence number which is guaranteed to change at least every time the texture’s “simple” image data is modified.

getTexture()Texture

Returns the pointer to the associated Texture object.

getView()int

Returns the specific view of a multiview texture this context represents. In the usual case, with a non-multiview texture, this will be 0.

wasImageModified()bool

Returns true if the texture image has been modified since the last time mark_loaded() was called.

wasModified()bool

Returns true if the texture properties or image have been modified since the last time mark_loaded() was called.

wasPropertiesModified()bool

Returns true if the texture properties (unrelated to the image) have been modified since the last time mark_loaded() was called.

wasSimpleImageModified()bool

Returns true if the texture’s “simple” image has been modified since the last time mark_simple_loaded() was called.