Device.Reset Method
Resets the presentation parameters for the current device.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
Syntax
'Declaration
Public Sub Reset ( _
presentationParameters As PresentParameters _
)
'Usage
Dim instance As Device
Dim presentationParameters As PresentParameters
instance.Reset(presentationParameters)
public void Reset (
PresentParameters presentationParameters
)
public:
void Reset (
PresentParameters^ presentationParameters
)
public void Reset (
PresentParameters presentationParameters
)
public function Reset (
presentationParameters : PresentParameters
)
Parameters
- presentationParameters
A PresentParameters structure that describes the new presentation parameters. This value cannot be null.
Exceptions
Exception type | Condition |
---|---|
The method call is invalid. For example, a parameter might contain an invalid value. |
|
Internal driver error. Applications should generally shut down when receiving this error. |
|
Direct3D could not allocate sufficient memory to complete the call. |
Remarks
When switching to full-screen mode, Direct3D tries to find a desktop format that matches the back buffer format so that back and front buffer formats are identical. This eliminates the need for color conversion.
If a call to Reset fails, the device is placed in the "lost" state as indicated by a return value of false from a call to CheckCooperativeLevel unless it is already in the "not reset" state as indicated by a DeviceNotReset returned from the hResult parameter of the CheckCooperativeLevel method.
Calling Reset causes all texture memory surfaces and state information to be lost, and managed textures to be flushed from video memory. Before calling Reset for a device, an application should release any explicit render targets, depth stencil surfaces, additional swap chains, state blocks, and default resources associated with the device.
Swap chains are either full-screen or windowed. If the new swap chain is full-screen, the adapter is placed in the display mode that matches the new size.
A call to Reset fails if made on a different thread than the one used to create the device being reset.
Unknown can be specified for the windowed mode back buffer format when calling Device, Reset, and SwapChain. This means the application does not have to query the current desktop format before calling Device for windowed mode. For full-screen mode, the back buffer format must be specified. Setting BackBufferCount to 0 creates one back buffer.
When trying to reset more than one display adapter in a group, pass in an array of PresentParameters objects, one for each display in the adapter group.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Device Class
Device Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace