|
|
|
|
List of all members.
Public Types |
| enum | AutoShaderBit {
bitAutoShaderNormal = 0,
bitAutoShaderGlow = 1,
bitAutoShaderGloss = 2,
bitAutoShaderRamp = 3,
bitAutoShaderShadow = 4
} |
| enum | AutoShaderSwitch {
ASNormal = 1,
ASGlow = 2,
ASGloss = 4,
ASRamp = 8,
ASShadow = 16
} |
| enum | ShaderLanguage { SLNone = 0,
SLCg = 1,
SLGLSL = 2
} |
| enum | ShaderType {
STNone = 0,
STVertex = 1,
STFragment = 2,
STGeometry = 3,
STTessControl = 4,
STTessEvaluation = 5
} |
Public Member Functions |
| bool | getErrorFlag () |
| | Returns true if the shader contains a compile-time error.
|
| Filename const | getFilename (ShaderType type) |
| | Return the Shader's filename for the given shader type.
|
| Filename const | getFilename () |
| | Return the Shader's filename for the given shader type.
|
| ShaderLanguage | getLanguage () |
| | Returns the shader language in which this shader was written.
|
| string | getText (ShaderType type) |
| | Return the Shader's text for the given shader type.
|
| string | getText () |
| | Return the Shader's text for the given shader type.
|
| bool | isPrepared (PreparedGraphicsObjects prepared_objects) |
| | Returns true if the shader has already been prepared or enqueued for preparation on the indicated GSG, false otherwise.
|
| | prepare (PreparedGraphicsObjects prepared_objects) |
| | Indicates that the shader should be enqueued to be prepared in the indicated prepared_objects at the beginning of the next frame.
|
| ShaderContext | prepareNow (PreparedGraphicsObjects prepared_objects, GraphicsStateGuardianBase gsg) |
| | Creates a context for the shader on the particular GSG, if it does not already exist.
|
| bool | release (PreparedGraphicsObjects prepared_objects) |
| | Frees the texture context only on the indicated object, if it exists there.
|
| int | releaseAll () |
| | Frees the context allocated on all objects for which the texture has been declared.
|
Static Public Member Functions |
| static TypeHandle | getClassType () |
| static ShaderUtilization | getShaderUtilization () |
| | This flag returns SUT_none, SUT_basic, or SUT_advanced and controls the automatic generation of shaders.
|
| static bool | haveShaderUtilization () |
| | If true, then get_shader_utilization has been set using set_shader_utilization.
|
| static Shader | load (Filename const file, ShaderLanguage lang) |
| | Loads the shader with the given filename.
|
| static Shader | load (Filename const file) |
| | Loads the shader with the given filename.
|
| static Shader | load (ShaderLanguage lang, Filename const vertex, Filename const fragment, Filename const geometry, Filename const tess_control, Filename const tess_evaluation) |
| | This variant of Shader::load loads all shader programs separately.
|
| static Shader | load (ShaderLanguage lang, Filename const vertex, Filename const fragment, Filename const geometry, Filename const tess_control) |
| | This variant of Shader::load loads all shader programs separately.
|
| static Shader | load (ShaderLanguage lang, Filename const vertex, Filename const fragment, Filename const geometry) |
| | This variant of Shader::load loads all shader programs separately.
|
| static Shader | load (ShaderLanguage lang, Filename const vertex, Filename const fragment) |
| | This variant of Shader::load loads all shader programs separately.
|
| static Shader | make (ShaderLanguage lang, string vertex, string fragment, string geometry, string tess_control, string tess_evaluation) |
| | Loads the shader, using the strings as shader bodies.
|
| static Shader | make (ShaderLanguage lang, string vertex, string fragment, string geometry, string tess_control) |
| | Loads the shader, using the strings as shader bodies.
|
| static Shader | make (ShaderLanguage lang, string vertex, string fragment, string geometry) |
| | Loads the shader, using the strings as shader bodies.
|
| static Shader | make (ShaderLanguage lang, string vertex, string fragment) |
| | Loads the shader, using the strings as shader bodies.
|
| static Shader | make (string body, ShaderLanguage lang) |
| | Loads the shader, using the string as shader body.
|
| static Shader | make (string body) |
| | Loads the shader, using the string as shader body.
|
| static | setShaderUtilization (ShaderUtilization utl) |
| | Set this flag to SUT_none, SUT_basic, or SUT_advanced to limit panda's automatic shader generation facilities.
|
Member Enumeration Documentation
- Enumerator:
| bitAutoShaderNormal |
|
| bitAutoShaderGlow |
|
| bitAutoShaderGloss |
|
| bitAutoShaderRamp |
|
| bitAutoShaderShadow |
|
- Enumerator:
| ASNormal |
|
| ASGlow |
|
| ASGloss |
|
| ASRamp |
|
| ASShadow |
|
- Enumerator:
| STNone |
|
| STVertex |
|
| STFragment |
|
| STGeometry |
|
| STTessControl |
|
| STTessEvaluation |
|
Member Function Documentation
Returns true if the shader contains a compile-time error.
This doesn't tell you whether or not the shader is supported on the current video card.
Return the Shader's filename for the given shader type.
Return the Shader's filename for the given shader type.
Returns the shader language in which this shader was written.
This flag returns SUT_none, SUT_basic, or SUT_advanced and controls the automatic generation of shaders.
It is initialized from the config variable of the same name, but it can be subsequently adjusted.
Return the Shader's text for the given shader type.
Return the Shader's text for the given shader type.
If true, then get_shader_utilization has been set using set_shader_utilization.
If false, then get_shader_utilization simply returns the config variable of the same name.
Returns true if the shader has already been prepared or enqueued for preparation on the indicated GSG, false otherwise.
Loads the shader with the given filename.
Loads the shader with the given filename.
This variant of Shader::load loads all shader programs separately.
This variant of Shader::load loads all shader programs separately.
This variant of Shader::load loads all shader programs separately.
This variant of Shader::load loads all shader programs separately.
| static Shader make |
( |
ShaderLanguage |
lang, |
|
|
string |
vertex, |
|
|
string |
fragment, |
|
|
string |
geometry, |
|
|
string |
tess_control, |
|
|
string |
tess_evaluation |
|
) |
| [static] |
Loads the shader, using the strings as shader bodies.
| static Shader make |
( |
ShaderLanguage |
lang, |
|
|
string |
vertex, |
|
|
string |
fragment, |
|
|
string |
geometry, |
|
|
string |
tess_control |
|
) |
| [static] |
Loads the shader, using the strings as shader bodies.
Loads the shader, using the strings as shader bodies.
Loads the shader, using the strings as shader bodies.
Loads the shader, using the string as shader body.
Loads the shader, using the string as shader body.
Indicates that the shader 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.
Use this function instead of prepare_now() to preload textures from a user interface standpoint.
Creates a context for the shader on the particular GSG, if it does not already exist.
Returns the new (or old) ShaderContext. 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.
Normally, this is not called directly except by the GraphicsStateGuardian; a shader does not need to be explicitly prepared by the user before it may be rendered.
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.
Frees the context allocated on all objects for which the texture has been declared.
Returns the number of contexts which have been freed.
Set this flag to SUT_none, SUT_basic, or SUT_advanced to limit panda's automatic shader generation facilities.
| | |