This chapter provides a reference to and explores the features of the Graphics
namespace, which is part of the XNA Framework. The Graphics
namespace contains the low-level classes and methods for rendering 3D objects with hardware-accelerated video cards. We will study the Graphics
namespace to learn the capabilities of XNA Game Studio with a special emphasis on 3D rendering on the Xbox 360.
Here’s what this chapter will cover:
Graphics
classes
Graphics
interfaces
Graphics
structures
Graphics
enumerations
The following pages provide a complete reference to the Graphics
namespace, which is the largest of the namespaces in the XNA Framework. This is a great resource because it’s easy to miss the many classes, structures, and events built in to the framework unless one sees a list of those features in a quick reference format, such as this one. As was the case in previous reference chapters, inherited items are omitted from the list of properties, methods, etc., for each item.
Following are the classes found within the Graphics
namespace.
public class AlphaTestEffect : Effect, IEffectMatrices, IEffectFog
Contains a configurable effect that supports alpha testing.
Public Properties | |
| Gets or sets the material alpha, which determines its transparency. Range is from |
| Gets or sets the compare function for alpha test. The default value is Greater. |
| Gets or sets the diffuse color for a material. The range of color values is from |
| Gets or sets the fog color. The range of color values is from |
| Gets or sets the fog enable flag. |
| Gets or sets the maximum z value for fog, which ranges from |
| Gets or sets the minimum z value for fog, which ranges from |
| Gets or sets the projection matrix. |
| Gets or sets the reference alpha value. The default value is |
| Gets or sets the current texture. |
| Gets or sets whether vertex color is enabled. |
| Gets or sets the view matrix. |
| Gets or sets the world matrix. |
Protected Methods | |
| Computes derived parameter values immediately before applying the effect using a lazy architecture. |
public class BasicEffect : Effect, IEffectMatrices, IEffectLights, IEffectFog
Contains a basic rendering effect.
Public Properties | |
| Gets or sets the material alpha, which determines its transparency. Range is from |
| Gets or sets the ambient color for a light. The range of color values is from |
Gets or sets the diffuse color for a material. The range of color values is from | |
| Gets the first directional light for this effect. |
| Gets the second directional light for this effect. |
| Gets the third directional light for this effect. |
| Gets or sets the emissive color for a material. The range of color values is from |
| Gets or sets the fog color. The range of color values is from |
| Enables fog. |
| Gets or sets the maximum z value for fog, which ranges from |
| Gets or sets the minimum z value for fog, which ranges from |
| Enables lighting for this effect. |
| Gets or sets a value indicating that per-pixel lighting should be used if it is available for the current adapter. Per-pixel lighting is available if a graphics adapter supports Pixel Shader Model 2.0. |
| Gets or sets the projection matrix. |
| Gets or sets the specular color for a material. The range of color values is from |
| Gets or sets the specular power of this effect material. |
| Gets or sets a texture to be applied by this effect. |
| Enables textures for this effect. |
| Enables the use of vertex colors for this effect. |
| Gets or sets the view matrix. |
| Gets or sets the world matrix. |
Public Methods | |
| Enables default lighting for this effect. |
Protected Methods | |
| Computes derived parameter values immediately before applying the effect. |
public class BlendState : GraphicsResource
Contains the blend state for the device.
Public Fields | |
| A built-in state object with settings for additive blend (that is, adding the destination data to the source data without using alpha). |
| A built-in state object with settings for alpha blend (that is, blending the source and destination data using alpha). |
A built-in state object with settings for blending with non-premultipled alpha (that is, blending source and destination data using alpha while assuming the color data contains no alpha information). | |
| A built-in state object with settings for opaque blend (that is, overwriting the source with the destination data). |
Public Properties | |
| Gets or sets the arithmetic operation when blending alpha values. The default is |
| Gets or sets the blend factor for the destination alpha, which is the percentage of the destination alpha included in the blended result. The default is |
| Gets or sets the alpha blend factor. The default is |
| Gets or sets the four-component (RGBA) blend factor for alpha blending. |
| Gets or sets the arithmetic operation when blending color values. The default is |
| Gets or sets the blend factor for the destination color. The default is |
| Gets or sets the blend factor for the source color. The default is |
| Gets or sets which color channels (RGBA) are enabled for writing during color blending. The default value is |
| Gets or sets which color channels (RGBA) are enabled for writing during color blending. The default value is |
| Gets or sets which color channels (RGBA) are enabled for writing during color blending. The default value is |
| Gets or sets which color channels (RGBA) are enabled for writing during color blending. The default value is |
| Gets or sets a bitmask, which defines which samples can be written during multisampling. The default is |
public class DepthStencilState : GraphicsResource
Contains the depth-stencil state for the device.
Public Fields | |
| A built-in state object with default settings for using a depth-stencil buffer. |
| A built-in state object with settings for enabling a read-only depth-stencil buffer. |
| A built-in state object with settings for not using a depth-stencil buffer. |
| Gets or sets the stencil operation to perform if the stencil test passes and the depth-buffer test fails for a counterclockwise triangle. The default is |
| Gets or sets the stencil operation to perform if the stencil test fails for a counterclockwise triangle. The default is |
| Gets or sets the comparison function to use for counterclockwise stencil tests. The default is |
| Gets or sets the stencil operation to perform if the stencil and depth tests pass for a counterclockwise triangle. The default is |
| Enables or disables depth buffering. The default is |
| Gets or sets the comparison function for the depth-buffer test. The default is |
| Enables or disables writing to the depth buffer. The default is |
| Specifies a reference value to use for the stencil test. The default is |
| Gets or sets the stencil operation to perform if the stencil test passes and the depth test fails. The default is |
| Gets or sets stencil enabling. The default is |
| Gets or sets the stencil operation to perform if the stencil test fails. The default is |
| Gets or sets the comparison function for the stencil test. The default is |
| Gets or sets the mask applied to the reference value and each stencil-buffer entry to determine the significant bits for the stencil test. The default mask is |
| Gets or sets the stencil operation to perform if the stencil test passes. The default is |
| Gets or sets the write mask applied to values written into the stencil buffer. The default mask is |
| Enables or disables two-sided stenciling. The default is |
public sealed class DeviceLostException : Exception
This exception is thrown when the device has been lost but cannot be reset at this time. Therefore, rendering is not possible.
public sealed class DeviceNotResetException : Exception
This exception is thrown when the device has been lost but can be reset at this time.
public sealed class DirectionalLight
Creates a DirectionalLight
object.
Public Properties | |
| Gets or sets the diffuse color of the light. |
| Gets or sets the light direction. This value must be a unit vector. |
| Gets or sets light enable flag. |
| Gets or sets the specular color of the light. |
public class DisplayMode
Describes the display mode.
Public Properties | |
| Gets the aspect ratio used by the graphics device. |
| Gets a value indicating the surface format of the display mode. |
| Gets a value indicating the screen height, in pixels. |
| Returns the title safe area of the display. |
| Gets a value indicating the screen width, in pixels. |
public class DisplayModeCollection : IEnumerable<DisplayMode>, IEnumerable
Manipulates a collection of DisplayMode
structures.
Public Properties | |
| Retrieves the |
Public Methods | |
| Gets an enumerator that can iterate through the |
public class DualTextureEffect : Effect, IEffectMatrices, IEffectFog
Contains a configurable effect that supports two-layer multitexturing.
| Gets or sets the material alpha, which determines its transparency. Range is from |
| Gets or sets the diffuse color for a material. The range of color values is from |
| Gets or sets the fog color. The range of color values is from |
| Gets or sets the fog enable flag. |
| Gets or sets the maximum z value for fog, which ranges from |
| Gets or sets the minimum z value for fog, which ranges from |
| Gets or sets the projection matrix. |
| Gets or sets the current base texture. |
| Gets or sets the current overlay texture. |
| Gets or sets whether per-vertex color is enabled. |
| Gets or sets the view matrix. |
| Gets or sets the world matrix. |
Protected Methods | |
| Computes derived parameter values immediately before applying the effect. |
public class DynamicIndexBuffer : IndexBuffer
Describes the rendering order of the vertices in a vertex buffer.
Public Properties | |
| Determines whether the index buffer data has been lost due to a lost-device event. |
Public Methods | |
| Copies array data to the index buffer. |
Public Events | |
| Occurs when resources are lost due to a lost-device event. |
public class DynamicVertexBuffer : VertexBuffer
Represents a list of 3D vertices to be streamed to the graphics device. In situations where your game frequently modifies a vertex buffer, it is recommended that the buffer be instantiated or derived from DynamicVertexBuffer
instead of the VertexBuffer
class. DynamicVertexBuffer
is optimized for frequent vertex data modification. However, to fully maximize the benefits of this class, your data must be restored after any occurrence of a ContentLost
event. This event occurs whenever the related graphics device is lost. After resetting the graphics device and restoring any static resources, the ContentLost
event handler is then called. Calling SetData
inside this handler restores any dynamic resource data.
Public Properties | |
| Determines whether the index buffer data has been lost due to a lost-device event. |
Public Methods | |
| Copies array data to the vertex buffer. |
Public Events | |
| Occurs when resources are lost due to a lost-device event. |
public class Effect : GraphicsResource
Used to set and query effects, and to choose techniques.
Public Properties | |
| Gets or sets the active technique. |
| Gets a collection of parameters used for this effect. |
| Gets a collection of techniques that are defined for this effect. |
Protected Methods | |
| Applies the effect state just prior to rendering the effect. |
public sealed class EffectAnnotation
Represents an annotation to an EffectParameter
.
Public Properties | |
| Gets the number of columns in this effect annotation. |
| Gets the name of the effect annotation. |
| Gets the parameter class of this effect annotation. |
| Gets the parameter type of this effect annotation. |
Gets the row count of this effect annotation. | |
| Gets the semantic of this effect annotation. |
Public Methods | |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
public sealed class EffectAnnotationCollection : IEnumerable<EffectAnnotation>
Manipulates a collection of EffectAnnotation
objects.
Public Properties | |
| Gets the number of |
| Gets an |
Public Methods | |
| Gets an enumerator that can iterate through the |
Explicit Interface Implementations | |
| Gets an enumerator that can iterate through the |
| Gets an enumerator that can iterate through the |
public class EffectMaterial : Effect
Contains an effect subclass that is used to load data for an EffectMaterialContent
type. For most purposes, this type can be ignored, and treated exactly like a regular effect. When an EffectMaterial
type is loaded from XNB format, its parameter values and textures are also loaded and automatically set on the effect, in addition to the HLSL shader code. Use this class to write a content pipeline extension to store materials inside a custom data type.
public sealed class EffectParameter
Represents an Effect
parameter. Creating and assigning an EffectParameter
instance for each technique in your Effect
is significantly faster than using the Parameters
indexed property on Effect
.
Public Properties | |
| Gets the collection of |
| Gets the number of columns in the parameter description. |
| Gets the collection of effect parameters. |
| Gets the name of the parameter. |
| Gets the class of the parameter. |
| Gets the type of the parameter. |
| Gets the number of rows in the parameter description. |
| Gets the semantic meaning, or usage, of the parameter. |
| Gets the collection of structure members. |
Public Methods | |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
| Gets the value of the |
Gets the value of the | |
| Gets the value of the |
| Gets the value of the |
| Sets the value of the |
| Sets the value of the |
public sealed class EffectParameter
Manipulates a collection of EffectParameter
objects. Creating and assigning an EffectParameter
instance for each technique in your Effect
is significantly faster than using the Parameters
indexed property on Effect
.
Public Properties | |
| Gets the number of |
| Gets an |
Public Methods | |
| Gets an enumerator that can iterate through |
| Gets an effect parameter from its semantic usage. |
Explicit Interface Implementations | |
| Gets an enumerator that can iterate through |
| Gets an enumerator that can iterate through |
public sealed class EffectPass
Contains the rendering state for drawing with an effect; an effect can contain one or more passes.
Public Properties | |
| Gets the set of |
| Gets the name of this pass. |
Public Methods | |
| Begins this pass. |
public sealed class EffectPassCollection : IEnumerable<EffectPass>
Manipulates a collection of EffectPass
objects.
Public Properties | |
| Gets the number of objects in the collection. |
| Gets an element in the collection. |
Public Methods | |
| Gets an enumerator that can iterate through the |
Explicit Interface Implementations | |
| Gets an enumerator that can iterate through the |
| Gets an enumerator that can iterate through the |
public sealed class EffectTechnique
Represents an effect technique. Creating and assigning an EffectTechnique
instance for each technique in your Effect
is significantly faster than using the Techniques
indexed property on Effect
.
Public Properties | |
| Gets the |
| Gets the name of this technique. |
| Gets the collection of |
public sealed class EffectTechniqueCollection : IEnumerable<EffectTechnique>
Manipulates a collection of EffectTechnique
objects.
Public Properties | |
| Gets the number of objects in the collection. |
| Gets an element in the collection. |
| Gets an enumerator that can iterate through the |
Explicit Interface Implementations | |
| Gets an enumerator that can iterate through the |
| Gets an enumerator that can iterate through the |
public class EnvironmentMapEffect : Effect, IEffectMatrices, IEffectLights, IEffectFog
Contains a configurable effect that supports environment mapping.
Public Properties | |
| Gets or sets the material alpha, which determines its transparency. Range is between |
| Gets or sets the ambient color for a light. The range of color values is from |
| Gets or sets the diffuse color for a material. The range of color values is from |
| Gets the first directional light. |
| Gets the second directional light. |
| Gets the third directional light. |
| Gets or sets the emissive color for a material. The range of color values is from |
| Gets or sets the current environment map texture. |
| Gets or sets the amount of the environment map color (RGB) that will be blended over the base texture. The value ranges from |
| Gets or sets the amount of the environment map alpha value that will be added to the base texture. The value ranges from |
| Gets or sets the fog color. The range of color values is from |
| Gets or sets the fog enable flag. |
| Gets or sets the maximum z value for fog, which ranges from |
| Gets or sets the minimum z value for fog, which ranges from |
| Gets or sets the Fresnel factor used for the environment map blending. |
| Gets or sets the projection matrix. |
| Gets or sets the current texture. |
Gets or sets the view matrix. | |
| Gets or sets the world matrix. |
Public Methods | |
| Sets up standard key, fill, and back lighting for an |
Protected Methods | |
| Computes derived parameter values immediately before applying the effect. |
Explicit Interface Implementations | |
| Enables lighting in an |
public sealed class GraphicsAdapter
Provides methods to retrieve and manipulate graphics adapters.
Public Properties | |
| Collection of available adapters on the system. |
| Gets the current display mode. |
| Gets the default adapter. |
| Retrieves a string used for presentation to the user. |
| Retrieves a value that is used to help identify a particular chip set. |
| Retrieves a string that contains the device name for a Microsoft Windows Graphics Device Interface (GDI). |
| Determines whether this instance of |
| Determines whether the graphics adapter is in widescreen mode. |
| Retrieves the handle of the monitor associated with the Microsoft Direct3D object. |
| Retrieves a value used to help identify the revision level of a particular chip set. |
| Retrieves a value used to identify the subsystem. |
| Returns a collection of supported display modes for the current adapter. |
| Gets or sets a null device. |
| Gets or sets a reference device. |
| Retrieves a value used to identify the manufacturer. |
Public Methods | |
| Tests to see whether the adapter supports the requested profile. |
| Queries the adapter for support for the requested back-buffer format. |
| Queries the adapter for support for the requested render target format. |
public class GraphicsDevice : IDisposable
Performs primitive-based rendering, creates resources, handles system-level variables, adjusts gamma ramp levels, and creates shaders.
Public Properties | |
| Gets the graphics adapter. |
| Gets or sets the color used for a constant-blend factor during alpha blending. The default value is |
| Gets or sets a system-defined instance of a blend state object initialized for alpha blending. The default value is |
| Gets or sets a system-defined instance of a depth-stencil state object. The default value is |
| Retrieves the display mode’s spatial resolution, color resolution, and refresh frequency. |
| Retrieves the status of the device. |
| Gets the graphics profile. The default value is |
| Gets or sets index data. The default value is |
| Gets or sets a bitmask controlling modification of the samples in a multisample render target. The default value is – |
| Gets the presentation parameters associated with this graphics device. |
| Gets or sets rasterizer state. The default value is |
| Gets or sets a reference value for stencil testing. The default value is |
| Retrieves a collection of |
| Gets or sets the rectangle used for scissor testing. By default, the size matches the render target size. |
| Returns the collection of textures that have been assigned to the texture stages of the device. |
| Gets the collection of vertex sampler states. |
| Gets the collection of vertex textures that support texture lookup in the vertex shader using the |
| Gets or sets a viewport identifying the portion of the render target to receive draw calls. |
Public Methods | |
| Clears resource buffers. |
| Renders the specified geometric primitive, based on indexing into an array of vertices. |
Draws a series of instanced models. | |
| Renders a sequence of non-indexed geometric primitives of the specified type from the current set of data-input streams. |
| Renders geometric primitives with an index. |
| Renders geometric primitives. |
| Gets the contents of the back buffer. |
| Gets a render target surface. |
| Gets the vertex buffers. |
| Presents the display with the contents of the next buffer in the sequence of back buffers owned by the |
| Resets the presentation parameters for the current |
| Sets a new color buffer for a |
| Sets an array of render targets. |
| Sets or binds a vertex buffer to a device. |
| Sets the vertex buffers. |
Public Events | |
| Occurs when a |
| Occurs after a |
| Occurs when a |
| Occurs when a resource is created. |
| Occurs when a resource is destroyed. |
public abstract class GraphicsResource : IDisposable
Queries and prepares resources.
Public Properties | |
| Gets the |
| Gets the name of the resource. |
T | Gets the resource tags for this resource. |
public class IndexBuffer : GraphicsResource
Describes the rendering order of the vertices in a vertex buffer. The vertex stream and index data of the graphics device must be set before any call to DrawIndexedPrimitives
. It associates a user-created vertex buffer of type VertexPositionNormalTexture
with vertex stream 0 (zero) of the graphics device.
Public Properties | |
| Gets the state of the related |
| Gets the number of indices in this buffer. |
| Gets a value indicating the size of this index element. |
Public Methods | |
| Gets the index buffer into an array. |
| Copies array data to the index buffer. |
public sealed class Model
Represents a 3D model composed of multiple ModelMesh
objects, which may be moved independently.
Public Properties | |
| Gets a collection of |
| Gets a collection of |
| Gets the root bone for this model. |
| Gets or sets an object identifying this model. |
Public Methods | |
| Copies a transform of each bone in a model relative to all parent bones of the bone into a given array. |
| Copies an array of transforms into each bone in the model. |
| Copies each bone transform relative only to the parent bone of the model to a given array. |
| Renders a model after applying the matrix transformations. |
public sealed class ModelBone
Represents bone data for a model. A model bone is a matrix that represents the position of a mesh as it relates to other meshes in a 3D model. A complex computer-generated object, often called a model, is made up of many vertices and materials organized into a set of meshes. In the XNA Framework, a model is represented by the Model
class. A model contains one or more meshes, each of which is represented by a ModelMesh
class. Each mesh is associated with one bone represented by the ModelBone
class.
Public Properties | |
| Gets a collection of bones that are children of this bone. |
| Gets the index of this bone in the |
| Gets the name of this bone. |
| Gets the parent of this bone. |
| Gets or sets the matrix used to transform this bone relative to its parent bone. |
public sealed class ModelBoneCollection : ReadOnlyCollection<ModelBone>
Represents a set of bones associated with a model.
Public Properties | |
| Retrieves a |
Public Methods | |
| Returns a |
| Finds a bone with a given name if it exists in the collection. |
public sealed class ModelEffectCollection : ReadOnlyCollection<Effect>
Represents a collection of effects associated with a model.
Public Methods | |
| Returns a |
public sealed class ModelMesh
Represents a mesh that is part of a Model.
Public Properties | |
| Gets the |
| Gets a collection of effects associated with this mesh. |
| Gets the |
| Gets the name of this mesh. |
| Gets the parent bone for this mesh. The parent bone of a mesh contains a transformation matrix that describes how the mesh is located relative to any parent meshes in a model. |
| Gets or sets an object identifying this mesh. |
Public Methods | |
| Draws all the |
public sealed class ModelMeshCollection : ReadOnlyCollection<ModelMesh>
Represents a collection of ModelMesh
objects.
Public Properties | |
| Retrieves a |
Public Methods | |
| Returns a |
| Finds a mesh with a given name if it exists in the collection. |
class definition
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. It is not necessary to use this class directly. In advanced rendering scenarios, it is possible to draw using ModelMeshPart
properties in combination with the vertex and index buffers on ModelMesh
. However, in most cases, ModelMesh.Draw
will be sufficient.
Public Properties | |
| Gets or sets the material Effect for this mesh part. |
| Gets the index buffer for this mesh part. |
| Gets the number of vertices used during a |
| Gets the number of primitives to render. |
| Gets the location in the index array at which to start reading vertices. |
| Gets or sets an object identifying this model mesh part. |
| Gets the vertex buffer for this mesh part. |
| Gets the offset (in vertices) from the top of vertex buffer. |
public sealed class ModelMeshPartCollection : ReadOnlyCollection<ModelMeshPart>
Represents a collection of ModelMeshPart
objects.
Public Methods | |
| Returns a |
public sealed class NoSuitableGraphicsDeviceException : Exception
Thrown when no available graphics device fits the given device preferences.
public class OcclusionQuery : GraphicsResource
Used to perform an occlusion query against the latest drawn objects. An occlusion query is a technique that determines how many pixels were actually drawn during a set of Draw
calls. This is useful for certain rendering techniques and rendering optimizations. The number of non-occluded pixels (indicated by PixelCount
) can differ based on the platform.
For Xbox 360 games, PixelCount
represents the number of pixels modified by drawing. This includes GraphicsDevice.Clear
calls and any drawing associated with sprite batches.
For Windows games, PixelCount
represents the number of pixels that passed the depth and stencil tests. This does not include sprite-batch drawing (because the depth test is turned off) or calls to GraphicsDevice.Clear
.
To achieve consistent results across all platforms, use occlusion queries only when the depth buffer is enabled. In addition, avoid calling Clear
or changing the assigned render target inside an occlusion query begin/end block.
Public Properties | |
| Gets a value that indicates whether the occlusion query has completed. |
| Gets the number of visible pixels. |
Public Methods | |
| Begins the application of the query. |
| Ends the application of the query. |
public class PresentationParameters
Contains presentation parameters.
Public Properties | |
| Gets or sets the format of the back buffer. |
| Gets or sets a value indicating the height of the new swap chain’s back buffer. |
| Gets or sets a value indicating the width of the new swap chain’s back buffer. |
| Gets the size of this resource. |
| Gets or sets the depth-stencil data format. |
| Gets or sets the handle to the device window. |
| Gets or sets the orientation of the display. The default value is |
| Gets or sets a value indicating whether the application is in full-screen mode. |
| Gets or sets a value indicating the number of sample locations during multisampling. |
| Gets or sets the maximum rate at which the swap chain’s back buffers can be presented to the front buffer. |
| Gets or sets render target usage flags. |
public class RasterizerState : GraphicsResource
Contains the rasterizer state, which determines how to convert vector data (shapes) into raster data (pixels).
Public Fields | |
| A built-in state object with settings for culling primitives with clockwise winding order. |
| A built-in state object with settings for culling primitives with counterclockwise winding order. |
| A built-in state object with settings for not culling any primitives. |
Public Properties | |
| Specifies the conditions for culling or removing triangles. The default value is |
| Sets or retrieves the depth bias for polygons, which is the amount of bias to apply to the depth of a primitive to alleviate depth-testing problems for primitives of similar depth. The default value is |
| The fill mode, which defines how a triangle is filled during rendering. The default is |
| Enables or disables multisample anti-aliasing. The default is |
| Enables or disables scissor testing. The default is |
| Gets or sets a bias value that takes into account the slope of a polygon. This bias value is applied to coplanar primitives to reduce aliasing and other rendering artifacts caused by z-fighting. The default is |
public class RenderTarget2D : Texture2D
Contains a 2D texture that can be used as a render target.
Public Properties | |
| Gets the data format for the depth-stencil data. |
| Determines whether the index-buffer data has been lost due to a lost-device event. |
| Gets the number of sample locations during multisampling. |
| Gets or sets the render-target usage. |
Public Events | |
| Occurs when resources are lost due to a lost-device event. |
public class RenderTargetCube : TextureCube
Represents a cubic texture resource that will be written to at the end of a render pass.
Public Properties | |
| Gets the depth format of this render target. |
| Determines whether the data has been lost due to a lost-device event. |
| Gets the number of multisample locations. |
| Gets the usage mode of this render target. |
Public Events | |
| Occurs when a resource is lost due to a device being lost. |
public sealed class ResourceCreatedEventArgs : EventArgs
Contains event data.
Public Properties | |
| The object raising the event. |
public sealed class ResourceDestroyedEventArgs : EventArgs
Arguments for a ResourceDestroyed
event.
Public Properties | |
| Gets the name of the destroyed resource. |
| Gets the resource-manager tag of the destroyed resource. |
public class SamplerState : GraphicsResource
Contains sampler state, which determines how to sample texture data.
| Contains the default state for anisotropic filtering and texture-coordinate clamping. |
| Contains the default state for anisotropic filtering and texture-coordinate wrapping. |
| Contains the default state for linear filtering and texture-coordinate clamping. |
| Contains the default state for linear filtering and texture-coordinate wrapping. |
| Contains the default state for point filtering and texture-coordinate clamping. |
| Contains the default state for point filtering and texture-coordinate wrapping. |
Public Properties | |
| Gets or sets the texture-address mode for the u-coordinate. |
| Gets or sets the texture-address mode for the v-coordinate. |
| Gets or sets the texture-address mode for the w-coordinate. |
| Gets or sets the type of filtering during sampling. |
| Gets or sets the maximum anisotropy. The default value is |
| Gets or sets the level-of-detail (LOD) index of the largest map to use. |
| Gets or sets the mipmap LOD bias. The default value is |
public sealed class SamplerStateCollection
Collection of SamplerState objects.
Public Properties | |
| Gets a specific |
public class SkinnedEffect : Effect, IEffectMatrices, IEffectLights, IEffectFog
Contains a configurable effect for rendering skinned character models.
Public Fields | |
| The maximum number of bones. |
Public Properties | |
| Gets or sets the material alpha, which determines its transparency. Range is between |
Gets or sets the ambient color for a light. The range of color values is from | |
| Gets or sets the diffuse color for a material, the range of color values is from |
| Gets the first directional light. |
| Gets the second directional light. |
| Gets the third directional light. |
| Gets or sets the emissive color for a material. The range of color values is from |
| Gets or sets the fog color. The range of color values is from |
| Gets or sets the fog enable flag. |
| Gets or sets the maximum z value for fog, which ranges from |
| Gets or sets the minimum z value for fog, which ranges from |
| Gets or sets the per-pixel prefer lighting flag. |
| Gets or sets the projection matrix. |
| Gets or sets the specular color for a material. The range of color values is from |
| Gets or sets the material specular power. |
| Gets or sets the current texture. |
| Gets or sets the view matrix. |
| Gets or sets the number of per-vertex skinning weights to evaluate, which is either |
| Gets or sets the world matrix. |
Public Methods | |
| Sets up standard key, fill, and back lighting for a |
| Gets the bone-transform matrices for a |
| Sets an array of bone transform matrices for a |
Protected Methods | |
| Computes derived parameter values immediately before applying the effect. |
Explicit Interface Implementations | |
| Enables lighting in a |
public class SpriteBatch : GraphicsResource
Enables a group of sprites to be drawn using the same settings.
public sealed class SpriteFont
Represents a font texture. To load a SpriteFont
, click Sprite Font on the Add New Item dialog box. This adds an XML file to your project describing how to build a texture map for your font. At build time, XNA Game Studio creates a texture with the image of the characters of the font you specify, with the specified font point size. At run time, load the font using ContentManager.Load()
and pass it to SpriteBatch.DrawString()
when drawing text.
Public Properties | |
| Gets a collection of all the characters that are included in the font. |
| Gets or sets the default character for the font. |
| Gets or sets the vertical distance (in pixels) between the base lines of two consecutive lines of text. Line spacing includes the blank space between lines as well as the height of the characters. |
| Gets or sets the spacing of the font characters. |
Public Methods | |
| Returns the width and height of a string. |
public abstract class Texture : GraphicsResource
Represents a texture resource.
Public Properties | |
| Gets the format of the texture data. |
| Gets the number of texture levels in a multilevel texture. |
public class Texture2D : Texture
Represents a 2D grid of texels. A texel represents the smallest unit of a texture that can be read from or written to by the GPU. A texel is composed of one to four components. Specifically, a texel may be any one of the available texture formats represented in the SurfaceFormat
enumeration. A Texture2D
resource contains a 2D grid of texels. Each texel is addressable by a u, v vector. Because it is a texture resource, it may contain mipmap levels.
Public Properties | |
| Gets the size of this resource. |
| Gets the height of this texture resource, in pixels. |
| Gets the width of this texture resource, in pixels. |
Public Methods | |
| Methods for loading an image. |
| Copies texture data into an array. |
| Saves texture data as a JPEG. |
| Saves texture data as a PNG. |
| Sets data to the texture. |
public class Texture3D : Texture
Represents a 3D volume of texels. A texel represents the smallest unit of a texture that can be read from or written to by the GPU. A Texture3D
resource (also known as a volume texture) contains a 3D volume of texels. Because it is a texture resource, it may contain mipmap levels.
Public Properties | |
| Gets the depth of this volume texture resource, in pixels. |
| Gets the height of this texture resource, in pixels. |
| Gets the width of this texture resource, in pixels. |
Public Methods | |
| Gets a copy of the texture data. |
| Sets data. |
public sealed class TextureCollection
Represents a collection of Texture
objects.
class definition
Represents a set of six 2D textures, one for each face of a cube. A cube texture is a collection of six textures, one for each face of the cube. All faces must be present in the cube texture. Also, a cube map surface must be the same pixel size in all three dimensions (x, y, and z).
Public Properties | |
| Gets the width and height of this texture resource, in pixels. |
Public Methods | |
| Returns a copy of the texture data. |
| Sets texture data. |
public class VertexBuffer : GraphicsResource
Represents a list of 3D vertices to be streamed to the graphics device.
Public Properties | |
| Gets the state of the related |
| Gets the number of vertices. |
| Defines per-vertex data in a buffer. |
Public Methods | |
| Returns a copy of the vertex-buffer data. |
| Sets the vertex-buffer data. |
The following interfaces are found in the Graphics
namespace.
public interface IEffectFog
Gets or sets fog parameters for the current effect.
Public Properties | |
| Gets or sets the fog color. |
| Enables or disables fog. |
| Gets or sets the fog ending distance. |
| Gets or sets the fog ending distance. |
public interface IEffectLights
Gets or sets lighting parameters for the current effect.
Public Properties | |
| Gets or sets the ambient light color for the current effect. |
| Gets the first directional light for the current effect. |
| Gets the second directional light for the current effect. |
| Gets the third directional light for the current effect. |
| Enables or disables lighting in an |
Public Methods | |
| Enables default lighting for the current effect. |
public interface IEffectMatrices
Gets or sets transformation-matrix parameters for the current effect.
Public Properties | |
| Gets or sets the projection matrix in the current effect. |
| Gets or sets the view matrix in the current effect. |
| Gets or sets the world matrix in the current effect. |
public interface IGraphicsDeviceService
Defines a mechanism for retrieving GraphicsDevice
objects.
Public Properties | |
| Retrieves a graphics device. |
Public Events | |
| The event that occurs when a graphics device is created. |
| The event that occurs when a graphics device is disposing. |
| The event that occurs when a graphics device is reset. |
| The event that occurs when a graphics device is in the process of resetting. |
The following structures are found in the Graphics
namespace.
public struct ModelBoneCollection.Enumerator : IEnumerator<ModelBone>, IDisposable, IEnumerator
Provides the ability to iterate through the bones in a ModelBoneCollection
.
Public Properties | |
| Gets the current element in the |
Public Methods | |
| Advances the enumerator to the next element of the |
Explicit Interface Implementations | |
| Gets the current element in the |
| Sets the enumerator to its initial position, which is before the first element in the |
public struct ModelEffectCollection.Enumerator : IEnumerator<Effect>, IDisposable, IEnumerator
Provides the ability to iterate through the bones in a ModelEffectCollection
.
Public Properties | |
| Gets the current element in the |
Public Methods | |
| Advances the enumerator to the next element of the |
Explicit Interface Implementations | |
| Gets the current element in the |
| Sets the enumerator to its initial position, which is before the first element in the |
public struct ModelMeshCollection.Enumerator : IEnumerator<ModelMesh>, IDisposable, IEnumerator
Provides the ability to iterate through the bones in a ModelMeshCollection
.
| Gets the current element in the |
Public Methods | |
| Advances the enumerator to the next element of the |
Explicit Interface Implementations | |
| Gets the current element in the |
| Sets the enumerator to its initial position, which is before the first element in the |
public struct ModelMeshPartCollection.Enumerator : IEnumerator<ModelMeshPart>, IDisposable, IEnumerator
Provides the ability to iterate through the bones in a ModelMeshPartCollection
.
Public Properties | |
| Gets the current element in the |
Public Methods | |
| Advances the enumerator to the next element of the |
Explicit Interface Implementations | |
| Gets the current element in the |
| Sets the enumerator to its initial position, which is before the first element in the |
public struct RenderTargetBinding
Binds an array of render targets.
Public Properties | |
| Gets one face of a cube map. |
| Gets a 2D texture. |
public struct VertexBufferBinding
Binding structure that specifies a vertex buffer and other per-vertex parameters (such as offset and instancing) for a graphics device.
Public Properties | |
| Gets the instancing frequency. |
| Gets a vertex buffer. |
| Gets the offset between the beginning of the buffer and the vertex data to use. |
public struct VertexElement
Defines input vertex data to the pipeline.
Public Properties | |
| Retrieves or sets the offset (if any) from the beginning of the stream to the beginning of the vertex data. |
| Modifies the usage data to allow the user to specify multiple usage types. |
| Gets or sets the format of this vertex element. |
| Gets or sets a value describing how the vertex element is to be used. |
public struct VertexPositionColor : IVertexType
Describes a custom vertex-format structure that contains position and color information.
Public Fields | |
| The vertex color. |
| The XYZ position. |
| Vertex declaration, which defines per-vertex data. |
Explicit Interface Implementations | |
| Gets a vertex declaration. |
public struct VertexPositionColorTexture : IVertexType
Describes a custom vertex-format structure that contains position information, color information, and one set of texture coordinates.
Public Fields | |
| The vertex color. |
| The XYZ position. |
| UV texture coordinates. |
| Vertex declaration, which defines per-vertex data. |
Explicit Interface Implementations | |
| Gets a vertex declaration. |
public struct VertexPositionNormalTexture : IVertexType
Describes a custom vertex-format structure that contains position, normal data, and one set of texture coordinates.
Public Fields | |
| The XYZ surface normal. |
| The XYZ position. |
| UV texture coordinates. |
| Vertex declaration, which defines per-vertex data. |
Explicit Interface Implementations | |
| Gets a vertex declaration. |
public struct VertexPositionTexture : IVertexType
Describes a custom vertex-format structure that contains position information and one set of texture coordinates.
public struct Viewport
Defines the window dimensions of a render-target surface onto which a 3D volume projects.
Public Properties | |
| Gets the aspect ratio used by the viewport. |
| Gets the size of this resource. |
| Gets or sets the height dimension of the viewport on the render-target surface, in pixels. |
| Gets or sets the maximum depth of the clip volume. |
| Gets or sets the minimum depth of the clip volume. |
| Returns the title-safe area of the current viewport. |
| Gets or sets the width dimension of the viewport on the render-target surface, in pixels. |
| Gets or sets the X pixel coordinate value of the upper-left corner of the viewport on the render-target surface. |
| Gets or sets the Y pixel coordinate value of the upper-left corner of the viewport on the render-target surface. |
Public Methods | |
| Projects a 3D vector from object space into screen space. |
| Converts a screen-space point into a corresponding point in world space. |
Following are the enumerations in the Graphics
namespace.
public enum Blend
Defines color-blending factors.
| Each component of the color is multiplied by (0, 0, 0, 0). |
| Each component of the color is multiplied by (1, 1, 1, 1). |
| Each component of the color is multiplied by the source color. This can be represented as (Rs, Gs, Bs, As), where R, G, B, and A stand for the red, green, blue, and alpha source values, respectively. |
| Each component of the color is multiplied by the inverse of the source color. This can be represented as (1 — Rs, 1 — Gs, 1 — Bs, 1 — As) where R, G, B, and A stand for the red, green, blue, and alpha destination values, respectively. |
| Each component of the color is multiplied by the alpha value of the source. This can be represented as (As, As, As, As), where As is the alpha source value. |
| Each component of the color is multiplied by the inverse of the alpha value of the source. This can be represented as (1 — As, 1 — As, 1 — As, 1 — As), where As is the alpha destination value. |
| Each component of the color is multiplied by the alpha value of the destination. This can be represented as (Ad, Ad, Ad, Ad), where Ad is the destination alpha value. |
| Each component of the color is multiplied by the inverse of the alpha value of the destination. This can be represented as (1 — Ad, 1 — Ad, 1 — Ad, 1 — Ad), where Ad is the alpha destination value. |
| Each component color is multiplied by the destination color. This can be represented as (Rd, Gd, Bd, Ad), where R, G, B, and A stand for red, green, blue, and alpha destination values, respectively. |
| Each component of the color is multiplied by the inverse of the destination color. This can be represented as (1 — Rd, 1 — Gd, 1 — Bd, 1 — Ad), where Rd, Gd, Bd, and Ad stand for the red, green, blue, and alpha destination values, respectively. |
| Each component of the color is multiplied by either the alpha of the source color or the inverse of the alpha of the source color, whichever is greater. This can be represented as (f, f, f, 1), where f = min(A, 1 — Ad). |
| Each component of the color is multiplied by a constant set in |
| Each component of the color is multiplied by the inverse of a constant set in |
public enum BlendFunction
Defines how to combine a source color with the destination color already on the render target for color blending.
| The result is the destination added to the source.Result = (Source Color * Source Blend) + (Destination Color * Destination Blend) |
| The result is the maximum of the source and destination.Result = max( (Source Color * Source Blend), (Destination Color * Destination Blend) ) |
| The result is the minimum of the source and destination.Result = min( (Source Color * Source Blend), (Destination Color * Destination Blend) ) |
| The result is the source subtracted from the destination.Result = (Destination Color * Destination Blend) — (Source Color * Source Blend) |
| The result is the destination subtracted from the source.Result = (Source Color * Source Blend) — (Destination Color * Destination Blend) |
public enum BufferUsage
Specifies special usage of the buffer contents.
| None |
| Indicates that the application only writes to the vertex buffer. If specified, the driver chooses the best memory location for efficient writing and rendering. Attempts to read from a write-only vertex buffer fail. |
public enum ClearOptions
Specifies the buffer to use when calling Clear
.
| A depth buffer. |
| A stencil buffer. |
| A render target. |
public enum ColorWriteChannels
Defines the color channels that can be chosen for a per-channel write to a render-target color buffer.
| All buffer channels. |
| Alpha channel of a buffer. |
| Blue channel of a buffer. |
| Green channel of a buffer. |
| No channel selected. |
| Red channel of a buffer. |
public enum CompareFunction
Defines comparison functions that can be chosen for alpha, stencil, or depth-buffer tests.
| Always pass the test. |
| Accept the new pixel if its value is equal to the value of the current pixel. |
| Accept the new pixel if its value is greater than the value of the current pixel. |
| Accept the new pixel if its value is greater than or equal to the value of the current pixel. |
| Accept the new pixel if its value is less than the value of the current pixel. |
| Accept the new pixel if its value is less than or equal to the value of the current pixel. |
| Always fail the test. |
| Accept the new pixel if its value does not equal the value of the current pixel. |
public enum CubeMapFace
Defines the faces of a cube map in the TextureCube class type.
public enum CullMode
Defines winding orders that may be used to identify back faces for culling.
| Cull back faces with clockwise vertices. |
| Cull back faces with counterclockwise vertices. |
| Do not cull back faces. |
public enum DepthFormat
Defines the format of data in a depth-stencil buffer. A depth buffer contains depth data and possibly stencil data. Control a depth buffer using a state object.
| A buffer that contains 16 bits of depth data. |
| A buffer that contains 24 bits of depth data. |
| A 32-bit buffer that contains 24 bits of depth data and 8 bits of stencil data. |
| Do not create a depth buffer. |
public enum EffectParameterClass
Defines classes that can be used for effect parameters or shader constants.
| The constant is a matrix. |
| The constant is either a texture, a shader, or a string. |
| The constant is a scalar. |
| The constant is a structure. |
| The constant is a vector. |
public enum EffectParameterType
Defines types that can be used for effect parameters or shader constants.
| Parameter is a Boolean. Any non-zero value passed in will be mapped to |
| Parameter is an integer. Any floating-point values passed in will be rounded off (to zero decimal places) before being written into the constant table. |
| Parameter is a floating-point number. |
| Parameter is a string. |
| Parameter is a texture. |
| Parameter is a 1D texture. |
| Parameter is a 2D texture. |
| Parameter is a 3D texture. |
| Parameter is a cube texture. |
| Parameter is a void pointer. |
public enum FillMode
Describes options for filling the vertices and lines that define a primitive.
| Draw solid faces for each primitive. |
| Draw lines connecting the vertices that define a primitive face. |
public enum GraphicsDeviceStatus
Describes the status of the device.
| The device has been lost. |
| The device is normal. |
| The device has not been reset. |
public enum GraphicsProfile
Identifies the set of supported devices for the game based on device capabilities.
| Use the largest available set of graphic features and capabilities to target devices, such as an Xbox 360 console and a Windows-based computer, that have more enhanced graphic capabilities. |
| Use a limited set of graphic features and capabilities, allowing the game to support the widest variety of devices, including all Windows-based computers and Windows Phones. |
public enum IndexElementSize
Defines the size of an element of an index buffer.
| 16 bits. |
| 32 bits. |
public enum PresentInterval
Defines flags that describe the relationship between the adapter refresh rate and the rate at which Present
operations are completed.
| Equivalent to setting |
| The driver waits for the vertical retrace period. |
| The driver waits for the vertical retrace period. |
| The runtime updates the window client area immediately, and might do so more than once during the adapter refresh period. |
public enum PrimitiveType
Defines how vertex data is ordered.
| The data is ordered as a sequence of triangles; each triangle is described by three new vertices. Back-face culling is affected by the current winding-order render state. |
| The data is ordered as a sequence of triangles; each triangle is described by two new vertices and one vertex from the previous triangle. The back-face culling flag is flipped automatically on even-numbered triangles. |
| The data is ordered as a sequence of line segments; each line segment is described by two new vertices. The count may be any positive integer. |
| The data is ordered as a sequence of line segments; each line segment is described by one new vertex and the last vertex from the previous line seqment. The count may be any positive integer. |
public enum RenderTargetUsage
Determines how render target data is used once a new render target is set.
| Always clears the render target data. |
| Either clears or keeps the data, depending on the current platform. On Xbox 360, the render target will discard contents. On a PC, the render target will discard if multisampling is enabled, and preserve the contents if not. |
| Always keeps the render-target data. |
public enum SetDataOptions
Describes whether existing vertex or index-buffer data will be overwritten or discarded during a SetData
operation.
| The |
Portions of existing data in the buffer may be overwritten during this operation. | |
| The |
public enum SpriteEffects
Defines sprite-mirroring options.
| Rotate 180 degrees about the Y axis before rendering. |
| Rotate 180 degrees about the X axis before rendering. |
| No rotations specified. |
public enum SpriteSortMode
Defines sprite sort-rendering options.
| Same as |
| Sprites are not drawn until |
| Same as |
|
|
| Same as |
public enum StencilOperation
Defines stencil-buffer operations.
| Decrements the stencil-buffer entry, wrapping to the maximum value if the new value is less than |
| Decrements the stencil-buffer entry, clamping to |
| Increments the stencil-buffer entry, wrapping to |
| Increments the stencil-buffer entry, clamping to the maximum value. |
| Inverts the bits in the stencil-buffer entry. |
| Does not update the stencil-buffer entry. This is the default value. |
| Replaces the stencil-buffer entry with a reference value. |
| Sets the stencil-buffer entry to |
public enum SurfaceFormat
Defines various types of surface formats. Two-dimensional (2D) images are represented by a range of memory called a surface. Within a surface, each element holds a color value representing a small section of the image, called a pixel. An image’s detail level is defined by the number of pixels needed to represent the image and the number of bits needed for the image’s color spectrum. For example, an image that is 800 pixels wide by 600 pixels high with 32 bits of color for each pixel (written as 800 × 600 × 32) is more detailed than an image that is 640 pixels wide by 480 pixels tall with 16 bits of color for each pixel (written as 640 × 480 × 16). Likewise, the more-detailed image requires a larger surface to store the data. For an 800 × 600 × 32 image, the surface’s array dimensions are 800 × 600, and each element holds a 32-bit value to represent its color.
All formats are listed from left to right, most-significant bit to least-significant bit. For example, ARGB formats are ordered from the most-significant bit channel A (alpha) to the least-significant bit channel B (blue). When traversing surface data, the data is stored in memory from least-significant bit to most-significant bit, which means the channel order in memory is from least-significant bit (blue) to most-significant bit (alpha).
The default value for formats that contain undefined channels (Rg32, Alpha8, and so on) is 1
. The only exception is the Alpha8 format, which is initialized to 000
for the three color channels.
| (Unsigned format) 32-bit ARGB pixel format with alpha, using 8 bits per channel. |
| (Unsigned format) 16-bit BGR pixel format with 5 bits for blue, 6 bits for green, and 5 bits for red. |
| (Unsigned format) 16-bit BGRA pixel format where 5 bits are reserved for each color and 1 bit is reserved for alpha. |
| (Unsigned format) 16-bit BGRA pixel format with 4 bits for each channel. |
| DXT1 compression texture format. The runtime will not allow an application to create a surface using a DXTn format unless the surface dimensions are multiples of 4. This applies to off-screen–plain surfaces, render targets, 2D textures, cube textures, and volume textures. |
| DXT3 compression texture format. The runtime will not allow an application to create a surface using a DXTn format unless the surface dimensions are multiples of 4. This applies to offscreen-plain surfaces, render targets, 2D textures, cube textures, and volume textures. |
| DXT5 compression texture format. The runtime will not allow an application to create a surface using a DXTn format unless the surface dimensions are multiples of 4. This applies to offscreen-plain surfaces, render targets, 2D textures, cube textures, and volume textures. |
| (Signed format) 16-bit bump-map format using 8 bits each for U and V data. |
| (Signed format) 32-bit bump-map format using 8 bits for each channel. |
| (Unsigned format) 32-bit RGBA pixel format using 10 bits for each color and 2 bits for alpha. |
| (Unsigned format) 32-bit pixel format using 16 bits each for red and green. |
| (Unsigned format) 64-bit RGBA pixel format using 16 bits for each component. |
| (Unsigned format) 8-bit alpha only. |
| (IEEE format) 32-bit float format using 32 bits for the red channel. |
| (IEEE format) 64-bit float format using 32 bits for the red channel and 32 bits for the green channel. |
| (IEEE format) 128-bit float format using 32 bits for each channel (alpha, blue, green, red). |
| (Floating-point format) 16-bit float format using 16 bits for the red channel. |
| (Floating-point format) 32-bit float format using 16 bits for the red channel and 16 bits for the green channel. |
| (Floating-point format) 64-bit float format using 16 bits for each channel (alpha, blue, green, red). |
| (Floating-point format) For high dynamic range data. |
public enum TextureAddressMode
Defines modes for addressing texels using texture coordinates that are outside the typical range of 0.0
to 1.0
.
| Texture coordinates outside the range [0.0, 1.0] are set to the texture color at |
| Similar to |
| Tile the texture at every integer junction. For example, for U values between |
public enum TextureFilter
Defines filtering types during texture sampling. A texture coordinate determines where to sample a texture. When a texel does not map exactly to one pixel, filtering is necessary to magnify (enlarge) or minify (shrink) the texture.
Not all valid filtering modes for a device apply to volume maps. In general, Point and Linear magnification filters are supported for volume maps. Devices that support anisotropic filtering for 2D maps do not necessarily support it for volume maps. However, applications that enable anisotropic filtering, even if they do not support it, receive the best available filtering (probably linear).
| Use linear filtering. |
| Use point filtering. |
| Use anisotropic filtering. |
| Use linear filtering to shrink (minify) or expand (magnify), and point filtering between mipmap levels (mip). |
| Use point filtering to shrink (minify) or expand (magnify), and linear filtering between mipmap levels. |
| Use linear filtering to shrink (minify), point filtering to expand (magnify), and linear filtering between mipmap levels. |
| Use linear filtering to shrink (minify), point filtering to expand (magnify), and point filtering between mipmap levels. |
Use point filtering to shrink (minify), linear filtering to expand (magnify), and linear filtering between mipmap levels. | |
| Use point filtering to shrink (minify), linear filtering to expand (magnify), and point filtering between mipmap levels. |
public enum VertexElementFormat
Defines vertex element formats.
| Single-component, 32-bit floating-point, expanded to (float, 0, 0, 1). |
| Two-component, 32-bit floating-point, expanded to (float, Float32 value, 0, 1). |
| Three-component, 32-bit floating point, expanded to (float, float, float, 1). |
| Four-component, 32-bit floating point, expanded to (float, float, float, float). |
| Two-component, 16-bit floating point expanded to (value, value, value, value). This type is valid for vertex shader version 2.0 or higher. |
| Four-component, 16-bit floating-point expanded to (value, value, value, value). This type is valid for vertex shader version 2.0 or higher. |
| Four-component, packed, unsigned byte, mapped to |
| Normalized, two-component, signed short, expanded to (first short/32767.0, second short/32767.0, 0, 1). This type is valid for vertex shader version 2.0 or higher. |
| Normalized, four-component, signed short, expanded to (first short/32767.0, second short/32767.0, third short/32767.0, fourth short/32767.0). This type is valid for vertex shader version 2.0 or higher. |
| Two-component, signed short expanded to (value, value, 0, 1). |
| Four-component, signed short expanded to (value, value, value, value). |
| Four-component, unsigned byte. |
public enum VertexElementUsage
Defines usage for vertex elements.
| Vertex binormal data. |
| Blending indices data. |
| Blending weight data. |
| Vertex data contains diffuse or specular color. |
| Vertex data contains depth data. |
| Vertex data contains fog data. |
| Vertex normal data. |
| Point size data. |
| Position data. |
| Vertex data contains sampler data. |
| Vertex tangent data. |
| Single, positive floating-point value. |
| Texture-coordinate data. |
18.218.127.141