VertexShader Constructor

Initializes a new instance of the VertexShader class.

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

public VertexShader (
         GraphicsDevice graphicsDevice,
         byte[] shaderCode
)

Parameters

graphicsDevice
The GraphicsDevice to associate with this VertexShader.
shaderCode
The compiled byte code. An array of tokens that represents the vertex shader, including embedded debug and symbol table information.

Exception typeCondition
ArgumentException shaderCode must have a length that is a multiple of four.
ArgumentNullException graphicsDevice or shaderCode is null.
InvalidOperationException Unable to create this VertexShader resource on the graphics device.

Xbox 360, Windows XP SP2, Windows Vista

Community Additions

ADD
Show: