|
int | getXSize () |
| Returns the x size of the page (texture), in pixels. More...
|
|
int | getYSize () |
| Returns the y size of the page (texture), in pixels. More...
|
|
bool | isEmpty () |
| Returns true if the page has no glyphs, false otherwise. More...
|
|
Public Member Functions inherited from Texture |
| __init__ (str name) |
| Constructs an empty texture. The default is to set up the texture as an empty 2-d texture; follow up with one of the variants of setup_texture() if this is not what you want. 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. See set_alpha_filename(). More...
|
|
| clearAlphaFullpath () |
| Removes the alpha fullpath, if it was previously set. See set_alpha_fullpath(). More...
|
|
| clearAuxData (str key) |
| Removes a record previously recorded via set_aux_data(). More...
|
|
| clearFilename () |
| Removes the alpha filename, if it was previously set. See set_filename(). More...
|
|
| clearFullpath () |
| Removes the alpha fullpath, if it was previously set. See set_fullpath(). More...
|
|
| clearImage () |
| Clears the texture data without changing its format or resolution. The texture is cleared on both the graphics hardware and from RAM, unlike clear_ram_image, which only removes the data from RAM. 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. In order for this to work, the squish library must have been compiled into Panda. 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...
|
|
size_t | estimateTextureMemory () |
| Estimates the amount of texture memory that will be consumed by loading this texture. This returns a value that is not specific to any particular graphics card or driver; it tries to make a reasonable assumption about how a driver will load the texture. It does not account for texture compression or anything fancy. This is mainly useful for debugging and reporting purposes. 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. The texture is a gradient, with an alpha of 0 on the left (U = 0), and 255 on the right (U = 1). 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. This requires the texture's uncompressed ram image to be available in system memory. If it is not already, it will be fetched if possible. 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. This may be an expensive operation. 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. If this is set, it represents the name of the alpha component, which is stored in a separate file. See also get_filename(), and get_alpha_fullpath(). More...
|
|
const Filename | getAlphaFullpath () |
| Returns the alpha_fullpath that has been set. This is the full path to the alpha part of the image file as it was found along the texture search path. More...
|
|
int | getAnisotropicDegree () |
| Returns the degree of anisotropic filtering that should be applied to the texture. This value may return 0, indicating the default value; see also get_effective_anisotropic_degree. 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. See set_textures_power_2(). More...
|
|
TypedReferenceCount | getAuxData (str key) |
| Returns a record previously recorded via set_aux_data(). Returns NULL if there was no record associated with the indicated key. More...
|
|
LColor | getBorderColor () |
| Returns the solid color of the texture's border. Some OpenGL implementations use a border for tiling textures; in Panda, it is only used for specifying the clamp color. More...
|
|
LColor | getClearColor () |
| Returns the color that was previously set using set_clear_color. More...
|
|
str | 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. Typically this is 1, but it may be 2 for 16-bit texels. 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...
|
|
size_t | getDataSizeBytes (PreparedGraphicsObjects prepared_objects) |
| Returns the number of bytes which the texture is reported to consume within graphics memory, for the indicated GSG. This may return a nonzero value even if the texture is not currently resident; you should also check get_resident() if you want to know how much space the texture is actually consuming right now. 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. This value will normally not return 0, unless there is an error in the config file. More...
|
|
SamplerState::FilterType | getEffectiveMagfilter () |
| Returns the filter mode of the texture for magnification, with special treatment for FT_default. This will normally not return FT_default, unless there is an error in the config file. More...
|
|
SamplerState::FilterType | getEffectiveMinfilter () |
| Returns the filter mode of the texture for minification, with special treatment for FT_default. This will normally not return FT_default, unless there is an error in the config file. 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. This value will not normally return QL_default (unless there is an error in the config file) More...
|
|
int | getExpectedMipmapNumPages (int n) |
| Returns the total number of pages that the nth mipmap level should have, based on the texture's size. This is usually the same as get_expected_mipmap_z_size(), except for a multiview texture, in which case it is get_expected_mipmap_z_size() * get_num_views(). 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...
|
|
size_t | getExpectedRamImageSize () |
| Returns the number of bytes that ought to be used by the in-memory image, based on the texture parameters. More...
|
|
size_t | 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...
|
|
size_t | 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. For a 2-d or 1-d texture, this is the same as get_expected_ram_mipmap_view_size(n). More...
|
|
size_t | 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. For a normal, non-multiview texture, this is the same as get_expected_ram_mipmap_image_size(n). More...
|
|
size_t | getExpectedRamPageSize () |
| Returns the number of bytes that should be used per each Z page of the 3-d texture. For a 2-d or 1-d texture, this is the same as get_expected_ram_image_size(). More...
|
|
const Filename | getFilename () |
| Returns the filename that has been set. This is the name of the file as it was requested. Also see get_fullpath(). 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. This is the full path to the file as it was found along the texture search path. 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. See set_keep_ram_image(). More...
|
|
bool | getLoadedFromImage () |
| Returns the flag that indicates the texture has been loaded from a disk file or PNMImage. See set_loaded_from_image(). 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. The mipmap constants are invalid here. This may return FT_default; see also get_effective_minfilter(). 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. If this is one of the mipmap constants, then the texture requires mipmaps. This may return FT_default; see also get_effective_minfilter(). More...
|
|
int | getNumComponents () |
| Returns the number of color components for each texel of the texture image. This is 3 for an rgb texture or 4 for an rgba texture; it may also be 1 or 2 for a grayscale texture. More...
|
|
int | getNumLoadableRamMipmapImages () |
| Returns the number of contiguous mipmap levels that exist in RAM, up until the first gap in the sequence. It is guaranteed that at least mipmap levels [0, get_num_ram_mipmap_images()) exist. More...
|
|
int | getNumPages () |
| Returns the total number of pages in the texture. Each "page" is a 2-d texture image within the larger image–a face of a cube map, or a level of a 3-d texture. Normally, get_num_pages() is the same as get_z_size(). However, in a multiview texture, this returns get_z_size() * get_num_views(). More...
|
|
int | getNumRamMipmapImages () |
| Returns the maximum number of mipmap level images available in system memory. The actual number may be less than this (that is, there might be gaps in the sequence); use has_ram_mipmap_image() to verify each level. More...
|
|
int | getNumViews () |
| Returns the number of "views" in the texture. A view is a completely separate image stored within the Texture object. Most textures have only one view, but a stereo texture, for instance, may have two views, a left and a right image. Other uses for multiple views are not yet defined. 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. See set_pad_size. More...
|
|
int | getPadYSize () |
| Returns size of the pad region. See set_pad_size. More...
|
|
int | getPadZSize () |
| Returns size of the pad region. See set_pad_size. More...
|
|
bool | getPostLoadStoreCache () |
| Returns the setting of the post_load_store_cache flag. See set_post_load_store_cache(). 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. See set_quality_level(). This value may return QL_default; see get_effective_quality_level(). More...
|
|
CPTAUchar | getRamImage () |
| Returns the system-RAM image data associated with the texture. If the texture does not currently have an associated RAM image, and the texture was generated by loading an image from a disk file (the most common case), this forces the reload of the same texture. This can happen if keep_texture_ram is configured to false, and we have previously prepared this texture with a GSG. More...
|
|
CPTAUchar | getRamImageAs (str requested_format) |
| Returns the uncompressed system-RAM image data associated with the texture. Rather than just returning a pointer to the data, like get_uncompressed_ram_image, this function first processes the data and reorders the components using the specified format string, and places these into a new char array. The 'format' argument should specify in which order the components of the texture must be. For example, valid format strings are "RGBA", "GA", "ABRG" or "AAA". A component can also be written as "0" or "1", which means an empty/black or a full/white channel, respectively. This function is particularly useful to copy an image in-memory to a different library (for example, PIL or wxWidgets) that require a different component order than Panda's internal format, BGRA. Note, however, that this conversion can still be too slow if you want to do it every frame, and should thus be avoided for that purpose. The only requirement for the reordering is that an uncompressed image must be available. If the RAM image is compressed, it will attempt to re-load the texture from disk, if it doesn't find an uncompressed image there, it will return NULL. More...
|
|
Texture::CompressionMode | getRamImageCompression () |
| Returns the compression mode in which the ram image is already stored pre-compressed. If this is other than CM_off, you cannot rely on the contents of the ram image to be anything predicatable (it will not be an array of x by y pixels, and it probably won't have the same length as get_expected_ram_image_size()). More...
|
|
size_t | 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. Returns NULL if the nth mipmap level is not present. More...
|
|
size_t | 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...
|
|
size_t | 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. This will be NULL unless it has been explicitly set. More...
|
|
size_t | 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...
|
|
size_t | getRamPageSize () |
| Returns the number of bytes used by the in-memory image per page, or 0 if there is no in-memory image. More...
|
|
size_t | getRamViewSize () |
| Returns the number of bytes used by the in-memory image per view, or 0 if there is no in-memory image. Since each view is a stack of z_size pages, this is get_z_size() * get_ram_page_size(). 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. This is provided for some textures as an option to display while the main texture image is being loaded from disk. More...
|
|
size_t | 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...
|
|
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. This is the depth direction of 3-d textures. More...
|
|
int | getXSize () |
| Returns the width of the texture image in texels. More...
|
|
int | getYSize () |
| Returns the height of the texture image in texels. For a 1-d texture, this will be 1. More...
|
|
int | getZSize () |
| Returns the depth of the texture image in texels. For a 1-d texture or 2-d texture, this will be 1. For a cube map texture, this will be 6. 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. See set_alpha_filename(). More...
|
|
bool | hasAlphaFullpath () |
| Returns true if the alpha_fullpath has been set and is available. See set_alpha_fullpath(). 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. See set_filename(). More...
|
|
bool | hasFullpath () |
| Returns true if the fullpath has been set and is available. See set_fullpath(). 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. If the texture's minfilter mode requires mipmapping (see uses_mipmaps()), and all the texture's mipmap levels are not available when the texture is rendered, they will be generated automatically. 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. See has_ram_image(). More...
|
|
bool | isCacheable () |
| Returns true if there is enough information in this Texture object to write it to the bam cache successfully, false otherwise. For most textures, this is the same as has_ram_image(). 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. See read(). 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. See read(). More...
|
|
Texture | loadRelated (const InternalName suffix) |
| Loads a texture whose filename is derived by concatenating a suffix to the filename of this texture. May return NULL, for example, if this texture doesn't have a filename. More...
|
|
bool | loadSubImage (const PNMImage pnmimage, int x, int y, int z, int n) |
| Stores the indicated image in a region of the texture. The texture properties remain unchanged. This can be more efficient than updating an entire texture, but has a few restrictions: for one, you must ensure that the texture is still in RAM (eg. using set_keep_ram_image) and it may not be compressed. More...
|
|
Texture | makeCopy () |
| Returns a new copy of the same Texture. This copy, if applied to geometry, will be copied into texture as a separate texture from the original, so it will be duplicated in texture memory (and may be independently modified if desired). More...
|
|
PTAUchar | makeRamImage () |
| Discards the current system-RAM image for the texture, if any, and allocates a new buffer of the appropriate size. Returns the new buffer. 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. Returns the new buffer. 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. That is, this function returns a "best guess" as to whether get_ram_image() will succeed without actually calling it first. More...
|
|
PTAUchar | modifyRamImage () |
| Returns a modifiable pointer to the system-RAM image. This assumes the RAM image should be uncompressed. If the RAM image has been dumped, or is stored compressed, creates a new one. More...
|
|
PTAUchar | modifyRamMipmapImage (int n) |
| Returns a modifiable pointer to the system-RAM image for the nth mipmap level. This assumes the RAM image is uncompressed; if this is not the case, raises an assertion. More...
|
|
PTAUchar | modifySimpleRamImage () |
| Returns a modifiable pointer to the internal "simple" texture image. See set_simple_ram_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. See set_simple_ram_image(). 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...
|
|
| 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. This will ensure the texture is already loaded into texture memory if it is expected to be rendered soon. 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. Returns the new (or old) TextureContext. This assumes that the GraphicsStateGuardian is the currently active rendering context and that it is ready to accept new textures. If this is not necessarily the case, you should use prepare() instead. 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. If primary_file_num_channels is not 0, it specifies the number of components to downgrade the image to if it is greater than this number. 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. This is a Microsoft-defined file format; it is similar in principle to a txo object, in that it is designed to contain the texture image in a form as similar as possible to its runtime image, and it can contain mipmaps, pre-compressed textures, and so on. More...
|
|
bool | readTxo (Istream in, str filename) |
| Reads the texture from a Panda texture object. This defines the complete Texture specification, including the image data as well as all texture properties. This only works if the txo file contains a static Texture image, as opposed to a subclass of Texture such as a movie texture. More...
|
|
bool | release (PreparedGraphicsObjects prepared_objects) |
| Frees the texture context only on the indicated object, if it exists there. Returns true if it was released, false if it had not been prepared. More...
|
|
int | releaseAll () |
| Frees the context allocated on all objects for which the texture has been declared. Returns the number of contexts which have been freed. More...
|
|
bool | reload () |
| Re-reads the Texture from its disk file. Useful when you know the image on disk has recently changed, and you want to update the Texture image. 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. This may be useful after loading a Texture image by hand, instead of reading it from a disk file. Returns true if the texture is changed, false if it was not. More...
|
|
| setAlphaFilename (const Filename alpha_filename) |
| Sets the name of the file that contains the image's alpha channel contents. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). 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. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). More...
|
|
| setAnisotropicDegree (int anisotropic_degree) |
| Specifies the level of anisotropic filtering to apply to the texture. Set this 0 to indicate the default value, which is specified in the texture-anisotropic-degree config variable. 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. See set_textures_power_2(). More...
|
|
| setAuxData (str key, TypedReferenceCount aux_data) |
| Records an arbitrary object in the Texture, associated with a specified key. The object may later be retrieved by calling get_aux_data() with the same key. More...
|
|
| setBorderColor (const LColor color) |
| Specifies the solid color of the texture's border. Some OpenGL implementations use a border for tiling textures; in Panda, it is only used for specifying the clamp color. More...
|
|
| setClearColor (const LColor color) |
| Sets the color that will be used to fill the texture image in absence of any image data. It is used when any of the setup_texture functions or clear_image is called and image data is not provided using read() or modify_ram_image(). More...
|
|
| setComponentType (Texture::ComponentType component_type) |
| Changes the data value for the texture components. This implicitly sets component_width as well. More...
|
|
| setCompression (Texture::CompressionMode compression) |
| Requests that this particular Texture be compressed when it is loaded into texture memory. More...
|
|
| setFilename (const Filename filename) |
| Sets the name of the file that contains the image's contents. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). More...
|
|
| setFormat (Texture::Format format) |
| Changes the format value for the texture components. This implicitly sets num_components as well. More...
|
|
| setFullpath (const Filename fullpath) |
| Sets the full pathname to the file that contains the image's contents, as found along the search path. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). 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 () |
| Sets the flag that indicates the texture has been loaded from a disk file or PNMImage. You should also ensure the filename has been set correctly. When this flag is true, the texture may be automatically reloaded when its ram image needs to be replaced. More...
|
|
| setLoadedFromTxo () |
| Sets the flag that indicates the texture has been loaded from a txo file. You probably shouldn't be setting this directly; it is set automatically when a Texture is loaded. 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. A view is a completely separate image stored within the Texture object. Most textures have only one view, but a stereo texture, for instance, may have two views, a left and a right image. Other uses for multiple views are not yet defined. 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. When this is set, the next time the texture is loaded on a GSG, it will automatically extract its RAM image from the GSG and save it to the global BamCache. More...
|
|
| setQualityLevel (Texture::QualityLevel quality_level) |
| Sets a hint to the renderer about the desired performance / quality tradeoff for this particular texture. This is most useful for the tinydisplay software renderer; for normal, hardware-accelerated renderers, this may have little or no effect. More...
|
|
| setRamImage (CPTAUchar image, Texture::CompressionMode compression, size_t page_size) |
| Replaces the current system-RAM image with the new data. If compression is not CM_off, it indicates that the new data is already pre-compressed in the indicated format. More...
|
|
| setRamImageAs (CPTAUchar image, str provided_format) |
| Replaces the current system-RAM image with the new data, converting it first if necessary from the indicated component-order format. See get_ram_image_as() for specifications about the format. This method cannot support compressed image data or sub-pages; use set_ram_image() for that. More...
|
|
| setRamMipmapImage (int n, CPTAUchar image, size_t page_size) |
| Replaces the current system-RAM image for the indicated mipmap level with the new data. If compression is not CM_off, it indicates that the new data is already pre-compressed in the indicated format. More...
|
|
| setRamMipmapPointerFromInt (long long int 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. This can be used as an option to display while the main texture image is being loaded from disk. It is normally a very small image, 16x16 or smaller (and maybe even 1x1), that is designed to give just enough sense of color to serve as a placeholder until the full texture is available. 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. Follow up with read() or load() to fill the texture properties and image data, or use set_clear_color to let the texture be cleared to a solid color. 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. Follow up with set_ram_image() or modify_ram_image() to fill the image data, or use set_clear_color to let the texture be cleared to a solid color. More...
|
|
| setup2dTexture () |
| Sets the texture as an empty 2-d texture with no dimensions. Follow up with read() or load() to fill the texture properties and image data, or use set_clear_color to let the texture be cleared to a solid color. 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. Follow up with set_ram_image() or modify_ram_image() to fill the image data, or use set_clear_color to let the texture be cleared to a solid color. 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). Follow up with read() or load() to fill the texture properties and image data, or use set_clear_color to let the texture be cleared to a solid color. 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. Follow up with set_ram_image() or modify_ram_image() to fill the image data, or use set_clear_color to let the texture be cleared to a solid color. 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). Follow up with read() or load() to fill the texture properties and image data, or use set_clear_color to let the texture be cleared to a solid color. 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. Follow up with set_ram_image() or modify_ram_image() to fill the image data. More...
|
|
| setupCubeMap () |
| Sets the texture as an empty cube map texture with no dimensions. Follow up with read() or load() to fill the texture properties and image data, or use set_clear_color to let the texture be cleared to a solid color. 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. Follow up with set_ram_image() or modify_ram_image() to fill the image data, or use set_clear_color to let the texture be cleared to a solid color. 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. This also implicitly unloads the texture if it has already been loaded. More...
|
|
| setYSize (int y_size) |
| Changes the y size indicated for the texture. This also implicitly unloads the texture if it has already been loaded. More...
|
|
| setZSize (int z_size) |
| Changes the z size indicated for the texture. This also implicitly unloads the texture if it has already been loaded. 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. In order for this to work, the squish library must have been compiled into Panda, and the ram image must be compressed in a format supported by squish. 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. This defines the complete Texture specification, including the image data as well as all texture properties. More...
|
|
Public Member Functions inherited from TypedWritable |
object | __reduce__ () |
|
object | __reduce_persist__ (object pickler) |
|
str | encodeToBamStream () |
| Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string. Returns empty string on failure. More...
|
|
bool | encodeToBamStream (String data, BamWriter writer) |
| Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string. Returns true on success, false on failure. More...
|
|
UpdateSeq | getBamModified () |
| Returns the current bam_modified counter. This counter is normally incremented automatically whenever the object is modified. More...
|
|
| markBamModified () |
| Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams. This should normally not need to be called by user code; it should be called internally when the object has been changed in a way that legitimately requires its retransmission to any connected clients. More...
|
|
Public Member Functions inherited from TypedObject |
TypeHandle | getType () |
| Derived classes should override this function to return get_class_type(). More...
|
|
int | getTypeIndex () |
| Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). 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...
|
|
Public Member Functions inherited from ReferenceCount |
int | getRefCount () |
| Returns the current reference count. More...
|
|
| ref () |
| Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. More...
|
|
bool | testRefCountIntegrity () |
| Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise. More...
|
|
bool | testRefCountNonzero () |
| Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise. More...
|
|
bool | unref () |
| Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete(). More...
|
|
Public Member Functions inherited from Namable |
| __init__ (const Namable copy) |
|
| __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...
|
|
Namable | operator= (const Namable other) |
|
| output (Ostream out) |
| Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this. More...
|
|
| setName (str name) |
|