dwmkerr / sharpgl

Use OpenGL in .NET applications. SharpGL wraps all modern OpenGL features and offers a powerful scene graph to aid development.
MIT License
770 stars 300 forks source link

Enhance WPF rendering #218

Closed ftlPhysicsGuy closed 1 year ago

ftlPhysicsGuy commented 1 year ago

Enhances render speed in WPF projects by adding an option to use a WriteableBitmap. The control holds a WriteableBitmap along with a few other fields that keep up with information used when filling the WriteableBitmap (e.g., size, resolution, and pixel format). A new method then copies pixels from the image buffer to the bitmap when rendering. The new render method can be turned on or off using a new DependencyProperty: UseWriteableBitmapForRendering. Test indicate that frame rate can be improved by 25-50% when using the new render method, which also avoids constant GC requirements.

codecov[bot] commented 1 year ago

Codecov Report

Merging #218 (8fb3a1e) into master (a37721c) will not change coverage. The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #218   +/-   ##
======================================
  Coverage    3.16%   3.16%           
======================================
  Files          90      90           
  Lines        3697    3697           
  Branches      657     657           
======================================
  Hits          117     117           
  Misses       3575    3575           
  Partials        5       5           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

dwmkerr commented 1 year ago

Really cool thanks for the addition @ftlPhysicsGuy