/// <summary> /// <para>cgGetBehaviorString returns the behavior name associated with a given behavior enumerant.</para> /// <para>ERROR: None.</para> /// <para>VERSION: cgGetBehaviorString was introduced in Cg 3.0.</para> /// </summary> /// <param name="behavior">The behavior enumerant.</param> /// <returns>Returns the behavior string associated with behavior. Returns NULL if behavior is not a valid CGbehavior.</returns> public static string GetBehaviorString(CgBehavior behavior) { return Marshal.PtrToStringAnsi(cgGetBehaviorString(behavior)); }
private static extern IntPtr cgGetBehaviorString(CgBehavior behavior);
/// <summary> /// <para>Each new version of Cg is supposed to be completely backwards compatible with previous versions, providing bug fixes and/or new capabilities while maintaining the behavior which applications were written against.</para> /// <para>The intent is to allow Cg to be updated and have existing applications continue to work exactly as designed.</para> /// <para>ERROR: CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid context. CG_INVALID_ENUMERANT_ERROR is generated if behavior is not CG_BEHAVIOR_3000, CG_BEHAVIOR_2200, CG_BEHAVIOR_CURRENT, or CG_BEHAVIOR_LATEST.</para> /// <para>VERSION: cgSetContextBehavior was introduced in Cg 3.0.</para> /// </summary> /// <param name="context">The context for which the behavior will be set.</param> /// <param name="behavior">An enumerant which defines the behavior that will be exhibited by context. The following enumerants are allowed:</param> public static void SetContextBehavior(CgContext context, CgBehavior behavior) { cgSetContextBehavior(context, behavior); }
private static extern void cgSetContextBehavior(CgContext context, CgBehavior behavior);