Example #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (handle != null)
     {
         gbm_device_destroy(handle);
     }
     handle = null;
 }
Example #2
0
 public Device(int gpu)
 {
     this.gpu = gpu;
     handle   = gbm_create_device(this.gpu);
     if (handle == null)
     {
         throw new NotSupportedException("[GBM] device creation failed.");
     }
 }
Example #3
0
        public Device(gbm_device *handle)
        {
            if (handle == null)
            {
                throw new NotSupportedException("[GBM] device creation failed.");
            }
            this.handle = handle;

            this.gpu = this.DeviceGetFD();
        }
Example #4
0
 static extern gbm_surface *gbm_surface_create_with_modifiers(gbm_device *deviceHandle, uint width, uint height, SurfaceFormat format, ulong *modifiers, uint count);
Example #5
0
 static extern gbm_surface *gbm_surface_create(gbm_device *deviceHandle, uint width, uint height, SurfaceFormat format, SurfaceFlags flags);
Example #6
0
 static extern nint gbm_device_get_backend_name(gbm_device *handle);
Example #7
0
 static extern bool gbm_device_is_format_supported(gbm_device *handle, SurfaceFormat format, SurfaceFlags flags);
Example #8
0
 static extern int gbm_device_get_fd(gbm_device *handle);
Example #9
0
 static extern void gbm_device_destroy(gbm_device *handle);