SamplerState
from panda3d.core import SamplerState
- class SamplerState
Bases:
DTOOL_SUPER_BASE
Represents a set of settings that indicate how a texture is sampled. This can be used to sample the same texture using different settings in different places.
Inheritance diagram
- FTDefault = 7
- FTInvalid = 8
- FTLinear = 1
- FTLinearMipmapLinear = 5
- FTLinearMipmapNearest = 3
- FTNearest = 0
- FTNearestMipmapLinear = 4
- FTNearestMipmapNearest = 2
- FTShadow = 6
- FT_default = 7
- FT_invalid = 8
- FT_linear = 1
- FT_linear_mipmap_linear = 5
- FT_linear_mipmap_nearest = 3
- FT_nearest = 0
- FT_nearest_mipmap_linear = 4
- FT_nearest_mipmap_nearest = 2
- FT_shadow = 6
- WMBorderColor = 4
- WMClamp = 0
- WMInvalid = 5
- WMMirror = 2
- WMMirrorOnce = 3
- WMRepeat = 1
- WM_border_color = 4
- WM_clamp = 0
- WM_invalid = 5
- WM_mirror = 2
- WM_mirror_once = 3
- WM_repeat = 1
- __init__(*args, **kwargs)
- anisotropic_degree
- border_color
- effective_anisotropic_degree
- effective_magfilter
- effective_minfilter
- formatFilterType()
C++ Interface: format_filter_type(int ft)
- /**
Returns the indicated FilterType converted to a string word.
*/
- formatWrapMode()
C++ Interface: format_wrap_mode(int wm)
- /**
Returns the indicated WrapMode converted to a string word.
*/
- format_filter_type()
C++ Interface: format_filter_type(int ft)
- /**
Returns the indicated FilterType converted to a string word.
*/
- format_wrap_mode()
C++ Interface: format_wrap_mode(int wm)
- /**
Returns the indicated WrapMode converted to a string word.
*/
- getAnisotropicDegree()
C++ Interface: get_anisotropic_degree(SamplerState self)
- /**
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.
*/
- getBorderColor()
C++ Interface: get_border_color(SamplerState self)
- /**
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.
*/
- getClassType()
C++ Interface: get_class_type()
- getDefault()
C++ Interface: get_default()
- /**
Returns a reference to the global default immutable SamplerState object.
*/
- getEffectiveAnisotropicDegree()
C++ Interface: get_effective_anisotropic_degree(SamplerState self)
- /**
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.
*/
- getEffectiveMagfilter()
C++ Interface: get_effective_magfilter(SamplerState self)
- /**
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.
*/
- getEffectiveMinfilter()
C++ Interface: get_effective_minfilter(SamplerState self)
- /**
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.
*/
- getLodBias()
C++ Interface: get_lod_bias(SamplerState self)
- /**
Returns the bias that will be added to the texture level of detail when
sampling this texture.
*/
- getMagfilter()
C++ Interface: get_magfilter(SamplerState self)
- /**
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().
*/
- getMaxLod()
C++ Interface: get_max_lod(SamplerState self)
- /**
Returns the maximum level of detail that will be observed when sampling
this texture.
*/
- getMinLod()
C++ Interface: get_min_lod(SamplerState self)
- /**
Returns the minimum level of detail that will be observed when sampling
this texture.
*/
- getMinfilter()
C++ Interface: get_minfilter(SamplerState self)
- /**
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().
*/
- getWrapU()
C++ Interface: get_wrap_u(SamplerState self)
- /**
Returns the wrap mode of the texture in the U direction.
*/
- getWrapV()
C++ Interface: get_wrap_v(SamplerState self)
- /**
Returns the wrap mode of the texture in the V direction.
*/
- getWrapW()
C++ Interface: get_wrap_w(SamplerState self)
- /**
Returns the wrap mode of the texture in the W direction. This is the depth
direction of 3-d textures.
*/
- get_anisotropic_degree()
C++ Interface: get_anisotropic_degree(SamplerState self)
- /**
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.
*/
- get_border_color()
C++ Interface: get_border_color(SamplerState self)
- /**
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.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_default()
C++ Interface: get_default()
- /**
Returns a reference to the global default immutable SamplerState object.
*/
- get_effective_anisotropic_degree()
C++ Interface: get_effective_anisotropic_degree(SamplerState self)
- /**
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.
*/
- get_effective_magfilter()
C++ Interface: get_effective_magfilter(SamplerState self)
- /**
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.
*/
- get_effective_minfilter()
C++ Interface: get_effective_minfilter(SamplerState self)
- /**
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.
*/
- get_lod_bias()
C++ Interface: get_lod_bias(SamplerState self)
- /**
Returns the bias that will be added to the texture level of detail when
sampling this texture.
*/
- get_magfilter()
C++ Interface: get_magfilter(SamplerState self)
- /**
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().
*/
- get_max_lod()
C++ Interface: get_max_lod(SamplerState self)
- /**
Returns the maximum level of detail that will be observed when sampling
this texture.
*/
- get_min_lod()
C++ Interface: get_min_lod(SamplerState self)
- /**
Returns the minimum level of detail that will be observed when sampling
this texture.
*/
- get_minfilter()
C++ Interface: get_minfilter(SamplerState self)
- /**
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().
*/
- get_wrap_u()
C++ Interface: get_wrap_u(SamplerState self)
- /**
Returns the wrap mode of the texture in the U direction.
*/
- get_wrap_v()
C++ Interface: get_wrap_v(SamplerState self)
- /**
Returns the wrap mode of the texture in the V direction.
*/
- get_wrap_w()
C++ Interface: get_wrap_w(SamplerState self)
- /**
Returns the wrap mode of the texture in the W direction. This is the depth
direction of 3-d textures.
*/
- isMipmap()
C++ Interface: is_mipmap(int type)
- /**
Returns true if the indicated filter type requires the use of mipmaps, or
false if it does not.
*/
- isPrepared()
C++ Interface: is_prepared(SamplerState self, PreparedGraphicsObjects prepared_objects)
- /**
Returns true if the sampler has already been prepared or enqueued for
preparation on the indicated GSG, false otherwise.
*/
- is_mipmap()
C++ Interface: is_mipmap(int type)
- /**
Returns true if the indicated filter type requires the use of mipmaps, or
false if it does not.
*/
- is_prepared()
C++ Interface: is_prepared(SamplerState self, PreparedGraphicsObjects prepared_objects)
- /**
Returns true if the sampler has already been prepared or enqueued for
preparation on the indicated GSG, false otherwise.
*/
- lod_bias
- magfilter
- max_lod
- min_lod
- minfilter
- prepare()
C++ Interface: prepare(SamplerState self, PreparedGraphicsObjects prepared_objects)
- /**
Indicates that the sampler should be enqueued to be prepared in the
indicated prepared_objects at the beginning of the next frame.
Use this function instead of prepare_now() to preload samplers from a user
interface standpoint.
*/
- release()
C++ Interface: release(SamplerState self, 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.
*/
- setAnisotropicDegree()
C++ Interface: set_anisotropic_degree(const SamplerState self, int anisotropic_degree)
- /**
Specifies the level of anisotropic filtering to apply to the SamplerState.
Set this 0 to indicate the default value, which is specified in the
SamplerState-anisotropic-degree config variable.
To explicitly disable anisotropic filtering, set this value to 1. To
explicitly enable anisotropic filtering, set it to a value higher than 1;
larger numbers indicate greater degrees of filtering.
*/
- setBorderColor()
C++ Interface: set_border_color(const SamplerState self, const LVecBase4f color)
- /**
Specifies the solid color of the SamplerState’s border. Some OpenGL
implementations use a border for tiling SamplerStates; in Panda, it is only
used for specifying the clamp color.
*/
- setLodBias()
C++ Interface: set_lod_bias(const SamplerState self, float lod_bias)
- /**
Sets the value that will be added to the level of detail when sampling the
texture. This may be a negative value, although some graphics hardware may
not support the use of negative LOD values.
*/
- setMagfilter()
C++ Interface: set_magfilter(const SamplerState self, int filter)
- /**
Sets the filtering method that should be used when viewing the SamplerState
up close.
*/
- setMaxLod()
C++ Interface: set_max_lod(const SamplerState self, float max_lod)
- /**
Sets the maximum level of detail that will be used when sampling this
texture. This may exceed the number of mipmap levels that the texture has.
*/
- setMinLod()
C++ Interface: set_min_lod(const SamplerState self, float min_lod)
- /**
Sets the minimum level of detail that will be used when sampling this
texture. This may be a negative value.
*/
- setMinfilter()
C++ Interface: set_minfilter(const SamplerState self, int filter)
- /**
Sets the filtering method that should be used when viewing the SamplerState
from a distance.
*/
- setWrapU()
C++ Interface: set_wrap_u(const SamplerState self, int wrap)
- /**
This setting determines what happens when the SamplerState is sampled with
a U value outside the range 0.0-1.0. The default is WM_repeat, which
indicates that the SamplerState should repeat indefinitely.
*/
- setWrapV()
C++ Interface: set_wrap_v(const SamplerState self, int wrap)
- /**
This setting determines what happens when the SamplerState is sampled with
a V value outside the range 0.0-1.0. The default is WM_repeat, which
indicates that the SamplerState should repeat indefinitely.
*/
- setWrapW()
C++ Interface: set_wrap_w(const SamplerState self, int wrap)
- /**
The W wrap direction is only used for 3-d SamplerStates.
*/
- set_anisotropic_degree()
C++ Interface: set_anisotropic_degree(const SamplerState self, int anisotropic_degree)
- /**
Specifies the level of anisotropic filtering to apply to the SamplerState.
Set this 0 to indicate the default value, which is specified in the
SamplerState-anisotropic-degree config variable.
To explicitly disable anisotropic filtering, set this value to 1. To
explicitly enable anisotropic filtering, set it to a value higher than 1;
larger numbers indicate greater degrees of filtering.
*/
- set_border_color()
C++ Interface: set_border_color(const SamplerState self, const LVecBase4f color)
- /**
Specifies the solid color of the SamplerState’s border. Some OpenGL
implementations use a border for tiling SamplerStates; in Panda, it is only
used for specifying the clamp color.
*/
- set_lod_bias()
C++ Interface: set_lod_bias(const SamplerState self, float lod_bias)
- /**
Sets the value that will be added to the level of detail when sampling the
texture. This may be a negative value, although some graphics hardware may
not support the use of negative LOD values.
*/
- set_magfilter()
C++ Interface: set_magfilter(const SamplerState self, int filter)
- /**
Sets the filtering method that should be used when viewing the SamplerState
up close.
*/
- set_max_lod()
C++ Interface: set_max_lod(const SamplerState self, float max_lod)
- /**
Sets the maximum level of detail that will be used when sampling this
texture. This may exceed the number of mipmap levels that the texture has.
*/
- set_min_lod()
C++ Interface: set_min_lod(const SamplerState self, float min_lod)
- /**
Sets the minimum level of detail that will be used when sampling this
texture. This may be a negative value.
*/
- set_minfilter()
C++ Interface: set_minfilter(const SamplerState self, int filter)
- /**
Sets the filtering method that should be used when viewing the SamplerState
from a distance.
*/
- set_wrap_u()
C++ Interface: set_wrap_u(const SamplerState self, int wrap)
- /**
This setting determines what happens when the SamplerState is sampled with
a U value outside the range 0.0-1.0. The default is WM_repeat, which
indicates that the SamplerState should repeat indefinitely.
*/
- set_wrap_v()
C++ Interface: set_wrap_v(const SamplerState self, int wrap)
- /**
This setting determines what happens when the SamplerState is sampled with
a V value outside the range 0.0-1.0. The default is WM_repeat, which
indicates that the SamplerState should repeat indefinitely.
*/
- set_wrap_w()
C++ Interface: set_wrap_w(const SamplerState self, int wrap)
- /**
The W wrap direction is only used for 3-d SamplerStates.
*/
- stringFilterType()
C++ Interface: string_filter_type(str str)
- /**
Returns the FilterType value associated with the given string
representation, or FT_invalid if the string does not match any known
FilterType value.
*/
- stringWrapMode()
C++ Interface: string_wrap_mode(str str)
- /**
Returns the WrapMode value associated with the given string representation,
or WM_invalid if the string does not match any known WrapMode value.
*/
- string_filter_type()
C++ Interface: string_filter_type(str str)
- /**
Returns the FilterType value associated with the given string
representation, or FT_invalid if the string does not match any known
FilterType value.
*/
- string_wrap_mode()
C++ Interface: string_wrap_mode(str str)
- /**
Returns the WrapMode value associated with the given string representation,
or WM_invalid if the string does not match any known WrapMode value.
*/
- usesMipmaps()
C++ Interface: uses_mipmaps(SamplerState self)
- /**
Returns true if the minfilter settings on this sampler indicate the use of
mipmapping, false otherwise.
*/
- uses_mipmaps()
C++ Interface: uses_mipmaps(SamplerState self)
- /**
Returns true if the minfilter settings on this sampler indicate the use of
mipmapping, false otherwise.
*/
- wrap_u
- wrap_v
- wrap_w