GraphicsDeviceManager.PreferHalfPixelOffset Property (Microsoft.Xna.Framework)

Indicates if DX9 style pixel addressing or current standard pixel addressing should be used. This flag is set to false by default. It should be set to true for XNA compatibility. It is recommended to leave this flag set to false for projects that are not ported from XNA. This value is passed to UseHalfPixelOffset.

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public bool PreferHalfPixelOffset { get; set; }

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

Property Value

Type: System.Boolean
XNA uses DirectX9 for its graphics. DirectX9 interprets UV coordinates differently from other graphics API's. This is typically referred to as the half-pixel offset. MonoGame replicates XNA behavior if this flag is set to true.
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web