Share via


PrtBuffer.PrtBuffer(Int32,Int32,Int32,Int32) Constructor (Microsoft.DirectX.Direct3D)

Initializes a new instance of the PrtBuffer class.

Definition

Visual Basic Public Sub New( _
    ByVal width As Integer, _
    ByVal height As Integer, _
    ByVal numberCoefficients As Integer, _
    ByVal numberChannels As Integer _
)
C# public PrtBuffer(
    int width,
    int height,
    int numberCoefficients,
    int numberChannels
);
C++ public:
 PrtBuffer(
    int width,
    int height,
    int numberCoefficients,
    int numberChannels
);
JScript public function PrtBuffer(
    width : int,
    height : int,
    numberCoefficients : int,
    numberChannels : int
);

Parameters

width System.Int32
Width of the texture, in pixels
height System.Int32
Height of the texture, in pixels.
numberCoefficients System.Int32
Number of coefficients per sample location. When using spherical harmonic (SH) precomputed radiance transfer (PRT), the number of coefficients should be Order2, where Order is the order of the SH evaluation. Order must be in the range of SphericalHarmonics.MinimumOrder to SphericalHarmonics.MaximumOrder, inclusive. The degree of the evaluation is Order - 1.
numberChannels System.Int32
Number of color channels to set in the mesh. Set to 1 to specify gray materials (R = G = B), or 3 to enable color bleeding effects.

Remarks

The PrtBuffer constructor creates a PRT buffer that can be compressed or filled by a simulator. This method creates per-pixel, per-vertex, or volume buffers.

When the buffer is created, all values are initialized to zero.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.

OutOfMemoryExceptionLeave Site

Microsoft Direct3D could not allocate sufficient memory to complete the call.