Panda3D
|
A texture that fetches video frames from an underlying object of class Movie. More...
Public Member Functions | |
__init__ (MovieVideo video) | |
Creates a texture playing the specified movie. More... | |
__init__ (str name) | |
Creates a blank movie texture. More... | |
MovieVideoCursor | getAlphaCursor (int page) |
Returns the MovieVideoCursor that is feeding the alpha channel for the indicated page, where 0 <= page < get_num_pages(). More... | |
MovieVideoCursor | getColorCursor (int page) |
Returns the MovieVideoCursor that is feeding the color channels for the indicated page, where 0 <= page < get_num_pages(). More... | |
bool | getLoop () |
Returns true if the movie's loop count is not equal to one. More... | |
int | getLoopCount () |
Returns the movie's loop count. More... | |
double | getPlayRate () |
Gets the movie's play-rate. More... | |
double | getTime () |
Returns the current value of the movie's cursor. More... | |
int | getVideoHeight () |
Returns the height in texels of the source video stream. More... | |
double | getVideoLength () |
Returns the length of the video. More... | |
int | getVideoWidth () |
Returns the width in texels of the source video stream. More... | |
bool | isPlaying () |
Returns true if the movie's cursor is advancing. More... | |
play () | |
Plays the movie from the beginning. More... | |
restart () | |
Start playing the movie from where it was last paused. More... | |
setLoop (bool enable) | |
If true, sets the movie's loop count to 1 billion. More... | |
setLoopCount (int count) | |
Sets the movie's loop count to the desired value. More... | |
setPlayRate (double play_rate) | |
Sets the movie's play-rate. More... | |
setTime (double t) | |
Sets the movie's cursor. More... | |
stop () | |
Stops a currently playing or looping movie right where it is. More... | |
synchronizeTo (AudioSound sound) | |
Synchronize this texture to a sound. More... | |
unsynchronize () | |
Stop synchronizing with a sound. More... | |
![]() | |
__init__ (str name) | |
Constructs an empty texture. More... | |
clear () | |
Reinitializes the texture to its default, empty state (except for the name). More... | |
clearAlphaFilename () | |
Removes the alpha filename, if it was previously set. More... | |
clearAlphaFullpath () | |
Removes the alpha fullpath, if it was previously set. More... | |
clearAuxData (str key) | |
Removes a record previously recorded via set_aux_data(). More... | |
clearClearColor () | |
The opposite of set_clear_color. More... | |
clearFilename () | |
Removes the alpha filename, if it was previously set. More... | |
clearFullpath () | |
Removes the alpha fullpath, if it was previously set. More... | |
clearImage () | |
Clears the texture data without changing its format or resolution. More... | |
clearRamImage () | |
Discards the current system-RAM image. More... | |
clearRamMipmapImage (int n) | |
Discards the current system-RAM image for the nth mipmap level. More... | |
clearRamMipmapImages () | |
Discards the current system-RAM image for all mipmap levels, except level 0 (the base image). More... | |
clearSimpleRamImage () | |
Discards the current "simple" image. More... | |
bool | compressRamImage (Texture::CompressionMode compression, Texture::QualityLevel quality_level, GraphicsStateGuardianBase gsg) |
Attempts to compress the texture's RAM image internally, to a format supported by the indicated GSG. More... | |
considerRescale (PNMImage pnmimage) | |
Asks the PNMImage to change its scale when it reads the image, according to the whims of the Config.prc file. More... | |
int | estimateTextureMemory () |
Estimates the amount of texture memory that will be consumed by loading this texture. More... | |
generateAlphaScaleMap () | |
Generates a special 256x1 1-d texture that can be used to apply an arbitrary alpha scale to objects by judicious use of texture matrix. More... | |
generateNormalizationCubeMap (int size) | |
Generates a special cube map image in the texture that can be used to apply bump mapping effects: for each texel in the cube map that is indexed by the 3-d texture coordinates (x, y, z), the resulting value is the normalized vector (x, y, z) (compressed from -1..1 into 0..1). More... | |
generateRamMipmapImages () | |
Automatically fills in the n mipmap levels of the Texture, based on the texture's source image. More... | |
generateSimpleRamImage () | |
Computes the "simple" ram image by loading the main RAM image, if it is not already available, and reducing it to 16x16 or smaller. More... | |
bool | getActive (PreparedGraphicsObjects prepared_objects) |
Returns true if this Texture was rendered in the most recent frame within the indicated GSG. More... | |
const Filename | getAlphaFilename () |
Returns the alpha_filename that has been set. More... | |
const Filename | getAlphaFullpath () |
Returns the alpha_fullpath that has been set. More... | |
int | getAnisotropicDegree () |
Returns the degree of anisotropic filtering that should be applied to the texture. More... | |
AutoTextureScale | getAutoTextureScale () |
Returns the power-of-2 texture-scaling mode that will be applied to this particular texture when it is next loaded from disk. More... | |
TypedReferenceCount | getAuxData (str key) |
Returns a record previously recorded via set_aux_data(). More... | |
LColor | getBorderColor () |
Returns the solid color of the texture's border. More... | |
LColor | getClearColor () |
Returns the color that was previously set using set_clear_color. More... | |
VectorUchar | getClearData () |
Returns the raw image data for a single pixel if it were set to the clear color. More... | |
Texture::ComponentType | getComponentType () |
Returns the numeric interpretation of each component of the texture. More... | |
int | getComponentWidth () |
Returns the number of bytes stored for each color component of a texel. More... | |
Texture::CompressionMode | getCompression () |
Returns the compression mode requested for this particular texture, or CM_off if the texture is not to be compressed. More... | |
int | getDataSizeBytes (PreparedGraphicsObjects prepared_objects) |
Returns the number of bytes which the texture is reported to consume within graphics memory, for the indicated GSG. More... | |
const SamplerState | getDefaultSampler () |
This returns the default sampler state for this texture, containing the wrap and filter properties specified on the texture level; it may still be overridden by a sampler state specified at a higher level. More... | |
int | getEffectiveAnisotropicDegree () |
Returns the degree of anisotropic filtering that should be applied to the texture. More... | |
SamplerState::FilterType | getEffectiveMagfilter () |
Returns the filter mode of the texture for magnification, with special treatment for FT_default. More... | |
SamplerState::FilterType | getEffectiveMinfilter () |
Returns the filter mode of the texture for minification, with special treatment for FT_default. More... | |
Texture::QualityLevel | getEffectiveQualityLevel () |
Returns the current quality_level hint, or the global default quality_level if this texture doesn't specify a quality level. More... | |
int | getExpectedMipmapNumPages (int n) |
Returns the total number of pages that the nth mipmap level should have, based on the texture's size. More... | |
int | getExpectedMipmapXSize (int n) |
Returns the x_size that the nth mipmap level should have, based on the texture's size. More... | |
int | getExpectedMipmapYSize (int n) |
Returns the y_size that the nth mipmap level should have, based on the texture's size. More... | |
int | getExpectedMipmapZSize (int n) |
Returns the z_size that the nth mipmap level should have, based on the texture's size. More... | |
int | getExpectedNumMipmapLevels () |
Returns the number of mipmap levels that should be defined for this texture, given the texture's size. More... | |
int | getExpectedRamImageSize () |
Returns the number of bytes that ought to be used by the in-memory image, based on the texture parameters. More... | |
int | getExpectedRamMipmapImageSize (int n) |
Returns the number of bytes that ought to be used by the in-memory image for mipmap level n, based on the texture parameters. More... | |
int | getExpectedRamMipmapPageSize (int n) |
Returns the number of bytes that should be used per each Z page of the 3-d texture, for mipmap level n. More... | |
int | getExpectedRamMipmapViewSize (int n) |
Returns the number of bytes that ought to be used by each view of the in- memory image for mipmap level n, based on the texture parameters. More... | |
int | getExpectedRamPageSize () |
Returns the number of bytes that should be used per each Z page of the 3-d texture. More... | |
const Filename | getFilename () |
Returns the filename that has been set. More... | |
Texture::Format | getFormat () |
Returns the format of the texture, which represents both the semantic meaning of the texels and, to some extent, their storage information. More... | |
const Filename | getFullpath () |
Returns the fullpath that has been set. More... | |
UpdateSeq | getImageModified () |
Returns a sequence number which is guaranteed to change at least every time the texture image data (including mipmap levels) are modified. More... | |
bool | getKeepRamImage () |
Returns the flag that indicates whether this Texture is eligible to have its main RAM copy of the texture memory dumped when the texture is prepared for rendering. More... | |
bool | getLoadedFromImage () |
Returns the flag that indicates the texture has been loaded from a disk file or PNMImage. More... | |
bool | getLoadedFromTxo () |
Returns the flag that indicates the texture has been loaded from a txo file. More... | |
SamplerState::FilterType | getMagfilter () |
Returns the filter mode of the texture for magnification. More... | |
bool | getMatchFramebufferFormat () |
Returns true if the special flag was set that indicates to the GSG that the Texture's format should be chosen to exactly match the framebuffer's format, presumably because the application intends to copy image data from the framebuffer into the Texture (or vice-versa). More... | |
SamplerState::FilterType | getMinfilter () |
Returns the filter mode of the texture for minification. More... | |
int | getNumComponents () |
Returns the number of color components for each texel of the texture image. More... | |
int | getNumLoadableRamMipmapImages () |
Returns the number of contiguous mipmap levels that exist in RAM, up until the first gap in the sequence. More... | |
int | getNumPages () |
Returns the total number of pages in the texture. More... | |
int | getNumRamMipmapImages () |
Returns the maximum number of mipmap level images available in system memory. More... | |
int | getNumViews () |
Returns the number of "views" in the texture. More... | |
int | getOrigFileXSize () |
Returns the X size of the original disk image that this Texture was loaded from (if it came from a disk file), before any automatic rescaling by Panda. More... | |
int | getOrigFileYSize () |
Returns the Y size of the original disk image that this Texture was loaded from (if it came from a disk file), before any automatic rescaling by Panda. More... | |
int | getOrigFileZSize () |
Returns the Z size of the original disk image that this Texture was loaded from (if it came from a disk file), before any automatic rescaling by Panda. More... | |
int | getPadXSize () |
Returns size of the pad region. More... | |
int | getPadYSize () |
Returns size of the pad region. More... | |
int | getPadZSize () |
Returns size of the pad region. More... | |
bool | getPostLoadStoreCache () |
Returns the setting of the post_load_store_cache flag. More... | |
UpdateSeq | getPropertiesModified () |
Returns a sequence number which is guaranteed to change at least every time the texture properties (unrelated to the image) are modified. More... | |
Texture::QualityLevel | getQualityLevel () |
Returns the current quality_level hint. More... | |
CPTAUchar | getRamImage () |
Returns the system-RAM image data associated with the texture. More... | |
CPTAUchar | getRamImageAs (str requested_format) |
Returns the uncompressed system-RAM image data associated with the texture. More... | |
Texture::CompressionMode | getRamImageCompression () |
Returns the compression mode in which the ram image is already stored pre- compressed. More... | |
int | getRamImageSize () |
Returns the total number of bytes used by the in-memory image, across all pages and views, or 0 if there is no in-memory image. More... | |
CPTAUchar | getRamMipmapImage (int n) |
Returns the system-RAM image data associated with the nth mipmap level, if present. More... | |
int | getRamMipmapImageSize (int n) |
Returns the number of bytes used by the in-memory image for mipmap level n, or 0 if there is no in-memory image for this mipmap level. More... | |
int | getRamMipmapPageSize (int n) |
Returns the number of bytes used by the in-memory image per page for mipmap level n, or 0 if there is no in-memory image for this mipmap level. More... | |
getRamMipmapPointer (int n) | |
Similiar to get_ram_mipmap_image(), however, in this case the void pointer for the given ram image is returned. More... | |
int | getRamMipmapViewSize (int n) |
Returns the number of bytes used by the in-memory image per view for mipmap level n, or 0 if there is no in-memory image for this mipmap level. More... | |
int | getRamPageSize () |
Returns the number of bytes used by the in-memory image per page, or 0 if there is no in-memory image. More... | |
int | getRamViewSize () |
Returns the number of bytes used by the in-memory image per view, or 0 if there is no in-memory image. More... | |
bool | getRenderToTexture () |
Returns a flag on the texture that indicates whether the texture is intended to be used as a direct-render target, by binding a framebuffer to a texture and rendering directly into the texture. More... | |
bool | getResident (PreparedGraphicsObjects prepared_objects) |
Returns true if this Texture is reported to be resident within graphics memory for the indicated GSG. More... | |
UpdateSeq | getSimpleImageModified () |
Returns a sequence number which is guaranteed to change at least every time the texture's "simple" image data is modified. More... | |
CPTAUchar | getSimpleRamImage () |
Returns the image data associated with the "simple" texture image. More... | |
int | getSimpleRamImageSize () |
Returns the number of bytes used by the "simple" image, or 0 if there is no simple image. More... | |
int | getSimpleXSize () |
Returns the width of the "simple" image in texels. More... | |
int | getSimpleYSize () |
Returns the height of the "simple" image in texels. More... | |
LVecBase2 | getTexScale () |
Returns a scale pair that is suitable for applying to geometry via NodePath::set_tex_scale(), which will convert texture coordinates on the geometry from the range 0..1 into the appropriate range to render the video part of the texture. More... | |
Texture::TextureType | getTextureType () |
Returns the overall interpretation of the texture. More... | |
CPTAUchar | getUncompressedRamImage () |
Returns the system-RAM image associated with the texture, in an uncompressed form if at all possible. More... | |
GeomEnums::UsageHint | getUsageHint () |
Returns the usage hint specified for buffer textures, or UH_unspecified for all other texture types. More... | |
SamplerState::WrapMode | getWrapU () |
Returns the wrap mode of the texture in the U direction. More... | |
SamplerState::WrapMode | getWrapV () |
Returns the wrap mode of the texture in the V direction. More... | |
SamplerState::WrapMode | getWrapW () |
Returns the wrap mode of the texture in the W direction. More... | |
int | getXSize () |
Returns the width of the texture image in texels. More... | |
int | getYSize () |
Returns the height of the texture image in texels. More... | |
int | getZSize () |
Returns the depth of the texture image in texels. More... | |
bool | hasAllRamMipmapImages () |
Returns true if all expected mipmap levels have been defined and exist in the system RAM, or false if even one mipmap level is missing. More... | |
bool | hasAlphaFilename () |
Returns true if the alpha_filename has been set and is available. More... | |
bool | hasAlphaFullpath () |
Returns true if the alpha_fullpath has been set and is available. More... | |
bool | hasAutoTextureScale () |
Returns true if set_auto_texture_scale() has been set to something other than ATS_unspecified for this particular texture. More... | |
bool | hasClearColor () |
Returns true if a color was previously set using set_clear_color. More... | |
bool | hasCompression () |
Returns true if the texture indicates it wants to be compressed, either with CM_on or higher, or CM_default and compressed-textures is true. More... | |
bool | hasFilename () |
Returns true if the filename has been set and is available. More... | |
bool | hasFullpath () |
Returns true if the fullpath has been set and is available. More... | |
bool | hasRamImage () |
Returns true if the Texture has its image contents available in main RAM, false if it exists only in texture memory or in the prepared GSG context. More... | |
bool | hasRamMipmapImage (int n) |
Returns true if the Texture has the nth mipmap level available in system memory, false otherwise. More... | |
bool | hasSimpleRamImage () |
Returns true if the Texture has a "simple" image available in main RAM. More... | |
bool | hasUncompressedRamImage () |
Returns true if the Texture has its image contents available in main RAM and is uncompressed, false otherwise. More... | |
bool | isCacheable () |
Returns true if there is enough information in this Texture object to write it to the bam cache successfully, false otherwise. More... | |
bool | isPrepared (PreparedGraphicsObjects prepared_objects) |
Returns true if the texture has already been prepared or enqueued for preparation on the indicated GSG, false otherwise. More... | |
bool | load (const PNMImage pnmimage, const LoaderOptions options) |
Replaces the texture with the indicated image. More... | |
bool | load (const PNMImage pnmimage, int z, int n, const LoaderOptions options) |
Stores the indicated image in the given page and mipmap level. More... | |
bool | load (const PfmFile pfm, const LoaderOptions options) |
Replaces the texture with the indicated image. More... | |
bool | load (const PfmFile pfm, int z, int n, const LoaderOptions options) |
Stores the indicated image in the given page and mipmap level. More... | |
Texture | loadRelated (const InternalName suffix) |
Loads a texture whose filename is derived by concatenating a suffix to the filename of this texture. More... | |
bool | loadSubImage (const PNMImage pnmimage, int x, int y, int z, int n) |
Stores the indicated image in a region of the texture. More... | |
Texture | makeCopy () |
Returns a new copy of the same Texture. More... | |
PTAUchar | makeRamImage () |
Discards the current system-RAM image for the texture, if any, and allocates a new buffer of the appropriate size. More... | |
PTAUchar | makeRamMipmapImage (int n) |
Discards the current system-RAM image for the nth mipmap level, if any, and allocates a new buffer of the appropriate size. More... | |
bool | mightHaveRamImage () |
Returns true if the texture's image contents are currently available in main RAM, or there is reason to believe it can be loaded on demand. More... | |
PTAUchar | modifyRamImage () |
Returns a modifiable pointer to the system-RAM image. More... | |
PTAUchar | modifyRamMipmapImage (int n) |
Returns a modifiable pointer to the system-RAM image for the nth mipmap level. More... | |
PTAUchar | modifySimpleRamImage () |
Returns a modifiable pointer to the internal "simple" texture image. More... | |
PTAUchar | newSimpleRamImage (int x_size, int y_size) |
Creates an empty array for the simple ram image of the indicated size, and returns a modifiable pointer to the new array. More... | |
TexturePeeker | peek () |
Returns a TexturePeeker object that can be used to examine the individual texels stored within this Texture by (u, v) coordinate. More... | |
AsyncFuture | prepare (PreparedGraphicsObjects prepared_objects) |
Indicates that the texture should be enqueued to be prepared in the indicated prepared_objects at the beginning of the next frame. More... | |
TextureContext | prepareNow (int view, PreparedGraphicsObjects prepared_objects, GraphicsStateGuardianBase gsg) |
Creates a context for the texture on the particular GSG, if it does not already exist. More... | |
bool | read (const Filename fullpath, const Filename alpha_fullpath, int primary_file_num_channels, int alpha_file_channel, const LoaderOptions options) |
Combine a 3-component image with a grayscale image to get a 4-component image. More... | |
bool | read (const Filename fullpath, const Filename alpha_fullpath, int primary_file_num_channels, int alpha_file_channel, int z, int n, bool read_pages, bool read_mipmaps, BamCacheRecord record, const LoaderOptions options) |
Reads the texture from the indicated filename. More... | |
bool | read (const Filename fullpath, const LoaderOptions options) |
Reads the named filename into the texture. More... | |
bool | read (const Filename fullpath, int z, int n, bool read_pages, bool read_mipmaps, const LoaderOptions options) |
Reads a single file into a single page or mipmap level, or automatically reads a series of files into a series of pages and/or mipmap levels. More... | |
bool | readDds (Istream in, str filename, bool header_only) |
Reads the texture from a DDS file object. More... | |
bool | readKtx (Istream in, str filename, bool header_only) |
Reads the texture from a KTX file object. More... | |
bool | readTxo (Istream in, str filename) |
Reads the texture from a Panda texture object. More... | |
bool | release (PreparedGraphicsObjects prepared_objects) |
Frees the texture context only on the indicated object, if it exists there. More... | |
int | releaseAll () |
Frees the context allocated on all objects for which the texture has been declared. More... | |
bool | reload () |
Re-reads the Texture from its disk file. More... | |
bool | rescaleTexture () |
This method is similar to consider_rescale(), but instead of scaling a separate PNMImage, it will ask the Texture to rescale its own internal image to a power of 2, according to the config file requirements. More... | |
setAlphaFilename (const Filename alpha_filename) | |
Sets the name of the file that contains the image's alpha channel contents. More... | |
setAlphaFullpath (const Filename alpha_fullpath) | |
Sets the full pathname to the file that contains the image's alpha channel contents, as found along the search path. More... | |
setAnisotropicDegree (int anisotropic_degree) | |
Specifies the level of anisotropic filtering to apply to the texture. More... | |
setAutoTextureScale (AutoTextureScale scale) | |
Specifies the power-of-2 texture-scaling mode that will be applied to this particular texture when it is next loaded from disk. More... | |
setAuxData (str key, TypedReferenceCount aux_data) | |
Records an arbitrary object in the Texture, associated with a specified key. More... | |
setBorderColor (const LColor color) | |
Specifies the solid color of the texture's border. More... | |
setClearColor (const LColor color) | |
Sets the color that will be used to fill the texture image in absence of any image data. More... | |
setComponentType (Texture::ComponentType component_type) | |
Changes the data value for the texture components. More... | |
setCompression (Texture::CompressionMode compression) | |
Requests that this particular Texture be compressed when it is loaded into texture memory. More... | |
setDefaultSampler (const SamplerState sampler) | |
This sets the default sampler state for this texture, containing the wrap and filter properties specified on the texture level; it may still be overridden by a sampler state specified at a higher level. More... | |
setFilename (const Filename filename) | |
Sets the name of the file that contains the image's contents. More... | |
setFormat (Texture::Format format) | |
Changes the format value for the texture components. More... | |
setFullpath (const Filename fullpath) | |
Sets the full pathname to the file that contains the image's contents, as found along the search path. More... | |
setKeepRamImage (bool keep_ram_image) | |
Sets the flag that indicates whether this Texture is eligible to have its main RAM copy of the texture memory dumped when the texture is prepared for rendering. More... | |
setLoadedFromImage (bool flag) | |
Sets the flag that indicates the texture has been loaded from a disk file or PNMImage. More... | |
setLoadedFromTxo (bool flag) | |
Sets the flag that indicates the texture has been loaded from a txo file. More... | |
setMagfilter (Texture::FilterType filter) | |
setMatchFramebufferFormat (bool flag) | |
Sets the special flag that, if true, indicates to the GSG that the Texture's format should be chosen to exactly match the framebuffer's format, presumably because the application intends to copy image data from the framebuffer into the Texture (or vice-versa). More... | |
setMinfilter (Texture::FilterType filter) | |
setNumViews (int num_views) | |
Sets the number of "views" within a texture. More... | |
setOrigFileSize (int x, int y, int z) | |
Specifies the size of the texture as it exists in its original disk file, before any Panda scaling. More... | |
setPadSize (int x, int y, int z) | |
Sets the size of the pad region. More... | |
setPostLoadStoreCache (bool flag) | |
Sets the post_load_store_cache flag. More... | |
setQualityLevel (Texture::QualityLevel quality_level) | |
Sets a hint to the renderer about the desired performance / quality tradeoff for this particular texture. More... | |
setRamImage (object image, Texture::CompressionMode compression, int page_size) | |
setRamImageAs (object image, str provided_format) | |
setRamMipmapImage (int n, CPTAUchar image, int page_size) | |
Replaces the current system-RAM image for the indicated mipmap level with the new data. More... | |
setRamMipmapPointerFromInt (long pointer, int n, int page_size) | |
Accepts a raw pointer cast as an int, which is then passed to set_ram_mipmap_pointer(); see the documentation for that method. More... | |
setRenderToTexture (bool render_to_texture) | |
Sets a flag on the texture that indicates whether the texture is intended to be used as a direct-render target, by binding a framebuffer to a texture and rendering directly into the texture. More... | |
setSimpleRamImage (CPTAUchar image, int x_size, int y_size) | |
Replaces the internal "simple" texture image. More... | |
setSizePadded (int x, int y, int z) | |
Changes the size of the texture, padding if necessary, and setting the pad region as well. More... | |
setup1dTexture () | |
Sets the texture as an empty 1-d texture with no dimensions. More... | |
setup1dTexture (int x_size, Texture::ComponentType component_type, Texture::Format format) | |
Sets the texture as an empty 1-d texture with the specified dimensions and properties. More... | |
setup2dTexture () | |
Sets the texture as an empty 2-d texture with no dimensions. More... | |
setup2dTexture (int x_size, int y_size, Texture::ComponentType component_type, Texture::Format format) | |
Sets the texture as an empty 2-d texture with the specified dimensions and properties. More... | |
setup2dTextureArray (int z_size) | |
Sets the texture as an empty 2-d texture array with no dimensions (though if you know the depth ahead of time, it saves a bit of reallocation later). More... | |
setup2dTextureArray (int x_size, int y_size, int z_size, Texture::ComponentType component_type, Texture::Format format) | |
Sets the texture as an empty 2-d texture array with the specified dimensions and properties. More... | |
setup3dTexture (int z_size) | |
Sets the texture as an empty 3-d texture with no dimensions (though if you know the depth ahead of time, it saves a bit of reallocation later). More... | |
setup3dTexture (int x_size, int y_size, int z_size, Texture::ComponentType component_type, Texture::Format format) | |
Sets the texture as an empty 3-d texture with the specified dimensions and properties. More... | |
setupBufferTexture (int size, Texture::ComponentType component_type, Texture::Format format, GeomEnums::UsageHint usage) | |
Sets the texture as an empty buffer texture with the specified size and properties. More... | |
setupCubeMap () | |
Sets the texture as an empty cube map texture with no dimensions. More... | |
setupCubeMap (int size, Texture::ComponentType component_type, Texture::Format format) | |
Sets the texture as an empty cube map texture with the specified dimensions and properties. More... | |
setupCubeMapArray (int num_cube_maps) | |
Sets the texture as cube map array with N cube maps. More... | |
setupCubeMapArray (int size, int num_cube_maps, Texture::ComponentType component_type, Texture::Format format) | |
Sets the texture as cube map array with N cube maps with the specified dimensions and format. More... | |
setupTexture (Texture::TextureType texture_type, int x_size, int y_size, int z_size, Texture::ComponentType component_type, Texture::Format format) | |
Sets the texture to the indicated type and dimensions, presumably in preparation for calling read() or load(), or set_ram_image() or modify_ram_image(), or use set_clear_color to let the texture be cleared to a solid color. More... | |
setWrapU (Texture::WrapMode wrap) | |
setWrapV (Texture::WrapMode wrap) | |
setWrapW (Texture::WrapMode wrap) | |
setXSize (int x_size) | |
Changes the x size indicated for the texture. More... | |
setYSize (int y_size) | |
Changes the y size indicated for the texture. More... | |
setZSize (int z_size) | |
Changes the z size indicated for the texture. More... | |
bool | store (PNMImage pnmimage) |
Saves the texture to the indicated PNMImage, but does not write it to disk. More... | |
bool | store (PNMImage pnmimage, int z, int n) |
Saves the indicated page and mipmap level of the texture to the PNMImage. More... | |
bool | store (PfmFile pfm) |
Saves the texture to the indicated PfmFile, but does not write it to disk. More... | |
bool | store (PfmFile pfm, int z, int n) |
Saves the indicated page and mipmap level of the texture to the PfmFile. More... | |
bool | uncompressRamImage () |
Attempts to uncompress the texture's RAM image internally. More... | |
bool | usesMipmaps () |
Returns true if the minfilter settings on this texture indicate the use of mipmapping, false otherwise. More... | |
bool | wasImageModified (PreparedGraphicsObjects prepared_objects) |
Returns true if the texture needs to be re-loaded onto the indicated GSG, either because its image data is out-of-date, or because it's not fully prepared now. More... | |
bool | write (const Filename fullpath) |
Writes the texture to the named filename. More... | |
bool | write (const Filename fullpath, int z, int n, bool write_pages, bool write_mipmaps) |
Writes a single page or mipmap level to a single file, or automatically writes a series of pages and/or mipmap levels to a numbered series of files. More... | |
write (Ostream out, int indent_level) | |
Not to be confused with write(Filename), this method simply describes the texture properties. More... | |
bool | writeTxo (Ostream out, str filename) |
Writes the texture to a Panda texture object. More... | |
![]() | |
object | __reduce__ () |
object | __reduce_persist__ (object pickler) |
VectorUchar | encodeToBamStream () |
Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a bytes object. More... | |
bool | encodeToBamStream (VectorUchar data, BamWriter writer) |
Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string. More... | |
fillin (DatagramIterator scan, BamReader manager) | |
This internal function is intended to be called by each class's make_from_bam() method to read in all of the relevant data from the BamFile for the new object. More... | |
UpdateSeq | getBamModified () |
Returns the current bam_modified counter. More... | |
markBamModified () | |
Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams. More... | |
![]() | |
TypeHandle | getType () |
int | getTypeIndex () |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More... | |
bool | isExactType (TypeHandle handle) |
Returns true if the current object is the indicated type exactly. More... | |
bool | isOfType (TypeHandle handle) |
Returns true if the current object is or derives from the indicated type. More... | |
![]() | |
int | getRefCount () |
Returns the current reference count. More... | |
ref () | |
Explicitly increments the reference count. More... | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
bool | unref () |
Explicitly decrements the reference count. More... | |
![]() | |
__init__ (const Namable) | |
__init__ (str initial_name) | |
clearName () | |
Resets the Namable's name to empty. More... | |
str | getName () |
bool | hasName () |
Returns true if the Namable has a nonempty name set, false if the name is empty. More... | |
output (Ostream out) | |
Outputs the Namable. More... | |
setName (str name) | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
![]() | |
static | considerRescale (PNMImage pnmimage, str name, AutoTextureScale auto_texture_scale) |
Asks the PNMImage to change its scale when it reads the image, according to the whims of the Config.prc file. More... | |
static int | downToPower2 (int value) |
Returns the largest power of 2 less than or equal to value. More... | |
static str | formatComponentType (Texture::ComponentType ct) |
Returns the indicated ComponentType converted to a string word. More... | |
static str | formatCompressionMode (Texture::CompressionMode cm) |
Returns the indicated CompressionMode converted to a string word. More... | |
static str | formatFormat (Texture::Format f) |
Returns the indicated Format converted to a string word. More... | |
static str | formatQualityLevel (Texture::QualityLevel tql) |
Returns the indicated QualityLevel converted to a string word. More... | |
static str | formatTextureType (Texture::TextureType tt) |
Returns the indicated TextureType converted to a string word. More... | |
static TypeHandle | getClassType () |
static AutoTextureScale | getTexturesPower2 () |
This flag returns ATS_none, ATS_up, or ATS_down and controls the scaling of textures in general. More... | |
static bool | hasTexturesPower2 () |
If true, then get_textures_power_2 has been set using set_textures_power_2. More... | |
static Texture | makeFromTxo (Istream in, str filename) |
Constructs a new Texture object from the txo file. More... | |
static | setTexturesPower2 (AutoTextureScale scale) |
Set this flag to ATS_none, ATS_up, ATS_down, or ATS_pad to control the scaling of textures in general, if a particular texture does not override this. More... | |
static Texture::ComponentType | stringComponentType (str str) |
Returns the ComponentType corresponding to the indicated string word. More... | |
static Texture::CompressionMode | stringCompressionMode (str str) |
Returns the CompressionMode value associated with the given string representation. More... | |
static Texture::Format | stringFormat (str str) |
Returns the Format corresponding to the indicated string word. More... | |
static Texture::QualityLevel | stringQualityLevel (str str) |
Returns the QualityLevel value associated with the given string representation. More... | |
static Texture::TextureType | stringTextureType (str str) |
Returns the TextureType corresponding to the indicated string word. More... | |
static int | upToPower2 (int value) |
Returns the smallest power of 2 greater than or equal to value. More... | |
![]() | |
static TypedWritableReferenceCount | decodeFromBamStream (VectorUchar data, BamReader reader) |
Reads the bytes created by a previous call to encode_to_bam_stream(), and extracts and returns the single object on those bytes. More... | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
Public Attributes | |
bool | loop |
Returns true if the movie's loop count is not equal to one. More... | |
int | loop_count |
Returns the movie's loop count. More... | |
double | play_rate |
Gets the movie's play-rate. More... | |
bool | playing |
Returns true if the movie's cursor is advancing. More... | |
double | time |
Returns the current value of the movie's cursor. More... | |
int | video_height |
Returns the height in texels of the source video stream. More... | |
double | video_length |
Returns the length of the video. More... | |
int | video_width |
Returns the width in texels of the source video stream. More... | |
![]() | |
const Filename | alpha_filename |
Returns the alpha_filename that has been set. More... | |
const Filename | alpha_fullpath |
Returns the alpha_fullpath that has been set. More... | |
int | anisotropic_degree |
Returns the degree of anisotropic filtering that should be applied to the texture. More... | |
AutoTextureScale | auto_texture_scale |
Returns the power-of-2 texture-scaling mode that will be applied to this particular texture when it is next loaded from disk. More... | |
TypedReferenceCount | aux_data [] |
LColor | border_color |
Returns the solid color of the texture's border. More... | |
bool | cacheable |
Returns true if there is enough information in this Texture object to write it to the bam cache successfully, false otherwise. More... | |
LColor | clear_color |
Returns the color that was previously set using set_clear_color. More... | |
Texture::ComponentType | component_type |
Returns the numeric interpretation of each component of the texture. More... | |
int | component_width |
Returns the number of bytes stored for each color component of a texel. More... | |
Texture::CompressionMode | compression |
Could maybe use has_compression here, too. More... | |
const SamplerState | default_sampler |
This returns the default sampler state for this texture, containing the wrap and filter properties specified on the texture level; it may still be overridden by a sampler state specified at a higher level. More... | |
int | effective_anisotropic_degree |
Returns the degree of anisotropic filtering that should be applied to the texture. More... | |
SamplerState::FilterType | effective_magfilter |
Returns the filter mode of the texture for magnification, with special treatment for FT_default. More... | |
SamplerState::FilterType | effective_minfilter |
Returns the filter mode of the texture for minification, with special treatment for FT_default. More... | |
Texture::QualityLevel | effective_quality_level |
Returns the current quality_level hint, or the global default quality_level if this texture doesn't specify a quality level. More... | |
int | expected_num_mipmap_levels |
Returns the number of mipmap levels that should be defined for this texture, given the texture's size. More... | |
int | expected_ram_image_size |
Returns the number of bytes that ought to be used by the in-memory image, based on the texture parameters. More... | |
int | expected_ram_page_size |
Returns the number of bytes that should be used per each Z page of the 3-d texture. More... | |
const Filename | filename |
Returns the filename that has been set. More... | |
Texture::Format | format |
Returns the format of the texture, which represents both the semantic meaning of the texels and, to some extent, their storage information. More... | |
const Filename | fullpath |
Returns the fullpath that has been set. More... | |
UpdateSeq | image_modified |
Returns a sequence number which is guaranteed to change at least every time the texture image data (including mipmap levels) are modified. More... | |
bool | keep_ram_image |
Returns the flag that indicates whether this Texture is eligible to have its main RAM copy of the texture memory dumped when the texture is prepared for rendering. More... | |
bool | loaded_from_image |
Returns the flag that indicates the texture has been loaded from a disk file or PNMImage. More... | |
bool | loaded_from_txo |
Returns the flag that indicates the texture has been loaded from a txo file. More... | |
SamplerState::FilterType | magfilter |
Returns the filter mode of the texture for magnification. More... | |
bool | match_framebuffer_format |
Returns true if the special flag was set that indicates to the GSG that the Texture's format should be chosen to exactly match the framebuffer's format, presumably because the application intends to copy image data from the framebuffer into the Texture (or vice-versa). More... | |
SamplerState::FilterType | minfilter |
Returns the filter mode of the texture for minification. More... | |
int | num_components |
Returns the number of color components for each texel of the texture image. More... | |
int | num_loadable_ram_mipmap_images |
Returns the number of contiguous mipmap levels that exist in RAM, up until the first gap in the sequence. More... | |
int | num_pages |
Returns the total number of pages in the texture. More... | |
int | num_ram_mipmap_images |
Returns the maximum number of mipmap level images available in system memory. More... | |
int | num_views |
Returns the number of "views" in the texture. More... | |
int | orig_file_x_size |
Returns the X size of the original disk image that this Texture was loaded from (if it came from a disk file), before any automatic rescaling by Panda. More... | |
int | orig_file_y_size |
Returns the Y size of the original disk image that this Texture was loaded from (if it came from a disk file), before any automatic rescaling by Panda. More... | |
int | orig_file_z_size |
Returns the Z size of the original disk image that this Texture was loaded from (if it came from a disk file), before any automatic rescaling by Panda. More... | |
bool | post_load_store_cache |
Returns the setting of the post_load_store_cache flag. More... | |
UpdateSeq | properties_modified |
Returns a sequence number which is guaranteed to change at least every time the texture properties (unrelated to the image) are modified. More... | |
Texture::QualityLevel | quality_level |
Returns the current quality_level hint. More... | |
Texture::CompressionMode | ram_image_compression |
Returns the compression mode in which the ram image is already stored pre- compressed. More... | |
int | ram_image_size |
Returns the total number of bytes used by the in-memory image, across all pages and views, or 0 if there is no in-memory image. More... | |
int | ram_page_size |
Returns the number of bytes used by the in-memory image per page, or 0 if there is no in-memory image. More... | |
int | ram_view_size |
Returns the number of bytes used by the in-memory image per view, or 0 if there is no in-memory image. More... | |
bool | render_to_texture |
Returns a flag on the texture that indicates whether the texture is intended to be used as a direct-render target, by binding a framebuffer to a texture and rendering directly into the texture. More... | |
UpdateSeq | simple_image_modified |
Returns a sequence number which is guaranteed to change at least every time the texture's "simple" image data is modified. More... | |
CPTAUchar | simple_ram_image |
Returns the image data associated with the "simple" texture image. More... | |
int | simple_x_size |
Returns the width of the "simple" image in texels. More... | |
int | simple_y_size |
Returns the height of the "simple" image in texels. More... | |
Texture::TextureType | texture_type |
Returns the overall interpretation of the texture. More... | |
GeomEnums::UsageHint | usage_hint |
Returns the usage hint specified for buffer textures, or UH_unspecified for all other texture types. More... | |
SamplerState::WrapMode | wrap_u |
Returns the wrap mode of the texture in the U direction. More... | |
SamplerState::WrapMode | wrap_v |
Returns the wrap mode of the texture in the V direction. More... | |
SamplerState::WrapMode | wrap_w |
Returns the wrap mode of the texture in the W direction. More... | |
int | x_size |
Returns the width of the texture image in texels. More... | |
int | y_size |
Returns the height of the texture image in texels. More... | |
int | z_size |
Returns the depth of the texture image in texels. More... | |
![]() | |
TypeHandle | type |
Returns the TypeHandle representing this object's type. More... | |
![]() | |
int | ref_count |
The current reference count. More... | |
![]() | |
const String | name |
A texture that fetches video frames from an underlying object of class Movie.
__init__ | ( | MovieVideo | video | ) |
Creates a texture playing the specified movie.
__init__ | ( | str | name | ) |
Creates a blank movie texture.
Movies must be added using do_read_one or do_load_one.
MovieVideoCursor getAlphaCursor | ( | int | page | ) |
Returns the MovieVideoCursor that is feeding the alpha channel for the indicated page, where 0 <= page < get_num_pages().
|
static |
MovieVideoCursor getColorCursor | ( | int | page | ) |
Returns the MovieVideoCursor that is feeding the color channels for the indicated page, where 0 <= page < get_num_pages().
bool getLoop | ( | ) |
Returns true if the movie's loop count is not equal to one.
int getLoopCount | ( | ) |
Returns the movie's loop count.
double getPlayRate | ( | ) |
Gets the movie's play-rate.
double getTime | ( | ) |
Returns the current value of the movie's cursor.
If the movie's loop count is greater than one, then its length is effectively multiplied for the purposes of this function. In other words, the return value will be in the range 0.0 to (length * loopcount).
int getVideoHeight | ( | ) |
Returns the height in texels of the source video stream.
This is not necessarily the height of the actual texture, since the texture may have been expanded to raise it to a power of 2.
double getVideoLength | ( | ) |
Returns the length of the video.
int getVideoWidth | ( | ) |
Returns the width in texels of the source video stream.
This is not necessarily the width of the actual texture, since the texture may have been expanded to raise it to a power of 2.
bool isPlaying | ( | ) |
Returns true if the movie's cursor is advancing.
play | ( | ) |
Plays the movie from the beginning.
restart | ( | ) |
Start playing the movie from where it was last paused.
Has no effect if the movie is not paused, or if the movie's cursor is already at the end.
setLoop | ( | bool | enable | ) |
If true, sets the movie's loop count to 1 billion.
If false, sets the movie's loop count to one.
setLoopCount | ( | int | count | ) |
Sets the movie's loop count to the desired value.
setPlayRate | ( | double | play_rate | ) |
Sets the movie's play-rate.
This is the speed at which the movie's cursor advances. The default is to advance 1.0 movie-seconds per real-time second.
setTime | ( | double | t | ) |
Sets the movie's cursor.
stop | ( | ) |
Stops a currently playing or looping movie right where it is.
The movie's cursor remains frozen at the point where it was stopped.
synchronizeTo | ( | AudioSound | sound | ) |
Synchronize this texture to a sound.
Typically, you would load the texture and the sound from the same AVI file.
unsynchronize | ( | ) |
Stop synchronizing with a sound.
bool loop |
Returns true if the movie's loop count is not equal to one.
int loop_count |
Returns the movie's loop count.
double play_rate |
Gets the movie's play-rate.
bool playing |
Returns true if the movie's cursor is advancing.
double time |
Returns the current value of the movie's cursor.
If the movie's loop count is greater than one, then its length is effectively multiplied for the purposes of this function. In other words, the return value will be in the range 0.0 to (length * loopcount).
int video_height |
Returns the height in texels of the source video stream.
This is not necessarily the height of the actual texture, since the texture may have been expanded to raise it to a power of 2.
double video_length |
Returns the length of the video.
int video_width |
Returns the width in texels of the source video stream.
This is not necessarily the width of the actual texture, since the texture may have been expanded to raise it to a power of 2.