当前位置: 首页>>代码示例>>C#>>正文


C# Graphics.CgParameter类代码示例

本文整理汇总了C#中OpenCg.Graphics.CgParameter的典型用法代码示例。如果您正苦于以下问题:C# CgParameter类的具体用法?C# CgParameter怎么用?C# CgParameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CgParameter类属于OpenCg.Graphics命名空间,在下文中一共展示了CgParameter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateParameterAnnotation

 /// <summary>
 /// <para>cgCreateParameterAnnotation adds a new annotation to the specified param.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_DUPLICATE_NAME_ERROR is generated if name is already used by an annotation for this param. CG_INVALID_ENUMERANT_ERROR is generated if type is not CG_INT, CG_FLOAT, CG_BOOL, or CG_STRING.</para>
 /// <para>VERSION: cgCreateParameterAnnotation was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="parm">The param to which the new annotation will be added.</param>
 /// <param name="name">The name of the new annotation.</param>
 /// <param name="type">The type of the new annotation.</param>
 /// <returns>Returns the new CGannotation handle on success. Returns NULL if an error occurs.</returns>
 public static CgAnnotation CreateParameterAnnotation(CgParameter param, [In]string name, CgType type)
 {
     return cgCreateParameterAnnotation(param, name, type);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:13,代码来源:Cg.cs

示例2: GetConnectedParameter

 /// <summary>
 /// <para>Returns the source param to which param is connected.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param.</para>
 /// <para>VERSION: cgGetConnectedParameter was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="param">The destination param.</param>
 /// <returns>Returns the connected source param if param is connected to one. Returns NULL otherwise.</returns>
 public static CgParameter GetConnectedParameter(CgParameter param)
 {
     return cgGetConnectedParameter(param);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:11,代码来源:Cg.cs

示例3: GetArrayTotalSize

 /// <summary>
 /// <para>cgGetArrayTotalSize returns the total number of elements of the array specified by param.</para>
 /// <para>The total number of elements is equal to the product of the size of each dimension of the array.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param.</para>
 /// <para>VERSION: cgGetArrayTotalSize was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="param">The array param handle.</param>
 /// <returns>Returns the total size of param if pararm is an array. Returns 0 if param is not an array, or if an error occurs.</returns>
 public static int GetArrayTotalSize(CgParameter param)
 {
     return cgGetArrayTotalSize(param);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:12,代码来源:Cg.cs

示例4: GetArrayParameter

 /// <summary>
 /// <para>cgGetArrayParameter returns the param of array param specified by index.</para>
 /// <para>cgGetArrayParameter is used when inspecting elements of an array param in a program.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_ARRAY_PARAM_ERROR is generated if param is not an array param. CG_OUT_OF_ARRAY_BOUNDS_ERROR is generated if index is outside the bounds of param.</para>
 /// <para>VERSION: cgGetArrayParameter was introduced in Cg 1.1.</para>
 /// </summary>
 /// <param name="param">The array param handle.</param>
 /// <param name="index">The index into the array.</param>
 /// <returns>Returns the param at the specified index of param if param references an array, and the index is valid. Returns NULL otherwise.</returns>
 public static CgParameter GetArrayParameter(CgParameter param, int index)
 {
     return cgGetArrayParameter(param, index);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:13,代码来源:Cg.cs

示例5: DisconnectParameter

 /// <summary>
 /// <para>cgDisconnectParameter disconnects an existing connection made with cgConnectParameter between two parameters.</para>
 /// <para>Since a given param can only be connected to one source param, only the destination param is required as an argument to cgDisconnectParameter.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param.</para>
 /// <para>VERSION: cgDisconnectParameter was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="param">The destination param in the connection that will be disconnected.</param>
 public static void DisconnectParameter(CgParameter param)
 {
     cgDisconnectParameter(param);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:11,代码来源:Cg.cs

示例6: CreateSamplerStateAssignment

 /// <summary>
 /// <para>cgCreateSamplerStateAssignment creates a new state assignment for the given state and sampler param.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_INVALID_STATE_HANDLE_ERROR is generated if state is not a valid state.</para>
 /// <para>VERSION: cgCreateSamplerStateAssignment was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="param">The sampler param to which the new state assignment will be associated.</param>
 /// <param name="state">The state for which to create the new state assignment.</param>
 /// <returns>Returns the handle to the created sampler state assignment.</returns>
 public static CgStateAssignment CreateSamplerStateAssignment(CgParameter param, CgState state)
 {
     return cgCreateSamplerStateAssignment(param, state);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:12,代码来源:Cg.cs

示例7: SetParameter4i

 /// <summary>
 /// <para>cgSetParameter4i sets the value of a given scalar or vector param.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_INVALID_PARAMETER_ERROR is generated if param is a varying input to a fragment program.</para>
 /// <para>VERSION: cgSetParameter4i was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="param">The param that will be set.</param>
 /// <param name="x, y, z, w">The values used to set param.</param>
 public static void SetParameter4i(CgParameter param, int x, int y, int z, int w)
 {
     cgSetParameter4i(param, x, y, z, w);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:11,代码来源:Cg.cs

示例8: SetParameter4fv

 /// <summary>
 /// <para>cgSetParameter4fv sets the value of a given scalar or vector param.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_INVALID_PARAMETER_ERROR is generated if param is a varying input to a fragment program.</para>
 /// <para>VERSION: cgSetParameter4fv was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="param">The param that will be set.</param>
 /// <param name="v">Array of values to use to set param.</param>
 public static void SetParameter4fv(CgParameter param, float[] v)
 {
     cgSetParameter4fv(param, v);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:11,代码来源:Cg.cs

示例9: SetParameter4f

 /// <summary>
 /// <para>cgSetParameter4f sets the value of a given scalar or vector param.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_INVALID_PARAMETER_ERROR is generated if param is a varying input to a fragment program.</para>
 /// <para>VERSION: cgSetParameter4f was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="param">The param that will be set.</param>
 /// <param name="x, y, z, w">The values used to set param.</param>
 public static void SetParameter4f(CgParameter param, float x, float y, float z, float w)
 {
     cgSetParameter4f(param, x, y, z, w);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:11,代码来源:Cg.cs

示例10: SetParameter4dv

 /// <summary>
 /// <para>cgSetParameter4dv sets the value of a given scalar or vector param.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_INVALID_PARAMETER_ERROR is generated if param is a varying input to a fragment program.</para>
 /// <para>VERSION: cgSetParameter4dv was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="param">The param that will be set.</param>
 /// <param name="v">Array of values to use to set param.</param>
 public static void SetParameter4dv(CgParameter param, double[] v)
 {
     cgSetParameter4dv(param, v);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:11,代码来源:Cg.cs

示例11: SetParameter4d

 /// <summary>
 /// <para>cgSetParameter4d sets the value of a given scalar or vector param.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_INVALID_PARAMETER_ERROR is generated if param is a varying input to a fragment program.</para>
 /// <para>VERSION: cgSetParameter4d was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="param">The param that will be set.</param>
 /// <param name="x, y, z, w">The values used to set param.</param>
 public static void SetParameter4d(CgParameter param, double x, double y, double z, double w)
 {
     cgSetParameter4d(param, x, y, z, w);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:11,代码来源:Cg.cs

示例12: SetParameter3i

 /// <summary>
 /// <para>cgSetParameter3i sets the value of a given scalar or vector param.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_INVALID_PARAMETER_ERROR is generated if param is a varying input to a fragment program.</para>
 /// <para>VERSION: cgSetParameter3i was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="param">The param that will be set.</param>
 /// <param name="x, y, z">The values used to set param.</param>
 public static void SetParameter3i(CgParameter param, int x, int y, int z)
 {
     cgSetParameter3i(param, x, y, z);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:11,代码来源:Cg.cs

示例13: SetParameter3f

 /// <summary>
 /// <para>cgSetParameter3f sets the value of a given scalar or vector param.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_INVALID_PARAMETER_ERROR is generated if param is a varying input to a fragment program.</para>
 /// <para>VERSION: cgSetParameter3f was introduced in Cg 1.2.</para>
 /// </summary>
 /// <param name="param">The param that will be set.</param>
 /// <param name="x, y, z">The values used to set param.</param>
 public static void SetParameter3f(CgParameter param, float x, float y, float z)
 {
     cgSetParameter3f(param, x, y, z);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:11,代码来源:Cg.cs

示例14: SetStringParameterValue

 /// <summary>
 /// <para>cgSetStringParameterValue allows the application to  set the value of a string param.</para>
 /// <para>ERROR: CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param. CG_INVALID_PARAMETER_TYPE_ERROR is generated if param is not string-typed. CG_INVALID_PARAMETER_ERROR is generated if value is NULL.</para>
 /// <para>VERSION: cgSetStringParameterValue was introduced in Cg 1.4.</para>
 /// </summary>
 /// <param name="param">The param whose value will be set.</param>
 /// <param name="value">The string to set the param's value as.</param>
 public static void SetStringParameterValue(CgParameter param, string value)
 {
     cgSetStringParameterValue(param, value);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:11,代码来源:Cg.cs

示例15: SetTextureStateAssignment

 /// <summary>
 /// <para>cgSetTextureStateAssignment sets the value of a state assignment of texture type to an effect param of type CG_TEXTURE.</para>
 /// <para>ERROR: CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR is generated if sa is not a valid state assignment. CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR is generated if sa is not a state assignment of texture type. CG_ARRAY_SIZE_MISMATCH_ERROR is generated if sa is an array and not a scalar. CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid param.</para>
 /// <para>VERSION: cgSetTextureStateAssignment was introduced in Cg 1.5.</para>
 /// </summary>
 /// <param name="sa">A state assignment of type CG_TEXTURE.</param>
 /// <param name="param">An effect param of type CG_TEXTURE.</param>
 /// <returns>Returns CG_TRUE if it succeeds in setting the state assignment. Returns CG_FALSE otherwise.</returns>
 public static CgBool SetTextureStateAssignment(CgStateAssignment sa, CgParameter param)
 {
     return cgSetTextureStateAssignment(sa, param);
 }
开发者ID:primuszp,项目名称:OpenCg,代码行数:12,代码来源:Cg.cs


注:本文中的OpenCg.Graphics.CgParameter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。