Condividi tramite


Struttura MaterialFixed

Aggiornamento: novembre 2007

Specifica le proprietà del materiale in una struttura a virgola fissa.

Spazio dei nomi:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Sintassi

'Dichiarazione
Public Structure MaterialFixed
'Utilizzo
Dim instance As MaterialFixed
public struct MaterialFixed
public value class MaterialFixed
JScript supporta l'utilizzo di strutture ma non la dichiarazione di nuove.

Note

Questa struttura fornisce il supporto per operazioni matematiche a virgola fissa.

Esempi

Nell'esempio di codice riportato di seguito viene illustrato come utilizzare una struttura MaterialFixed.

' The following code example is from the
' Direct3D Mobile Meshes Sample of the 
' .NET Compact Framework Samples in the SDK.

' In this example, meshes are divided into subsets, 
' one for each material.
' Render them in a loop.
Dim i As Integer
For i = 0 To meshMaterials.Length
    ' Set the material and texture for this subset
    device.MaterialFixed = meshMaterials(i)
    device.SetTexture(0, meshTextures(i))

    ' Draw the mesh subset
    mesh.DrawSubset(i)
Next i
// The following code example is from the
// Direct3D Mobile Meshes Sample of the
// .NET Compact Framework Samples in the SDK.

// Meshes are divided into subsets, one for each material. Render them in
// a loop
for( int i=0; i<meshMaterials.Length; i++ )
{
    // Set the material and texture for this subset
    device.MaterialFixed = meshMaterials[i];
    device.SetTexture(0, meshTextures[i]);

    // Draw the mesh subset
    mesh.DrawSubset(i);
}

Codice thread safe

Qualsiasi membro static (Shared in Visual Basic) pubblico di questo tipo è thread-safe. I membri di istanza non sono garantiti come thread-safe.

Piattaforme

Windows CE, Windows Mobile per Smartphone, Windows Mobile per Pocket PC

.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Informazioni sulla versione

.NET Compact Framework

Supportato in: 3.5, 2.0

Vedere anche

Riferimenti

Membri MaterialFixed

Spazio dei nomi Microsoft.WindowsMobile.DirectX.Direct3D

Altre risorse

Programmazione per Mobile Direct3D in .NET Compact Framework