Export (0) Print
Expand All

BasicEffect Class

Contains a basic rendering effect.

System.Object
  Microsoft.Xna.Framework.Graphics.Effect
    Microsoft.Xna.Framework.Graphics.BasicEffect

Namespace:  Microsoft.Xna.Framework.Graphics
Assembly:  Microsoft.Xna.Framework.Graphics.Extensions (in Microsoft.Xna.Framework.Graphics.Extensions.dll)

public class BasicEffect : Effect, 
	IEffectMatrices, IEffectLights, IEffectFog

The BasicEffect type exposes the following members.

  NameDescription
Public methodBasicEffectInitializes a new instance of the BasicEffect class.
Top

  NameDescription
Public propertyAlphaGets or sets the material alpha which determines its transparency. Range is between 1 (fully opaque) and 0 (fully transparent).
Public propertyAmbientLightColorGets or sets the ambient color for a light, the range of color values is from 0 to 1.
Public propertyCurrentTechniqueGets or sets the active technique. (Inherited from Effect.)
Public propertyDiffuseColorGets or sets the diffuse color for a material, the range of color values is from 0 to 1.
Public propertyDirectionalLight0Gets the first directional light for this effect.
Public propertyDirectionalLight1Gets the second directional light for this effect.
Public propertyDirectionalLight2Gets the third directional light for this effect.
Public propertyEmissiveColorGets or sets the emissive color for a material, the range of color values is from 0 to 1.
Public propertyFogColorGets or sets the fog color, the range of color values is from 0 to 1.
Public propertyFogEnabledEnables fog.
Public propertyFogEndGets or sets the maximum z value for fog.
Public propertyFogStartGets or sets the minimum z value for fog.
Public propertyIsDisposedGets a value that indicates whether the object is disposed. (Inherited from Effect.)
Public propertyLightingEnabledEnables lighting for this effect.
Public propertyPreferPerPixelLightingGets 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.
Public propertyProjectionGets or sets the projection matrix. Use this matrix to change how a 3D image is converted to a 2D image that is rendered to the computer screen.
Public propertySpecularColorGets or sets the specular color for a material, the range of color values is from 0 to 1.
Public propertySpecularPowerGets or sets the specular power of this effect material.
Public propertyTechniquesGets a collection of techniques that are defined for this effect. (Inherited from Effect.)
Public propertyTextureGets or sets a texture to be applied by this effect.
Public propertyTextureEnabledEnables textures for this effect.
Public propertyVertexColorEnabledEnables use vertex colors for this effect.
Public propertyViewGets or sets the view matrix. Use this matrix to change the position and direction of the camera.
Public propertyWorldGets or sets the world matrix. Use this matrix to change the position of the model, using world coordinates.
Top

  NameDescription
Public methodDispose()Immediately releases the unmanaged resources used by this object. (Inherited from Effect.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the Effect and optionally releases the managed resources. (Inherited from Effect.)
Public methodEnableDefaultLightingEnables default lighting for this effect.
Protected methodFinalizeAllows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. (Inherited from Effect.)
Top

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft