Panda3D
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ShaderInput Class Reference

This is a small container class that can hold any one of the value types that can be passed as input to a shader. More...

Public Types

enum  AccessFlags { A_read = 1, A_write = 2, A_layered = 4 }
 
enum  ShaderInputType {
  M_invalid = 0, M_texture = 1, M_nodepath = 2, M_vector = 3,
  M_numeric = 4, M_texture_sampler = 5, M_param = 6, M_texture_image = 7,
  M_buffer = 8
}
 

Public Member Functions

 __init__ (const InternalName name, object value, int priority)
 
 __init__ (const InternalName name, Texture tex, const SamplerState sampler, int priority)
 
 __init__ (const InternalName name, Texture tex, bool read, bool write, int z, int n, int priority)
 
 __init__ (const InternalName name, int priority)
 
 __init__ (const ShaderInput)
 
int addHash (int hash)
 
const InternalName getName ()
 
const NodePath getNodepath ()
 Warning: no error checking is done. More...
 
int getPriority ()
 
const Shader::ShaderPtrData getPtr ()
 
const SamplerState getSampler ()
 Warning: no error checking is done. More...
 
Texture getTexture ()
 
int getValueType ()
 
const LVecBase4 getVector ()
 
bool operator != (const ShaderInput other)
 
bool operator< (const ShaderInput other)
 
bool operator== (const ShaderInput other)
 

Static Public Member Functions

static const ShaderInput getBlank ()
 Returns a static ShaderInput object with name NULL, priority zero, type INVALID, and all value-fields cleared. More...
 

Detailed Description

This is a small container class that can hold any one of the value types that can be passed as input to a shader.

Member Enumeration Documentation

◆ AccessFlags

Enumerator
A_read 
A_write 
A_layered 

◆ ShaderInputType

Enumerator
M_invalid 
M_texture 
M_nodepath 
M_vector 
M_numeric 
M_texture_sampler 
M_param 
M_texture_image 
M_buffer 

Member Function Documentation

◆ __init__() [1/5]

__init__ ( const InternalName  name,
object  value,
int  priority 
)

◆ __init__() [2/5]

__init__ ( const InternalName  name,
Texture  tex,
const SamplerState  sampler,
int  priority 
)

◆ __init__() [3/5]

__init__ ( const InternalName  name,
Texture  tex,
bool  read,
bool  write,
int  z,
int  n,
int  priority 
)

◆ __init__() [4/5]

__init__ ( const InternalName  name,
int  priority 
)

◆ __init__() [5/5]

__init__ ( const  ShaderInput)

◆ addHash()

int addHash ( int  hash)

◆ getBlank()

static const ShaderInput getBlank ( )
static

Returns a static ShaderInput object with name NULL, priority zero, type INVALID, and all value-fields cleared.

◆ getName()

const InternalName getName ( )

◆ getNodepath()

const NodePath getNodepath ( )

Warning: no error checking is done.

This will crash if get_value_type() is not M_nodepath.

◆ getPriority()

int getPriority ( )

◆ getPtr()

const Shader::ShaderPtrData getPtr ( )

◆ getSampler()

const SamplerState getSampler ( )

Warning: no error checking is done.

◆ getTexture()

Texture getTexture ( )

◆ getValueType()

int getValueType ( )

◆ getVector()

const LVecBase4 getVector ( )

◆ operator !=()

bool operator != ( const ShaderInput  other)

◆ operator<()

bool operator< ( const ShaderInput  other)

◆ operator==()

bool operator== ( const ShaderInput  other)