protected override void Initialize( int width, int height) { SdlBuffer sdlBuffer = new SdlBuffer(width, height); Handle = sdlBuffer.Handle; PrimaryBuffer = sdlBuffer; ID = "Surface" + Handle.ToString(); }
internal void Initialize(int width, int height, IntPtr buffer, int bufferLength) { SdlBuffer sdlBuffer = new SdlBuffer((int*)buffer, width, height); Handle = sdlBuffer.Handle; PrimaryBuffer = sdlBuffer; ID = "Surface" + Handle.ToString(); }
protected sealed override void ResetDataInternally(int width, int height) { var newBuffer = new SdlBuffer(width, height); var srcRc = this.CompitibleRC(null, null, width, height); PrimaryBuffer.CopyMemoryTo(newBuffer, srcRc, 0, 0); PrimaryBuffer.Dispose(); PrimaryBuffer = newBuffer; Handle = newBuffer.Handle; ID = "Surface" + Handle.ToString(); }
public SdlWindowSurface(IRenderWindow window) { this.Window = window; PrimaryBuffer = new SdlBuffer(Handle.ToStruct <SurfaceInfo>()); }