Microsoft.Xna.Framework.Graphics Namespace

Contains low-level application programming interface (API) methods that take advantage of hardware acceleration capabilities to display 3D objects.

Classes

Name Description
Public Class BasicDirectionalLight Provides methods for manipulating the directional lights used by the BasicEffect class.
Public Class BasicEffect Represents shader model 1.1 Effect that has optional support for vertex colors, texturing, and lighting.
Public Class ClipPlane Represents the device clipping plane.
Public Class ClipPlaneCollection Manipulates a collection of ClipPlane objects.
Public Class CompilationFailedException The exception that is thrown if the compilation of an effect fails.
Public Class CompilerIncludeHandler The abstract base class for custom compiler include file handlers.
Public Class DepthStencilBuffer Queries and prepares depth stencil buffers.
Public Class DeviceLostException The exception that is thrown when the device has been lost but cannot be reset at this time. Therefore, rendering is not possible.
Public Class DeviceNotResetException The exception that is thrown when the device has been lost but can be reset at this time.
Public Class DeviceNotSupportedException The exception that is thrown when the graphics device does not support the requested capabilities.
Public Class DeviceStillDrawingException The error that is thrown when the device is still drawing.
Public Class DriverInternalErrorException The exception that is thrown when an internal driver error occurs. Applications should destroy and recreate the device when receiving this error.
Public Class Effect Used to set and query effects and choose techniques.
Public Class EffectAnnotation Represents an annotation to an EffectParameter.
Public Class EffectAnnotationCollection Manipulates a collection of EffectAnnotation objects.
Public Class EffectFunction Represents a function on an Effect.
Public Class EffectFunctionCollection Manipulates a collection of EffectFunction objects.
Public Class EffectParameter Represents an Effect parameter.
Public Class EffectParameterBlock Represents an EffectParameter state block.
Public Class EffectParameterCollection Manipulates a collection of EffectParameter objects.
Public Class EffectPass Represents an effect pass.
Public Class EffectPassCollection Manipulates a collection of EffectPass objects.
Public Class EffectPool Allows applications to share resources between effects.
Public Class EffectTechnique Represents an effect technique.
Public Class EffectTechniqueCollection Manipulates a collection of EffectTechnique objects.
Public Class GammaRamp Contains red, green, and blue ramp data.
Public Class GraphicsAdapter Provides methods to retrieve and manipulate graphics adapters.
Public Class GraphicsDevice Performs primitive-based rendering, creates resources, handles system-level variables, adjusts gamma ramp levels, and creates shaders.
Public Class GraphicsDeviceCapabilities Represents the capabilities of the hardware.
Public Class GraphicsResource Queries and prepares resources.
Public Class IndexBuffer Describes the rendering order of the vertices in a vertex buffer.
Public Class Model Represents a 3D model composed of multiple ModelMesh objects which may be moved independently.
Public Class ModelBone Represents bone data for a model.
Public Class ModelBoneCollection Represents a set of bones associated with a model.
Public Class ModelEffectCollection Represents a collection of effects associated with a model.
Public Class ModelMesh Represents a mesh that is part of a Model.
Public Class ModelMeshCollection Represents a collection of ModelMesh objects.
Public Class ModelMeshPart Represents a batch of geometry information to submit to the graphics device during rendering. Each ModelMeshPart is a subdivision of a ModelMesh object. The ModelMesh class is split into multiple ModelMeshPart objects, typically based on material information.
Public Class ModelMeshPartCollection Represents a collection of ModelMeshPart objects.
Public Class OutOfVideoMemoryException The exception that is thrown when Direct3D does not have enough display memory to perform the operation.
Public Class PixelShader Encapsulates the functionality of a pixel shader.
Public Class PresentationParameters Contains presentation parameters.
Public Class RenderState Defines the render state of a graphics device.
Public Class RenderTarget Represents a resource that will be written to at the end of a render pass.
Public Class RenderTarget2D Represents a 2D texture resource that will be written to at the end of a render pass.
Public Class RenderTargetCube Represents a cubic texture resource that will be written to at the end of a render pass.
Public Class ResourceCreatedEventArgs Contains event data.
Public Class ResourceDestroyedEventArgs Arguments for a ResourceDestroyed event.
Public Class SamplerState Contains sampler states for the device.
Public Class SamplerStateCollection Collection of SamplerState objects.
Public Class ShaderCompiler Compiles and decompiles high-level shader language (HLSL) shaders.
Public Class ShaderConstant Describes a shader constant.
Public Class ShaderConstantCollection Manipulates a collection of ShaderConstant objects.
Public Class ShaderConstantTable Contains the variables that are used by high-level language shaders and effects.
Public Class SpriteBatch Enables a group of sprites to be drawn using the same settings.
Public Class SpriteFont Represents a font texture.
Public Class StateBlock Encapsulates render states.
Public Class Texture Represents a texture resource.
Public Class Texture2D Represents a 2D grid of texels.
Public Class Texture3D Represents a 3D volume 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 Represents a vertex declaration.
Public Class VertexShader Encapsulates the functionality of a vertex shader.
Public Class VertexStream Represents a vertex stream.
Public Class VertexStreamCollection Collection of VertexStream objects.

Interfaces

Name Description
Public Interface IGraphicsDeviceService Defines a mechanism for retrieving GraphicsDevice objects.

Structures

Name Description
Public Structure Color Represents a color using Red, Green, Blue, and Alpha values.
Public Structure CompiledEffect Represents a compiled Effect.
Public Structure CompiledShader Represents a compiled shader.
Public Structure CompilerMacro Represents a compiler macro.
Public Structure DisplayMode Describes the display mode.
Public Structure DisplayModeCollection Manipulates a collection of DisplayMode structures.
Public Structure GraphicsDeviceCapabilities.AddressCaps Represents the texture addressing capabilities for Texture structures.
Public Structure GraphicsDeviceCapabilities.BlendCaps Represents the supported blend capabilities.
Public Structure GraphicsDeviceCapabilities.CompareCaps Represents comparison capabilities.
Public Structure GraphicsDeviceCapabilities.CursorCaps Represents hardware support for cursors.
Public Structure GraphicsDeviceCapabilities.DeclarationTypeCaps Represents data types contained in a vertex declaration.
Public Structure GraphicsDeviceCapabilities.DeviceCaps Represents device-specific capabilities.
Public Structure GraphicsDeviceCapabilities.DriverCaps Represents driver-specific capabilities.
Public Structure GraphicsDeviceCapabilities.FilterCaps Represents texture filter capabilities.
Public Structure GraphicsDeviceCapabilities.LineCaps Represents the capabilities for line-drawing primitives.
Public Structure GraphicsDeviceCapabilities.PixelShaderCaps Represents pixel shader capabilities.
Public Structure GraphicsDeviceCapabilities.PrimitiveCaps Represents driver primitive capabilities.
Public Structure GraphicsDeviceCapabilities.RasterCaps Represents raster-drawing capabilities.
Public Structure GraphicsDeviceCapabilities.ShadingCaps Represents shading operations capabilities
Public Structure GraphicsDeviceCapabilities.StencilCaps Represents driver stencil capabilities.
Public Structure GraphicsDeviceCapabilities.TextureCaps Represents miscellaneous texture-mapping capabilities
Public Structure GraphicsDeviceCapabilities.VertexFormatCaps Represents flexible vertex format capabilities.
Public Structure GraphicsDeviceCapabilities.VertexProcessingCaps Represents vertex processing capabilities.
Public Structure GraphicsDeviceCapabilities.VertexShaderCaps Represents vertex shader version 2_0 extended capabilities.
Public Structure GraphicsDeviceCreationParameters Describes the creation parameters for a device.
Public Structure RasterStatus Describes the raster status.
Public Structure ShaderSemantic Semantics map a parameter to vertex or pixel shader registers. They can also be optional descriptive strings attached to non-register parameters.
Public Structure TextureCreationParameters Describes the parameters to use when initializing a new instance of a texture.
Public Structure TextureInformation Encapsulates information describing texture resources.
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.

Enumerations

Name 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 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 CompilerIncludeHandlerType Identifies an include file as a local or system resource.
Public Enumeration CompilerOptions Defines optimization options that may be chosen for shader and effect code compilation.
Public Enumeration CreateOptions Defines options to control the focus behavior and vertex processing of a graphics device.
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 buffer.
Public Enumeration DeviceType Specifies the type of device driver.
Public Enumeration EffectParameterClass Defines classes that can be used for effect parameters or shader constants.
Public Enumeration EffectParameterType Defines types that can be used for effect parameters or shader constants.
Public Enumeration FillMode Describes options for filling the vertices and lines that define a primitive.
Public Enumeration FilterOptions Defines modes describing how to filter an image or mipmap when it is minified or magnified to fit a set of vertices.
Public Enumeration FogMode Defines constants that describe the fog mode.
Public Enumeration GraphicsDeviceStatus Describes the status of the device.
Public Enumeration ImageFileFormat Defines supported image file formats that may be used for textures.
Public Enumeration IndexElementSize Defines the size of an element of an index buffer.
Public Enumeration MultiSampleType Defines the levels of full-scene multisampling that the device can apply.
Public Enumeration PresentInterval Defines flags that describe the relationship between the adapter refresh rate and the rate at which Present operations are completed.
Public Enumeration PresentOptions Defines flags that control the behavior of the back buffer and depth buffer.
Public Enumeration PrimitiveType Defines how data in a vertex stream is interpreted during a draw call.
Public Enumeration QueryUsages Defines options for querying device resource formats.
Public Enumeration ResourceManagementMode Defines the memory class that holds the buffers for a resource.
Public Enumeration ResourceType Defines resource types.
Public Enumeration ResourceUsage Defines options that identify the behavior of a resource.
Public Enumeration SaveStateMode Defines options for saving the graphics device state before and after an effect technique is applied.
Public Enumeration SetDataOptions Describes whether existing buffer data will be overwritten or discarded during a SetData operation.
Public Enumeration ShaderProfile Defines vertex and pixel shader versions.
Public Enumeration ShaderRegisterSet Defines the data type of a shader register.
Public Enumeration SpriteBlendMode The following flags are used to specify sprite blending rendering options to the flags parameter in Begin:
Public Enumeration SpriteEffects Defines sprite rotation options.
Public Enumeration SpriteSortMode Defines sprite sort-rendering options.
Public Enumeration StencilOperation Defines stencil buffer operations.
Public Enumeration SurfaceFormat Defines various types of surface formats.
Public Enumeration SwapEffect Defines how the device front buffer and back buffer are to be swapped when Present is called.
Public Enumeration TextureAddressMode Defines constants that describe supported texture-addressing modes.
Public Enumeration TextureFilter Defines how a texture will be filtered as it is minified for each mipmap level.
Public Enumeration TextureWrapCoordinates Defines supported wrap coordinates.
Public Enumeration VertexElementFormat Defines vertex element formats.
Public Enumeration VertexElementMethod Defines the tessellator processing method for a vertex element.
Public Enumeration VertexElementUsage Defines usage for vertex elements.

See Also

Tasks

How to: Draw a Sprite
How to: Animate a Sprite
How to: Make a Texture with Masking
How to: Draw a Masked Sprite over a Background
How to: Make a Scrolling Background
How to: Rotate a Sprite
How to: Rotate a Group of Sprites
How to: Scale a Sprite
How to: Tint a Sprite
How to: Check for Shader Model 2.0 Support
How to: Use the Reference Device
How to: Use BasicEffect
How to: Draw Points, Lines, and Other 3D Primitives
How to: Create and Apply Custom Effects
How to: Create Custom Texture Effects

Concepts

2D Graphics Overview
3D Graphics Overview