Exemplo n.º 1
0
        public void Process(object sender, MessageQueueEventArgs e)
        {
#if !SINGLE_THREADED
            _context.MakeCurrent();
#endif

            ShapefileRequest request = (ShapefileRequest)e.Message;
            ShapefileRenderer shapefile = new ShapefileRenderer(
                request.Filename, _context, _globeShape, request.Appearance);

#if !SINGLE_THREADED
            Fence fence = Device.CreateFence();
            while (fence.ClientWait(0) == ClientWaitResult.TimeoutExpired)
            {
                Thread.Sleep(10);   // Other work, etc.
            }
#endif

            _doneQueue.Post(shapefile);
        }
Exemplo n.º 2
0
 public void ProcessNewShapefile(object sender, MessageQueueEventArgs e)
 {
     _shapefiles.Add((IRenderable)e.Message);
 }