共用方式為


PixelShader Constructor

Initializes a new instance of the PixelShader class.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public PixelShader (
         GraphicsDevice graphicsDevice,
         byte[] shaderCode
)

Parameters

  • graphicsDevice
    Device to create the pixel shader.
  • shaderCode
    The compiled byte code. A pixel shader function token array, specifying the blending operations.

Exceptions

Exception type Condition
ArgumentNullException graphicsDevice or shaderCode is null.
InvalidOperationException Unable to create this PixelShader resource on the graphics device.

See Also

Reference

PixelShader Class
PixelShader Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista