Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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;
        }
Esempio n. 5
0
 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();
 }
Esempio n. 6
0
 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();
 }
Esempio n. 7
0
 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();
 }