Hello,
I am creating a very demanding application with several vertically stacked charts. I would like to use the best approach for using brushes / pens / sprites and textures.
- Can I leave the resources between render passes or do I have to always dispose it after a render pass?
- Which method is the most performant when drawing images? Should I use ISprite2d or ITexture2d. Is the DrawSprites the most performant?
- Hello Blazej, Thanks for your questions. We are to discuss them and will get back to you as soon as we have an update. Kind regards, Les, SciChart Technical Support Engineer
- You must login to post comments
Hello Blazej,
We discussed your inquiry.
1. It is fine to cache resources like IPen2D, IBrush2D, ISprite2D so they can be reused in multiple render passes. Just make sure they are disposed eventually.
- It depends on multiple conditions. In general, you should use Sprites if you want to create an object once and cache it, then draw it multiple times (like XyScatterRenderableSeries in SciChart).
Here is a corresponding article:
SciChart WPF Documentation – The Scatter Series Type | WPF Chart Documentation
On the other hand, if you have an object that changes frequently, it is better to create an ITexture2D, then update it regularly and render.
Also, please keep in mind that creationing of any resources is very time-consuming, so you want to minimize creation to achieve the best performance.
Kind regards,
Lex,
SciChart Technical Support Engineer
- Lex answered 8 months ago
- You must login to post comments
Hey,
Thank you for the reply!
That totally makes sense.
One last question is “having representations of the same image being a sprite and a texture, is one drawn faster over the other?”
- [email protected] answered 8 months ago
- last edited 8 months ago
- You must login to post comments
Please login first to submit.