Exemplo n.º 1
0
        private ITextureHandle RegisterNewTexture(Texture texture)
        {
            // Configure newly created TextureHandle to reflect Texture's properties on GPU (allocate buffers)
            ITextureHandle textureHandle = _renderContextImp.CreateTexture(texture);

            // Setup handler to observe changes of the texture data and dispose event (deallocation)
            texture.TextureChanged += TextureChanged;

            _identifierToTextureHandleDictionary.Add(texture.SessionUniqueIdentifier, textureHandle);

            return(textureHandle);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Call this method on the main thread after RenderContext.Render in order to cleanup all not used Buffers from GPU memory.
 /// </summary>
 public void Cleanup()
 {
     if (_toBeDeletedTextureHandles == null || _toBeDeletedTextureHandles.Count == 0)
     {
         return;
     }
     while (_toBeDeletedTextureHandles.Count > 0)
     {
         ITextureHandle tobeDeletedTextureHandle = _toBeDeletedTextureHandles.Pop();
         Remove(tobeDeletedTextureHandle);
     }
 }
Exemplo n.º 3
0
 private void Remove(ITextureHandle textureHandle)
 {
     _renderContextImp.RemoveTextureHandle(textureHandle);
 }
Exemplo n.º 4
0
 public void SetCubeMapRenderTarget(ITextureHandle texture, int position)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public void SetShaderParamTexture(IShaderParam param, ITextureHandle texId)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 6
0
 public void GetBufferContent(Rectangle quad, ITextureHandle texId)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 7
0
 public void SetRenderTarget(ITextureHandle texture)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 8
0
 public void CopyDepthBufferFromDeferredBuffer(ITextureHandle texture)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 9
0
 public void RemoveTextureHandle(ITextureHandle textureHandle)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 10
0
 public void UpdateTextureRegion(ITextureHandle tex, ITexture img, int startX, int startY, int width, int height)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 11
0
 public void UpdateTextureFromVideoStream(IVideoStreamImp stream, ITextureHandle tex)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 12
0
 public void SetShaderParamTexture(IShaderParam param, ITextureHandle texId, GBufferHandle gHandle)
 {
     throw new NotImplementedException();
 }