public static unsafe bool SetDataByMapping(this IBuffer buffer, IPclWorkarounds pclWorkarounds, byte[] data) { bool result; fixed (byte* pData = data) result = SetDataByMapping(buffer, pclWorkarounds, (IntPtr)pData); return result; }
public GpuMipCalculator(IPclWorkarounds pclWorkarounds, IClientSettings settings, IContext context) { this.pclWorkarounds = pclWorkarounds; fullTextureProcessor = new FullTextureProcessor(settings, context, FragmentShaderText, new[] { "Source" }); framebuffer = context.Create.Framebuffer(); mipInfoBuffer = context.Create.Buffer(BufferTarget.UniformBuffer, 16, BufferUsageHint.DynamicDraw); sampler = context.Create.Sampler(); }
public CpuSideCodec(IPclWorkarounds pclWorkarounds, ByteArrayPool byteArrayPool) { this.pclWorkarounds = pclWorkarounds; this.byteArrayPool = byteArrayPool; partInfoArrayPool = new Pool<PartInfo[]>(() => new PartInfo[PartCount]); dottedEncodingReadLut = new byte[DottedEncoding.ReadLutSize]; fixed (byte* pReadLut = dottedEncodingReadLut) DottedEncoding.BuildReadLut(pReadLut); }
public TcpStreamReceiver(IPclWorkarounds pclWorkarounds, IClientSettings settings, ByteArrayPool byteArrayPool) { this.byteArrayPool = byteArrayPool; primaryHostname = settings.PrimaryTcpHostName; secondaryHostname = settings.SecondaryTcpHostName; port = settings.TcpPort; tcpClient = pclWorkarounds.CreateTcpClient(); metaDataBuffer = new byte[4]; tcpClient.NoDelay = true; }
public MainLoop(IPclWorkarounds pclWorkarounds, IClientStatistics statistics, IClientSettings settings, IContext context, IRavcGameWindow gameWindow, IMainThreadBorderStage mainThreadBorderStage, IFinalFrameProvider finalFrameProvider, IClientStatisticsRenderer statisticsRenderer, ITextureLoader textureLoader) { this.settings = settings; this.context = context; this.statistics = statistics; this.gameWindow = gameWindow; this.mainThreadBorderStage = mainThreadBorderStage; this.finalFrameProvider = finalFrameProvider; this.statisticsRenderer = statisticsRenderer; finalRenderer = new FinalRenderer(pclWorkarounds, settings, context); cursorRenderer = new CursorRenderer(settings, context, textureLoader); stopwatch = new Stopwatch(); }
public static bool SetDataByMapping(this IBuffer buffer, IPclWorkarounds pclWorkarounds, IntPtr data) { var pMapped = buffer.Map(0, buffer.SizeInBytes, MapAccess.Write | MapAccess.InvalidateBuffer); pclWorkarounds.CopyBulk(pMapped, data, buffer.SizeInBytes); return buffer.Unmap(); }
public GpuFinalDecoder(IPclWorkarounds pclWorkarounds, IClientSettings settings, IContext context) { this.pclWorkarounds = pclWorkarounds; fullTextureProcessor = new FullTextureProcessor(settings, context, FragmentShaderText, new[] { "DiffTexture", "PrevTextureDetailed", "PrevTextureMip" }); framebuffer = context.Create.Framebuffer(); mipInfoBuffer = context.Create.Buffer(BufferTarget.UniformBuffer, 16, BufferUsageHint.DynamicDraw); sampler = context.Create.Sampler(); }