Texture2D Constructor (GraphicsDevice, Int32, Int32, Boolean, SurfaceFormat)
Creates a new instance of this object.
Syntax
'Declaration
Public Sub New ( _
graphicsDevice As GraphicsDevice, _
width As Integer, _
height As Integer, _
mipMap As Boolean, _
format As SurfaceFormat _
)
public Texture2D (
GraphicsDevice graphicsDevice,
int width,
int height,
bool mipMap,
SurfaceFormat format
)
public:
Texture2D(
GraphicsDevice graphicsDevice,
int width,
int height,
bool mipMap,
SurfaceFormat format
)
Parameters
- graphicsDevice
Type: GraphicsDevice
The device. - width
Type: Int32
Texture width. - height
Type: Int32
Texture height. - mipMap
Type: Boolean
[MarshalAsAttribute(U1)] True to generate a full mipmap chain; false otherwise. - format
Type: SurfaceFormat
Texture data format.
Exceptions
Exception type | Condition |
---|---|
NotSupportedException | One or more of the following is true:
|
Requirements
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
See Also
Reference
Texture2D Class
Texture2D Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows Phone