Ich möchte mein Surface (nein nicht das man kaufen kann) also das von
DirectX in einen Stream(TStream) kopieren.
Ich finde nur Möglichkeiten unter SlimDX
Zitat:
DataRectangle dr = s.LockRectangle(LockFlags.None);
DataStream gs = dr.Data;
Ich möchte das aber unter Delphi bewerkstelligen.
DirectX
Was fehlt mir da ..
SDK SlimDX
Code:
namespace SlimDX
{
// Summary:
// A DataRectangle provides supporting information for a SlimDX.DataStream whose
// data is organized within two dimensions (a rectangle).
public class DataRectangle
{
// Summary:
// Initializes a new instance of the SlimDX.DataRectangle class.
//
// Parameters:
// pitch:
// The row pitch, in bytes.
//
// data:
// The data.
public DataRectangle(int pitch, DataStream data);
// Summary:
// Gets the SlimDX.DataStream containing the actual data bytes.
public DataStream Data { get; }
//
// Summary:
// Gets or sets the number of bytes of data between two consecutive (1D) rows
// of data.
public int Pitch { get; set; }
}
}
Code:
// Summary:
// Reads a sequence of bytes from the current stream and advances the position
// within the stream by the number of bytes read.
//
// Parameters:
// buffer:
// An array of values to be read from the stream.
//
// offset:
// The zero-based byte offset in buffer at which to begin storing the data read
// from the current stream.
//
// count:
// The maximum number of bytes to be read from the current stream.
//
// Returns:
// The number of bytes read from the stream.
//
// Exceptions:
// System.NotSupportedException:
// This stream does not support reading.
//
// System.ArgumentNullException:
// buffer is a null reference.
//
// System.ArgumentOutOfRangeException:
// offset or count is negative.
//
// System.ArgumentException:
// The sum of offset and count is greater than the buffer length.
public override int Read(byte[] buffer, int offset, int count);
gruss