コード例 #1
0
 public void PushTexture(IntPtr from, int size)
 {
     if (_buffer != null)
     {
         Resize(size);
         //if (_buffer.AcquireWriteLock(10000)) { //don't wait on write lock, no VSync needed
         CopyMemory(_buffer.UnsafeDataPointer(), from, (uint)size);
         _buffer.ReleaseWriteLock();
     }
 }
コード例 #2
0
 //////////Added//////////
 public void UpdateInitialized()
 {
     if (Initialized)
     {
         if (_mainTexArray.AcquireReadLock(0))
         {
             _mainTexArray.MarkProcessed();
             if (_mainTexArray.Length > 0)
             {
                 BrowserTexture.LoadRawTextureData(_mainTexArray.UnsafeDataPointer(), _mainTexArray.Length);
                 BrowserTexture.Apply();
             }
             _mainTexArray.ReleaseReadLock();
         }
         else
         {
             int i = 0;
         }
     }
 }