本文整理汇总了C#中Material.GetInt方法的典型用法代码示例。如果您正苦于以下问题:C# Material.GetInt方法的具体用法?C# Material.GetInt怎么用?C# Material.GetInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Material
的用法示例。
在下文中一共展示了Material.GetInt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyMaterial
public override void ApplyMaterial(Material material)
{
base.ApplyMaterial(material);
this.SetUniform(MATERIAL_AMBIENTCOLOR, material.GetVector4f(Material.COLOR_AMBIENT));
this.SetUniform(MATERIAL_DIFFUSECOLOR, material.GetVector4f(Material.COLOR_DIFFUSE));
this.SetUniform(MATERIAL_SPECULARCOLOR, material.GetVector4f(Material.COLOR_SPECULAR));
this.SetUniform(MATERIAL_SHININESS, material.GetFloat(Material.SHININESS));
this.SetUniform(MATERIAL_ROUGHNESS, material.GetFloat(Material.ROUGHNESS));
this.SetUniform(MATERIAL_METALNESS, material.GetFloat(Material.METALNESS));
this.SetUniform(MATERIAL_SPECULARTECHNIQUE, material.GetInt(Material.TECHNIQUE_SPECULAR));
this.SetUniform(MATERIAL_SPECULAREXPONENT, material.GetFloat(Material.SPECULAR_EXPONENT));
this.SetUniform(MATERIAL_PERPIXELLIGHTING, material.GetInt(Material.TECHNIQUE_PER_PIXEL_LIGHTING));
RenderManager.Renderer.SetBlend(true);
RenderManager.Renderer.SetBlendMode(Renderer.BlendMode.AlphaBlend);
}
示例2: ApplyMaterial
public override void ApplyMaterial(Material material)
{
base.ApplyMaterial(material);
this.SetUniform(MATERIAL_DIFFUSECOLOR, material.GetVector4f(Material.COLOR_DIFFUSE));
int blendMode = material.GetInt(Material.MATERIAL_BLENDMODE);
if (blendMode == 1)
{
RenderManager.Renderer.SetBlend(true);
RenderManager.Renderer.SetBlendMode(Renderer.BlendMode.AlphaBlend);
}
}