Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Types | Public Member Functions | Static Public Member Functions
EggTexture Class Reference

Defines a texture map that may be applied to geometry. More...

Inheritance diagram for EggTexture:
EggFilenameNode EggRenderMode EggTransform EggNode EggNamedObject EggObject

List of all members.

Public Types

enum  CombineChannel { CCRgb = 0, CCAlpha = 1, CCNumChannels = 2 }
enum  CombineIndex { CINumIndices = 3 }
enum  CombineMode {
  CMUnspecified = 0, CMReplace = 1, CMModulate = 2, CMAdd = 3,
  CMAddSigned = 4, CMInterpolate = 5, CMSubtract = 6, CMDot3Rgb = 7,
  CMDot3Rgba = 8
}
enum  CombineOperand {
  COUnspecified = 0, COSrcColor = 1, COOneMinusSrcColor = 2, COSrcAlpha = 3,
  COOneMinusSrcAlpha = 4
}
enum  CombineSource {
  CSUnspecified = 0, CSTexture = 1, CSConstant = 2, CSPrimaryColor = 3,
  CSPrevious = 4, CSConstantColorScale = 5, CSLastSavedResult = 6
}
enum  CompressionMode {
  CMDefault = 0, CMOff = 1, CMOn = 2, CMFxt1 = 3,
  CMDxt1 = 4, CMDxt2 = 5, CMDxt3 = 6, CMDxt4 = 7,
  CMDxt5 = 8
}
enum  EnvType {
  ETUnspecified = 0, ETModulate = 1, ETDecal = 2, ETBlend = 3,
  ETReplace = 4, ETAdd = 5, ETBlendColorScale = 6, ETModulateGlow = 7,
  ETModulateGloss = 8, ETNormal = 9, ETNormalHeight = 10, ETGlow = 11,
  ETGloss = 12, ETHeight = 13, ETSelector = 14, ETNormalGloss = 15
}
enum  Equivalence {
  EBasename = 1, EExtension = 2, EDirname = 4, ECompleteFilename = 7,
  ETransform = 8, EAttributes = 16, ETrefName = 32
}
enum  FilterType {
  FTUnspecified = 0, FTNearest = 1, FTLinear = 2, FTNearestMipmapNearest = 3,
  FTLinearMipmapNearest = 4, FTNearestMipmapLinear = 5, FTLinearMipmapLinear = 6
}
enum  Format {
  FUnspecified = 0, FRgba = 1, FRgbm = 2, FRgba12 = 3,
  FRgba8 = 4, FRgba4 = 5, FRgba5 = 6, FRgb = 7,
  FRgb12 = 8, FRgb8 = 9, FRgb5 = 10, FRgb332 = 11,
  FRed = 12, FGreen = 13, FBlue = 14, FAlpha = 15,
  FLuminance = 16, FLuminanceAlpha = 17, FLuminanceAlphamask = 18
}
enum  QualityLevel {
  QLUnspecified = 0, QLDefault = 1, QLFastest = 2, QLNormal = 3,
  QLBest = 4
}
enum  TexGen {
  TGUnspecified = 0, TGEyeSphereMap = 1, TGWorldCubeMap = 2, TGEyeCubeMap = 3,
  TGWorldNormal = 4, TGEyeNormal = 5, TGWorldPosition = 6, TGEyePosition = 7,
  TGPointSprite = 8
}
enum  TextureType {
  TTUnspecified = 0, TT1dTexture = 1, TT2dTexture = 2, TT3dTexture = 3,
  TTCubeMap = 4
}
enum  WrapMode {
  WMUnspecified = 0, WMClamp = 1, WMRepeat = 2, WMMirror = 3,
  WMMirrorOnce = 4, WMBorderColor = 5
}

Public Member Functions

 EggTexture (EggTexture const copy)
 EggTexture (string tref_name, Filename const filename)
bool affectsPolygonAlpha ()
 Returns true if this texture's environment type or combine mode allows the texture to have an effect on the polygon's alpha values, false otherwise.
 clearAlphaFileChannel ()
 Removes the specification of a particular channel to use from the alpha-file image.
 clearAlphaFilename ()
 clearAlphaScale ()
 Removes the alpha_scale from the texture and restores it to the default value of 1.
 clearAnisotropicDegree ()
 Removes the specification of anisotropic filtering from the texture.
 clearBorderColor ()
 clearColor ()
 clearMultitexture ()
 Resets the multitexture flags set by multitexture_over().
 clearNumViews ()
 Removes the specification of the number of views for a 3-D multiview texture.
 clearPriority ()
 Removes the specification of multitexture priority from the texture.
 clearRgbScale ()
 Removes the rgb_scale from the texture and restores it to the default value of 1.
 clearStageName ()
 Removes the named TextureStage specification.
 clearUvName ()
 Removes the restriction to a particular named set of texture coordinates and restores the texture to using the default texture coordinates.
WrapMode determineWrapU ()
 Determines the appropriate wrap in the U direction.
WrapMode determineWrapV ()
 Determines the appropriate wrap in the V direction.
WrapMode determineWrapW ()
 Determines the appropriate wrap in the W direction.
int getAlphaFileChannel ()
 Returns the particular channel that has been specified for the alpha-file image, or 0 if no channel has been specified.
Filename const getAlphaFilename ()
 Returns the separate file assigned for the alpha channel.
Filename const getAlphaFullpath ()
 Returns the full pathname to the alpha file, if it is known; otherwise, returns the same thing as get_alpha_filename().
int getAlphaScale ()
 Returns the alpha_scale value that has been specified for the texture, or 1 if no alpha_scale value has been specified.
int getAnisotropicDegree ()
 Returns the anisotropic filtering degree that has been specified for this texture, or 0 if nothing has been specified.
VBase4 const getBorderColor ()
 Returns the border color if one has been specified, or (0, 0, 0, 1) otherwise.
VBase4 const getColor ()
 Returns the blend color if one has been specified, or (0, 0, 0, 1) otherwise.
CombineMode getCombineMode (CombineChannel channel)
CombineOperand getCombineOperand (CombineChannel channel, int n)
CombineSource getCombineSource (CombineChannel channel, int n)
CompressionMode getCompressionMode ()
EnvType getEnvType ()
Format getFormat ()
FilterType getMagfilter ()
FilterType getMinfilter ()
int getMultitextureSort ()
 Returns an integer that represents the depth to which this texture is layered on all other textures in the egg file.
bool getMultiview ()
 Returns the current setting of the multiview flag.
int getNumViews ()
 Returns the specified number of views specified for the 3-D multiview texture.
int getPriority ()
 Returns the multitexture importance value that has been specified for the texture, or 0 if no priority value has been specified.
QualityLevel getQualityLevel ()
bool getReadMipmaps ()
 Returns the current setting of the read_mipmaps flag.
int getRgbScale ()
 Returns the rgb_scale value that has been specified for the texture, or 1 if no rgb_scale value has been specified.
bool getSavedResult ()
 Returns the current setting of the saved_result flag.
string getStageName ()
 Returns the stage name that has been specified for this texture, or the tref name if no texture stage has explicitly been specified.
TexGen getTexGen ()
TextureType getTextureType ()
string getUvName ()
 Returns the texcoord name that has been specified for this texture, or the empty string if no texcoord name has explicitly been specified.
WrapMode getWrapMode ()
WrapMode getWrapU ()
 Returns the amount specified for U wrap.
WrapMode getWrapV ()
 Returns the amount specified for V wrap.
WrapMode getWrapW ()
 Returns the amount specified for W wrap.
bool hasAlphaChannel (int num_components)
 Given the number of color components (channels) in the image file as actually read from the disk, return true if this texture seems to have an alpha channel or not.
bool hasAlphaFileChannel ()
 Returns true if a particular channel has been specified for the alpha-file image, false otherwise.
bool hasAlphaFilename ()
 Returns true if a separate file for the alpha component has been applied, false otherwise.
bool hasAlphaScale ()
 Returns true if an alpha_scale has been specified for the texture, false otherwise.
bool hasAnisotropicDegree ()
 Returns true if a value for the anisotropic filtering degree has been specified for this texture, false otherwise.
bool hasBorderColor ()
 Returns true if a border color has been specified for the texture.
bool hasColor ()
 Returns true if a blend color has been specified for the texture.
bool hasNumViews ()
 Returns true if the number of views has been specified for the 3-D multiview texture, false otherwise.
bool hasPriority ()
 Returns true if a priority value for multitexture importance has been specified for the texture, false otherwise.
bool hasRgbScale ()
 Returns true if an rgb_scale has been specified for the texture, false otherwise.
bool hasStageName ()
 Returns true if a stage name has been explicitly specified for this texture, false otherwise.
bool hasUvName ()
 Returns true if a texcoord name has been explicitly specified for this texture, false otherwise.
bool isEquivalentTo (EggTexture const other, int eq)
 Returns true if the two textures are equivalent in all relevant properties (according to eq), false otherwise.
bool multitextureOver (EggTexture other)
 Indicates that this texture should be layered on top of the other texture.
EggTexture operator= (EggTexture const copy)
 setAlphaFileChannel (int alpha_file_channel)
 If a separate alpha-file is specified, this indicates which channel number should be extracted from this file to derive the alpha channel for the final image.
 setAlphaFilename (Filename const filename)
 Specifies a separate file that will be loaded in with the 1- or 3-component texture and applied as the alpha channel.
 setAlphaFullpath (Filename const fullpath)
 Records the full pathname to the file, for the benefit of get_alpha_fullpath().
 setAlphaScale (int alpha_scale)
 Sets an additional factor that will scale the alpha component after the texture has been applied.
 setAnisotropicDegree (int anisotropic_degree)
 Sets the degree of anisotropic filtering for this texture.
 setBorderColor (VBase4 const border_color)
 setColor (VBase4 const color)
 setCombineMode (CombineChannel channel, CombineMode cm)
 setCombineOperand (CombineChannel channel, int n, CombineOperand co)
 setCombineSource (CombineChannel channel, int n, CombineSource cs)
 setCompressionMode (CompressionMode mode)
 setEnvType (EnvType type)
 setFormat (Format format)
 setMagfilter (FilterType type)
 setMinfilter (FilterType type)
 setMultiview (bool multiview)
 Sets the multiview flag.
 setNumViews (int num_views)
 When loading a 3-D multiview texture, this parameter is necessary to specify how many views will be expected.
 setPriority (int priority)
 Sets the importance of this texture with respect to other textures also applied on the same geometry.
 setQualityLevel (QualityLevel quality_level)
 setReadMipmaps (bool read_mipmaps)
 Sets the read_mipmaps flag.
 setRgbScale (int rgb_scale)
 Sets an additional factor that will scale all three r, g, b components after the texture has been applied.
 setSavedResult (bool saved_result)
 Sets the saved_result flag.
 setStageName (string stage_name)
 Specifies the particular TextureStage this texture will be rendered on by name.
 setTexGen (TexGen tex_gen)
 setTextureType (TextureType texture_type)
 setUvName (string uv_name)
 Specifies the named set of texture coordinates that this texture will use when it is applied to geometry.
 setWrapMode (WrapMode mode)
 setWrapU (WrapMode mode)
 setWrapV (WrapMode mode)
 setWrapW (WrapMode mode)
bool sortsLessThan (EggTexture const other, int eq)
 An ordering operator to compare two textures for sorting order.
 write (ostream out, int indent_level)
 Writes the texture definition to the indicated output stream in Egg format.

Static Public Member Functions

static TypeHandle getClassType ()
static CombineMode stringCombineMode (string string)
 Returns the CombineMode value associated with the given string representation, or CM_unspecified if the string does not match any known CombineMode value.
static CombineOperand stringCombineOperand (string string)
 Returns the CombineOperand value associated with the given string representation, or CO_unspecified if the string does not match any known CombineOperand value.
static CombineSource stringCombineSource (string string)
 Returns the CombineSource value associated with the given string representation, or CS_unspecified if the string does not match any known CombineSource value.
static CompressionMode stringCompressionMode (string string)
 Returns the CompressionMode value associated with the given string representation, or CM_default if the string does not match any known CompressionMode value.
static EnvType stringEnvType (string string)
 Returns the EnvType value associated with the given string representation, or ET_unspecified if the string does not match any known EnvType value.
static FilterType stringFilterType (string string)
 Returns the FilterType value associated with the given string representation, or FT_unspecified if the string does not match any known FilterType value.
static Format stringFormat (string string)
 Returns the Format value associated with the given string representation, or F_unspecified if the string does not match any known Format value.
static QualityLevel stringQualityLevel (string string)
 Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value.
static TexGen stringTexGen (string string)
 Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value.
static TextureType stringTextureType (string string)
 Returns the Texture_ype value associated with the given string representation, or TT_unspecified if the string does not match any known TextureType value.
static WrapMode stringWrapMode (string string)
 Returns the WrapMode value associated with the given string representation, or WM_unspecified if the string does not match any known WrapMode value.

Detailed Description

Defines a texture map that may be applied to geometry.


Member Enumeration Documentation

Enumerator:
CCRgb 
CCAlpha 
CCNumChannels 
Enumerator:
CINumIndices 
Enumerator:
CMUnspecified 
CMReplace 
CMModulate 
CMAdd 
CMAddSigned 
CMInterpolate 
CMSubtract 
CMDot3Rgb 
CMDot3Rgba 
Enumerator:
COUnspecified 
COSrcColor 
COOneMinusSrcColor 
COSrcAlpha 
COOneMinusSrcAlpha 
Enumerator:
CSUnspecified 
CSTexture 
CSConstant 
CSPrimaryColor 
CSPrevious 
CSConstantColorScale 
CSLastSavedResult 
Enumerator:
CMDefault 
CMOff 
CMOn 
CMFxt1 
CMDxt1 
CMDxt2 
CMDxt3 
CMDxt4 
CMDxt5 
enum EnvType
Enumerator:
ETUnspecified 
ETModulate 
ETDecal 
ETBlend 
ETReplace 
ETAdd 
ETBlendColorScale 
ETModulateGlow 
ETModulateGloss 
ETNormal 
ETNormalHeight 
ETGlow 
ETGloss 
ETHeight 
ETSelector 
ETNormalGloss 
Enumerator:
EBasename 
EExtension 
EDirname 
ECompleteFilename 
ETransform 
EAttributes 
ETrefName 
enum FilterType
Enumerator:
FTUnspecified 
FTNearest 
FTLinear 
FTNearestMipmapNearest 
FTLinearMipmapNearest 
FTNearestMipmapLinear 
FTLinearMipmapLinear 
enum Format
Enumerator:
FUnspecified 
FRgba 
FRgbm 
FRgba12 
FRgba8 
FRgba4 
FRgba5 
FRgb 
FRgb12 
FRgb8 
FRgb5 
FRgb332 
FRed 
FGreen 
FBlue 
FAlpha 
FLuminance 
FLuminanceAlpha 
FLuminanceAlphamask 
Enumerator:
QLUnspecified 
QLDefault 
QLFastest 
QLNormal 
QLBest 
enum TexGen
Enumerator:
TGUnspecified 
TGEyeSphereMap 
TGWorldCubeMap 
TGEyeCubeMap 
TGWorldNormal 
TGEyeNormal 
TGWorldPosition 
TGEyePosition 
TGPointSprite 
Enumerator:
TTUnspecified 
TT1dTexture 
TT2dTexture 
TT3dTexture 
TTCubeMap 
enum WrapMode
Enumerator:
WMUnspecified 
WMClamp 
WMRepeat 
WMMirror 
WMMirrorOnce 
WMBorderColor 

Constructor & Destructor Documentation

EggTexture ( EggTexture const  copy)
EggTexture ( string  tref_name,
Filename const  filename 
)

Member Function Documentation

Returns true if this texture's environment type or combine mode allows the texture to have an effect on the polygon's alpha values, false otherwise.

Removes the specification of a particular channel to use from the alpha-file image.

Removes the alpha_scale from the texture and restores it to the default value of 1.

Removes the specification of anisotropic filtering from the texture.

Resets the multitexture flags set by multitexture_over().

After this call, get_multitexture() will return false, and get_multitexture_sort() will return 0.

Removes the specification of the number of views for a 3-D multiview texture.

Removes the specification of multitexture priority from the texture.

The default priority value is 0.

Removes the rgb_scale from the texture and restores it to the default value of 1.

Removes the named TextureStage specification.

Removes the restriction to a particular named set of texture coordinates and restores the texture to using the default texture coordinates.

Determines the appropriate wrap in the U direction.

This is different from get_wrap_u() in that if the U wrap is unspecified, it returns the overall wrap value.

Determines the appropriate wrap in the V direction.

This is different from get_wrap_v() in that if the V wrap is unspecified, it returns the overall wrap value.

Determines the appropriate wrap in the W direction.

This is different from get_wrap_w() in that if the W wrap is unspecified, it returns the overall wrap value.

Returns the particular channel that has been specified for the alpha-file image, or 0 if no channel has been specified.

See set_alpha_file_channel().

Filename const getAlphaFilename ( )

Returns the separate file assigned for the alpha channel.

It is an error to call this unless has_alpha_filename() returns true. See set_alpha_filename().

Filename const getAlphaFullpath ( )

Returns the full pathname to the alpha file, if it is known; otherwise, returns the same thing as get_alpha_filename().

This function simply returns whatever was set by the last call to set_alpha_fullpath(). This string is not written to the egg file; its main purpose is to record the full path to the alpha filename if it is known, for egg structures that are generated in-memory and then immediately converted to a scene graph.

int getAlphaScale ( )

Returns the alpha_scale value that has been specified for the texture, or 1 if no alpha_scale value has been specified.

Returns the anisotropic filtering degree that has been specified for this texture, or 0 if nothing has been specified.

VBase4 const getBorderColor ( )

Returns the border color if one has been specified, or (0, 0, 0, 1) otherwise.

static TypeHandle getClassType ( ) [static]

Reimplemented from EggRenderMode.

VBase4 const getColor ( )

Returns the blend color if one has been specified, or (0, 0, 0, 1) otherwise.

CombineSource getCombineSource ( CombineChannel  channel,
int  n 
)

Returns an integer that represents the depth to which this texture is layered on all other textures in the egg file.

In general, if texture A is layered over texture B, then sort(A) > sort(B). If texture A is never layered over any other texture, then sort(A) == 0. More than that is difficult to guarantee.

bool getMultiview ( )

Returns the current setting of the multiview flag.

See set_multiview().

int getNumViews ( )

Returns the specified number of views specified for the 3-D multiview texture.

See set_num_views().

int getPriority ( )

Returns the multitexture importance value that has been specified for the texture, or 0 if no priority value has been specified.

bool getReadMipmaps ( )

Returns the current setting of the read_mipmaps flag.

See set_read_mipmaps().

int getRgbScale ( )

Returns the rgb_scale value that has been specified for the texture, or 1 if no rgb_scale value has been specified.

bool getSavedResult ( )

Returns the current setting of the saved_result flag.

See set_saved_result().

Returns the stage name that has been specified for this texture, or the tref name if no texture stage has explicitly been specified.

Returns the texcoord name that has been specified for this texture, or the empty string if no texcoord name has explicitly been specified.

Returns the amount specified for U wrap.

This may be unspecified, even if there is an overall wrap value.

Returns the amount specified for V wrap.

This may be unspecified, even if there is an overall wrap value.

Returns the amount specified for W wrap.

This may be unspecified, even if there is an overall wrap value.

bool hasAlphaChannel ( int  num_components)

Given the number of color components (channels) in the image file as actually read from the disk, return true if this texture seems to have an alpha channel or not.

This depends on the EggTexture's format as well as the number of channels.

Returns true if a particular channel has been specified for the alpha-file image, false otherwise.

bool hasAlphaFilename ( )

Returns true if a separate file for the alpha component has been applied, false otherwise.

See set_alpha_filename().

bool hasAlphaScale ( )

Returns true if an alpha_scale has been specified for the texture, false otherwise.

Returns true if a value for the anisotropic filtering degree has been specified for this texture, false otherwise.

bool hasBorderColor ( )

Returns true if a border color has been specified for the texture.

bool hasColor ( )

Returns true if a blend color has been specified for the texture.

bool hasNumViews ( )

Returns true if the number of views has been specified for the 3-D multiview texture, false otherwise.

bool hasPriority ( )

Returns true if a priority value for multitexture importance has been specified for the texture, false otherwise.

bool hasRgbScale ( )

Returns true if an rgb_scale has been specified for the texture, false otherwise.

bool hasStageName ( )

Returns true if a stage name has been explicitly specified for this texture, false otherwise.

bool hasUvName ( )

Returns true if a texcoord name has been explicitly specified for this texture, false otherwise.

bool isEquivalentTo ( EggTexture const  other,
int  eq 
)

Returns true if the two textures are equivalent in all relevant properties (according to eq), false otherwise.

The Equivalence parameter, eq, should be set to the bitwise OR of the following properties, according to what you consider relevant:

EggTexture::E_basename: The basename part of the texture filename, without the directory prefix *or* the filename extension.

EggTexture::E_extension: The extension part of the texture filename.

EggTexture::E_dirname: The directory prefix of the texture filename.

EggTexture::E_complete_filename: The union of the above three; that is, the complete filename, with directory, basename, and extension.

EggTexture::E_transform: The texture matrix.

EggTexture::E_attributes: All remaining texture attributes (mode, mipmap, etc.) except TRef name.

EggTexture::E_tref_name: The TRef name.

bool multitextureOver ( EggTexture  other)

Indicates that this texture should be layered on top of the other texture.

This will guarantee that this->get_multitexture_sort() > other->get_multitexture_sort(), at least until clear_multitexture() is called on either one.

The return value is true if successful, or false if there is a failure because the other texture was already layered on top of this one (or there is a three- or more-way cycle).

EggTexture operator= ( EggTexture const  copy)
setAlphaFileChannel ( int  alpha_file_channel)

If a separate alpha-file is specified, this indicates which channel number should be extracted from this file to derive the alpha channel for the final image.

The default is 0, which means the grayscale combination of r, g, b. Otherwise, this should be the 1-based channel number, for instance 1, 2, or 3 for r, g, or b, respectively, or 4 for the alpha channel of a four-component image.

setAlphaFilename ( Filename const  filename)

Specifies a separate file that will be loaded in with the 1- or 3-component texture and applied as the alpha channel.

This is useful when loading textures from file formats that do not support alpha, for instance jpg.

setAlphaFullpath ( Filename const  fullpath)

Records the full pathname to the file, for the benefit of get_alpha_fullpath().

setAlphaScale ( int  alpha_scale)

Sets an additional factor that will scale the alpha component after the texture has been applied.

This is used only when a combine mode is in effect.

The only legal values are 1, 2, or 4.

setAnisotropicDegree ( int  anisotropic_degree)

Sets the degree of anisotropic filtering for this texture.

1 is off; higher levels indicate filtering in effect.

setBorderColor ( VBase4 const  border_color)
setColor ( VBase4 const  color)
setCombineMode ( CombineChannel  channel,
CombineMode  cm 
)
setCombineOperand ( CombineChannel  channel,
int  n,
CombineOperand  co 
)
setCombineSource ( CombineChannel  channel,
int  n,
CombineSource  cs 
)
setEnvType ( EnvType  type)
setFormat ( Format  format)
setMultiview ( bool  multiview)

Sets the multiview flag.

If multiview is true, the filename should contain a hash mark ('#'), which will be filled in with the view number; and a multiview texture will be defined with a series of images, one for each view.

A multiview texture is most often used for stereo textures, but other uses are also possible, such as for texture animation.

setNumViews ( int  num_views)

When loading a 3-D multiview texture, this parameter is necessary to specify how many views will be expected.

The z size is determined implicitly from the number of images loaded.

setPriority ( int  priority)

Sets the importance of this texture with respect to other textures also applied on the same geometry.

This is only meaningful in the presence of multitexturing.

setQualityLevel ( QualityLevel  quality_level)
setReadMipmaps ( bool  read_mipmaps)

Sets the read_mipmaps flag.

If read_mipmaps is true, the filename should contain a hash mark ('#'), which will be filled in with the mipmap level number; and the texture will be defined with a series of images, one for each mipmap level.

If the filename is of a type that already requires a hash mark, such as a cube map or a 3-d texture, then the filename should now require two hash marks, and the first one indicates the mipmap level number, while the second indicates the face number or 3-d level number.

setRgbScale ( int  rgb_scale)

Sets an additional factor that will scale all three r, g, b components after the texture has been applied.

This is used only when a combine mode is in effect.

The only legal values are 1, 2, or 4.

setSavedResult ( bool  saved_result)

Sets the saved_result flag.

When this is true, the output of this stage is not part of the normal pipeline--that is, it will not be supplied as the "previous" source for the next texture stage--but it will instead be supplied as the "last_saved_result" source for any future stages, until the next TextureStage with a saved_result set true is encountered.

This can be used to reuse the results of this texture stage as input to more than one stage later in the pipeline.

The last texture in the pipeline (the one with the highest sort value) should not have this flag set.

setStageName ( string  stage_name)

Specifies the particular TextureStage this texture will be rendered on by name.

If this is omitted, the texture will be rendered on the default TextureStage, unless some other stage-specific property is specificied, in which case the texture will be rendered on a TextureStage with the same name as the tref. This is in support of multitexturing.

Each different TextureStage in the world must be uniquely named.

setTexGen ( TexGen  tex_gen)
setTextureType ( TextureType  texture_type)
setUvName ( string  uv_name)

Specifies the named set of texture coordinates that this texture will use when it is applied to geometry.

Geometry may have multiple sets of texture coordinates defined, by name.

If this is not specified for a particular texture, the default set of texture coordinates will be used.

setWrapMode ( WrapMode  mode)
setWrapU ( WrapMode  mode)
setWrapV ( WrapMode  mode)
setWrapW ( WrapMode  mode)
bool sortsLessThan ( EggTexture const  other,
int  eq 
)

An ordering operator to compare two textures for sorting order.

This imposes an arbitrary ordering useful to identify unique textures, according to the indicated Equivalence factor. See is_equivalent_to().

static CombineMode stringCombineMode ( string  string) [static]

Returns the CombineMode value associated with the given string representation, or CM_unspecified if the string does not match any known CombineMode value.

static CombineOperand stringCombineOperand ( string  string) [static]

Returns the CombineOperand value associated with the given string representation, or CO_unspecified if the string does not match any known CombineOperand value.

static CombineSource stringCombineSource ( string  string) [static]

Returns the CombineSource value associated with the given string representation, or CS_unspecified if the string does not match any known CombineSource value.

static CompressionMode stringCompressionMode ( string  string) [static]

Returns the CompressionMode value associated with the given string representation, or CM_default if the string does not match any known CompressionMode value.

static EnvType stringEnvType ( string  string) [static]

Returns the EnvType value associated with the given string representation, or ET_unspecified if the string does not match any known EnvType value.

static FilterType stringFilterType ( string  string) [static]

Returns the FilterType value associated with the given string representation, or FT_unspecified if the string does not match any known FilterType value.

static Format stringFormat ( string  string) [static]

Returns the Format value associated with the given string representation, or F_unspecified if the string does not match any known Format value.

static QualityLevel stringQualityLevel ( string  string) [static]

Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value.

static TexGen stringTexGen ( string  string) [static]

Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value.

static TextureType stringTextureType ( string  string) [static]

Returns the Texture_ype value associated with the given string representation, or TT_unspecified if the string does not match any known TextureType value.

static WrapMode stringWrapMode ( string  string) [static]

Returns the WrapMode value associated with the given string representation, or WM_unspecified if the string does not match any known WrapMode value.

write ( ostream  out,
int  indent_level 
)

Writes the texture definition to the indicated output stream in Egg format.

Reimplemented from EggRenderMode.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties