Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

Framerate artificially capped by WPF #3

@code-beans

Description

@code-beans

Hey,
first of all thanks for that great wpf control. I had way to many problems using MS' Interop library.

I am currently looking into rendering performance. Consider a barebone wpf application using the WpfSharpDxControl with an empty Render() method. In my understanding the framerate is determined by the number of calls of CompositionTarget.Rendering invoked internally by wpf.
I did a little bit of testing and found out, that the will be somewhere around ~20-60 fps even with HardwareAcceleration (RenderCapacity.Tier 2) enabled.
Now when putting the render call OnCompositionTargetRendering in a while(true) loop on a different thread I get framerates in >300 fps. Unfortunately I do get a ton of exceptions when the Resize event is raised.

Did you try to implement a renderloop other than (un-)subscribing to the CompositionTarget.Rendering event. Or do you know any reason why rendering has to be done that way? Did you do some profiling on your end regarding framerates?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions