public void updateTexture(AnimatedCursorTexture texture) { textureVariable.Set(texture.texture); TimeSpan now = timers[animationTimer]; lastFrameSwitch = lastRendered = now; animatedConstants.frame = 0; frameDuration = texture.frameDuration; animationFrames = texture.animationFrames; }
protected void drawTriangle(IDeviceContext ic, ITextureView textureView) { ic.SetPipelineState(pipelineState); textureVariable.Set(textureView); ic.CommitShaderResources(binding); ic.setVertexBuffer(vertexBuffer); DrawAttribs draw = new DrawAttribs(false) { NumVertices = 3, Flags = DrawFlags.VerifyAll }; ic.Draw(ref draw); }
public void render(IDeviceContext context, ITextureView rtv, CSize outputSize, int index) { // Setup stuff context.SetRenderTarget(rtv, null); context.setViewport(outputSize, viewport); context.SetPipelineState(pipelineState); textureVariable.Set(sourceTextures[index]); context.CommitShaderResources(binding); // Render a full-screen triangle, no vertex buffer needed DrawAttribs draw = new DrawAttribs(false) { NumVertices = 3, Flags = DrawFlags.VerifyAll }; context.Draw(ref draw); }
public void updateTexture(MonochromeCursorTexture texture) { textureVariableRgb.Set(texture.texture); textureVariableInvert.Set(texture.texture); }
public void updateTexture(StaticCursorTexture texture) { textureVariable.Set(texture.texture); }