Microsoft.Xna.Framework.Graphics Namespace

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Provides classes for composing and rendering 3-D graphics.

Classes

  Class Description
Public class AlphaTestEffect Contains a configurable effect that supports alpha testing.
Public class BasicEffect Contains a basic rendering effect.
Public class BlendState Contains blend state for the device.
Public class DepthStencilState Contains depth-stencil state for the device.
Public class DirectionalLight Creates a DirectionalLight object.
Public class DualTextureEffect Contains a configurable effect that supports two-layer multitexturing.
Public class DynamicIndexBuffer Describes the rendering order of the vertices in a vertex buffer. Use DynamicIndexBuffer for storing indices for dynamic vertices and IndexBuffer for indices of non-dynamic arrays.
Public class DynamicVertexBuffer Represents a list of 3D vertices to be streamed to the graphics device. Use DynamicVertexBufferfor dynamic vertex arrays and VertexBuffer for non-dynamic vertex arrays.
Public class Effect Used to set and query effects, and to choose techniques.
Public class EffectPass Contains rendering state for drawing with an effect; an effect can contain one or more passes.
Public class EffectPassCollection Manipulates a collection of EffectPass objects.
Public class EffectTechnique Represents an effect technique.
Public class EffectTechniqueCollection Manipulates a collection of EffectTechnique objects.
Public class EnvironmentMapEffect Contains a configurable effect that supports environment mapping.
Public class GraphicsAdapter Provides methods to retrieve and manipulate graphics adapters.
Public class GraphicsDevice Performs primitive-based rendering, creates resources, handles system-level variables, and creates shaders.
Public class GraphicsDeviceExtensions The GraphicsDevice extension methods.
Public class GraphicsResource Queries and prepares resources.
Public class IndexBuffer Describes the rendering order of the vertices in a vertex buffer.
Public class PixelShader Encapsulates the functionality of a pixel shader.
Public class PresentationParameters Contains presentation parameters.
Public class RasterizerState Contains rasterizer state, which determines how to convert vector data (shapes) into raster data (pixels).
Public class RenderTarget2D Contains a 2D texture that can be used as a render target.
Public class RenderTargetCube Represents a cubic texture resource that will be written to at the end of a render pass.
Public class SamplerState Contains sampler state, which determines how to sample texture data.
Public class SamplerStateCollection Collection of SamplerState objects.
Public class SkinnedEffect Contains a configurable effect for rendering skinned character models.
Public class Texture Represents a texture resource.
Public class Texture2D Represents a 2D grid of texels.
Public class TextureCollection Represents a collection of Texture objects.
Public class TextureCube Represents a set of six 2D textures, one for each face of a cube.
Public class VertexBuffer Represents a list of 3D vertices to be streamed to the graphics device.
Public class VertexDeclaration A vertex declaration, which defines per-vertex data.
Public class VertexShader Encapsulates the functionality of a vertex shader.
Public class ViewportExtensions Defines the window dimensions of a render-target surface onto which a 3D volume projects.

Structures

  Structure Description
Public structure RenderTargetBinding Binds an array of render targets.
Public structure VertexBufferBinding Binding structure that specifies a vertex buffer and other per-vertex parameters (such as offset and instancing) for a graphics device.
Public structure VertexElement Defines input vertex data to the pipeline.
Public structure VertexPositionColor Describes a custom vertex format structure that contains position and color information.
Public structure VertexPositionColorTexture Describes a custom vertex format structure that contains position, color, and one set of texture coordinates.
Public structure VertexPositionNormalTexture Describes a custom vertex format structure that contains position, normal data, and one set of texture coordinates.
Public structure VertexPositionTexture Describes a custom vertex format structure that contains position and one set of texture coordinates.
Public structure Viewport Defines the window dimensions of a render-target surface onto which a 3D volume projects.

Interfaces

  Interface Description
Public interface IEffectFog Gets or sets fog parameters for the current effect.
Public interface IEffectLights Gets or sets lighting parameters for the current effect.
Public interface IEffectMatrices Gets or sets transformation matrix parameters for the current effect.
Public interface IVertexType Vertex type interface which is implemented by a custom vertex type structure.

Enumerations

  Enumeration Description
Public enumeration Blend Defines color blending factors.
Public enumeration BlendFunction Defines how to combine a source color with the destination color already on the render target for color blending.
Public enumeration BufferUsage Specifies special usage of the buffer contents.
Public enumeration ClearOptions Specifies the buffer to use when calling Clear.
Public enumeration ColorWriteChannels Defines the color channels that can be chosen for a per-channel write to a render target color buffer.
Public enumeration CompareFunction Defines comparison functions that can be chosen for alpha, stencil, or depth-buffer tests.
Public enumeration CubeMapFace Defines the faces of a cube map in the TextureCube class type.
Public enumeration CullMode Defines winding orders that may be used to identify back faces for culling.
Public enumeration DepthFormat Defines the format of data in a depth-stencil buffer.
Public enumeration FillMode Describes options for filling the vertices and lines that define a primitive.
Public enumeration GraphicsProfile Identifies the set of supported devices for the game based on device capabilities.
Public enumeration IndexElementSize Defines the size of an element of an index buffer.
Public enumeration PrimitiveType Defines how vertex data is ordered.
Public enumeration RenderTargetUsage Determines how render target data is used once a new render target is set.
Public enumeration SetDataOptions Describes whether existing vertex or index buffer data will be overwritten or discarded during a SetData operation.
Public enumeration StencilOperation Defines stencil buffer operations.
Public enumeration SurfaceFormat Defines various types of surface formats.
Public enumeration TextureAddressMode Defines modes for addressing texels using texture coordinates that are outside of the typical range of 0.0 to 1.0.
Public enumeration TextureFilter Defines filtering types during texture sampling.
Public enumeration VertexElementFormat Defines vertex element formats.
Public enumeration VertexElementUsage Defines usage for vertex elements.