Share via


Texture Constructor

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Initializes a new instance of the Texture class.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Sub New ( _
    device As Device, _
    width As Integer, _
    height As Integer, _
    numLevels As Integer, _
    usage As Usage, _
    format As Format, _
    pool As Pool _
)
'Usage
Dim device As Device
Dim width As Integer
Dim height As Integer
Dim numLevels As Integer
Dim usage As Usage
Dim format As Format
Dim pool As Pool

Dim instance As New Texture(device, _
    width, height, numLevels, usage, format, _
    pool)
public Texture(
    Device device,
    int width,
    int height,
    int numLevels,
    Usage usage,
    Format format,
    Pool pool
)
public:
Texture(
    Device^ device, 
    int width, 
    int height, 
    int numLevels, 
    Usage usage, 
    Format format, 
    Pool pool
)
new : 
        device:Device * 
        width:int * 
        height:int * 
        numLevels:int * 
        usage:Usage * 
        format:Format * 
        pool:Pool -> Texture

Parameters

  • width
    Type: System.Int32
    Width of the texture's top level, in pixels. The pixel dimensions of subsequent levels are the truncated value of half of the previous level's pixel dimension (independently). Each dimension clamps at a size of one pixel. Thus, if the division by 2 results in 0, 1 is taken instead.
  • height
    Type: System.Int32
    Height of the texture's top level, in pixels. The pixel dimensions of subsequent levels are the truncated value of half of the previous level's pixel dimension (independently). Each dimension clamps at a size of one pixel. Thus, if the division by 2 results in 0, 1 is taken instead.
  • numLevels
    Type: System.Int32
    Number of levels in the texture. If this is 0, Direct3D generates all texture sublevels down to 1-by-1 pixels for hardware that supports mipmapped textures. Check the BaseTexture.LevelCount property to see the number of levels generated.

Exceptions

Exception Condition
InvalidCallException

The method call is invalid. For example, a parameter may contain an invalid value.

OutOfMemoryException

Direct3D could not allocate sufficient memory to complete the call.

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Texture Class

Texture Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace