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
- device
Type: Microsoft.WindowsMobile.DirectX.Direct3D.Device
A Device object to associate with the Texture.
- 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.
- usage
Type: Microsoft.WindowsMobile.DirectX.Direct3D.Usage
Usage can be 0, which indicates no usage value. However, if usage is desired, use one or more Usage constants. It is good practice to match the usage parameter with the CreateFlags in the constructor of a Device.
- format
Type: Microsoft.WindowsMobile.DirectX.Direct3D.Format
Value of a Format that describes the format of all levels in the texture.
- pool
Type: Microsoft.WindowsMobile.DirectX.Direct3D.Pool
Value of a Pool that describes the memory class into which the texture should be placed.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
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