Name
cgSetSemanticCasePolicy - set semantic case policy
Synopsis
#include <Cg/cg.h> CGenum cgSetSemanticCasePolicy( CGenum casePolicy );Parameters
- casePolicy
- An enumerant describing the desired semantic case policy for the library. The following enumerants are allowed:
- CG_FORCE_UPPER_CASE_POLICY
- Semantics strings will be converted to all upper-case letters. This is the default policy.
- CG_UNCHANGED_CASE_POLICY
- Semantic strings will be left unchanged.
Return Values
Returns the previous semantic case policy, or CG_UNKNOWN if an error occurs.
Description
cgSetSemanticCasePolicy allows an application to change the semantic case policy used by the Cg library. A policy of CG_FORCE_UPPER_CASE_POLICY means that semantic strings returned by cgGetParameterSemantic will have been converted to all upper-case letters. This is the default policy for the library. If the policy is changed to CG_UNCHANGED_CASE_POLICY no case coversion will be done to the semantic strings.
Examples
/* set to return original semantic strings */ cgSetSemanticCasePolicy(CG_UNCHANGED_CASE_POLICY);Errors
CG_INVALID_ENUMERANT_ERROR is generated if casePolicy is not CG_FORCE_UPPER_CASE_POLICY or CG_UNCHANGED_CASE_POLICY.
History
cgSetSemanticCasePolicy was introduced in Cg 2.0.
See Also
cgGetSemanticCasePolicy, cgGetParameterSemantic, cgSetParameterSemantic