Direct3DDevice8.CreateRenderTarget
Creates a render target surface.
object.CreateRenderTarget( _
Width As Long, _
Height As Long, _
Format As CONST_D3DFORMAT, _
MultiSample As CONST_D3DMULTISAMPLE_TYPE, _
Lockable As Long) As Direct3DSurface8
Parts
- object
- Object expression that resolves to a Direct3DDevice8 object.
- Width
- Width of the render target surface, in pixels.
- Height
- Height of the render target surface, in pixels.
- Format
- Member of the CONST_D3DFORMAT enumeration, describing the format of the render target.
- MultiSample
- Member of the CONST_D3DMULTISAMPLE_TYPE enumeration, describing the multisampling buffer type. This parameter specifies the antialiasing type for this render target. The type must be the same as that of the depth stencil buffer when both surfaces are passed to SetRenderTarget.
- Lockable
- Value indicating whether the render target surface is lockable. If set to 1, the render target is lockable. If set to 0, it is unlockable. Note that lockable render targets incur a performance cost on some graphics hardware.
Return Values
A Direct3DSurface8 object, representing the render target surface.
Remarks
Render target surfaces are placed in the D3DPOOL_DEFAULT memory class.
Error Codes
If the method fails, an error is raised and Err.Number can be set to one of the following values.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.