예제 #1
0
 protected override void Initialize( int width,  int height)
 {
     SdlBuffer sdlBuffer = new SdlBuffer(width, height);
     Handle = sdlBuffer.Handle;
     PrimaryBuffer = sdlBuffer;
     ID = "Surface" + Handle.ToString();
 }
예제 #2
0
 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();
 }
예제 #3
0
 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();
 }
예제 #4
0
 public SdlWindowSurface(IRenderWindow window)
 {
     this.Window   = window;
     PrimaryBuffer = new SdlBuffer(Handle.ToStruct <SurfaceInfo>());
 }