Panda3D
Public Types | Public Member Functions | Public Attributes | List of all members
LoaderOptions Class Reference

Specifies parameters that may be passed to the loader. More...

Public Types

enum  LoaderFlags {
  LF_search = 1, LF_report_errors = 2, LF_convert_skeleton = 4, LF_convert_channels = 8,
  LF_convert_anim = 12, LF_no_disk_cache = 16, LF_no_ram_cache = 32, LF_no_cache = 48,
  LF_cache_only = 64, LF_allow_instance = 128
}
 
enum  TextureFlags {
  TF_preload = 4, TF_preload_simple = 8, TF_allow_1d = 16, TF_generate_mipmaps = 32,
  TF_multiview = 64, TF_integer = 128, TF_float = 256, TF_allow_compression = 512
}
 

Public Member Functions

 __init__ (const LoaderOptions)
 
 __init__ (int flags)
 
 __init__ (int flags, int texture_flags)
 
AutoTextureScale getAutoTextureScale ()
 See set_auto_texture_scale(). More...
 
int getFlags ()
 
int getTextureFlags ()
 
int getTextureNumViews ()
 See set_texture_num_views(). More...
 
 output (Ostream out)
 
 setAutoTextureScale (AutoTextureScale scale)
 Set this flag to ATS_none, ATS_up, ATS_down, or ATS_pad to control how a texture is scaled from disk when it is subsequently loaded. More...
 
 setFlags (int flags)
 
 setTextureFlags (int flags)
 
 setTextureNumViews (int num_views)
 Specifies the expected number of views to load for the texture. More...
 

Public Attributes

AutoTextureScale auto_texture_scale
 See set_auto_texture_scale(). More...
 
int flags
 
int texture_flags
 
int texture_num_views
 See set_texture_num_views(). More...
 

Detailed Description

Specifies parameters that may be passed to the loader.

Member Enumeration Documentation

◆ LoaderFlags

Enumerator
LF_search 
LF_report_errors 
LF_convert_skeleton 
LF_convert_channels 
LF_convert_anim 

skeleton + channels

LF_no_disk_cache 

disallow BamCache

LF_no_ram_cache 

disallow ModelPool

LF_no_cache 

no_disk + no_ram

LF_cache_only 

fail if not in cache

LF_allow_instance 

returned pointer might be shared

◆ TextureFlags

Enumerator
TF_preload 

Texture will have RAM image.

TF_preload_simple 

Texture will have simple RAM image.

TF_allow_1d 

If texture is Nx1, make a 1-d texture.

TF_generate_mipmaps 

Consider generating mipmaps.

TF_multiview 

Load a multiview texture in pages.

TF_integer 

Load as an integer (RGB) texture.

TF_float 

Load as a floating-point (depth) texture.

TF_allow_compression 

Consider compressing RAM image.

Member Function Documentation

◆ __init__() [1/3]

__init__ ( const  LoaderOptions)

◆ __init__() [2/3]

__init__ ( int  flags)

◆ __init__() [3/3]

__init__ ( int  flags,
int  texture_flags 
)

◆ getAutoTextureScale()

AutoTextureScale getAutoTextureScale ( )

See set_auto_texture_scale().

◆ getFlags()

int getFlags ( )

◆ getTextureFlags()

int getTextureFlags ( )

◆ getTextureNumViews()

int getTextureNumViews ( )

See set_texture_num_views().

◆ output()

output ( Ostream  out)

◆ setAutoTextureScale()

setAutoTextureScale ( AutoTextureScale  scale)

Set this flag to ATS_none, ATS_up, ATS_down, or ATS_pad to control how a texture is scaled from disk when it is subsequently loaded.

Set it to ATS_unspecified to restore the default behavior.

◆ setFlags()

setFlags ( int  flags)

◆ setTextureFlags()

setTextureFlags ( int  flags)

◆ setTextureNumViews()

setTextureNumViews ( int  num_views)

Specifies the expected number of views to load for the texture.

This is ignored unless TF_multiview is included in texture_flags. This must be specified when loading a 3-d multiview texture or 2-d texture array, in which case it is used to differentiate z levels from separate views; it may be zero in the case of 2-d textures or cube maps, in which case the number of views can be inferred from the number of images found on disk.

Member Data Documentation

◆ auto_texture_scale

AutoTextureScale auto_texture_scale

See set_auto_texture_scale().

◆ flags

int flags

◆ texture_flags

int texture_flags

◆ texture_num_views

int texture_num_views

See set_texture_num_views().