Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Performance Issues with Direct 2d

25 views
Skip to first unread message

listechtony

unread,
Oct 22, 2009, 12:31:01 AM10/22/09
to
Hi

I have populated some path geometry with 100000 lines (not joined together)
and am finding that when it comes to rendering, the EndDraw is taking up to
30 seconds to complete. This is obviously unacceptable. Am I missing
something obvious here, since I was expecting Direct 2d to be fast.

I am running it on Vista, not sure if that is important.

m_pRenderTarget->BeginDraw();
m_pRenderTarget->Clear(D2D1::ColorF(D2D1::ColorF::White));
m_pRenderTarget->SetTransform(m_Transform);

m_pRenderTarget->DrawGeometry(m_pPathGeometry, m_pLightSlateGrayBrush);
hr = m_pRenderTarget->EndDraw();

This is obviously unacceptable. Am I missing something obvious here, since I
was expecting Direct 2d to be fast.

I am running it on Vista, not sure if that is important.

Richard [Microsoft Direct3D MVP]

unread,
Oct 22, 2009, 2:04:36 PM10/22/09
to
[Please do not mail me a copy of your followup]

=?Utf-8?B?bGlzdGVjaHRvbnk=?= <liste...@discussions.microsoft.com> spake the secret code
<5A8E4F06-A159-4D6A...@microsoft.com> thusly:

Did you compare what you are doing to what is being done in the
geometry realization sample? The source is in the Windows 7 SDK.
<http://msdn.microsoft.com/en-us/library/dd756659(VS.85).aspx>
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

listechtony

unread,
Oct 22, 2009, 6:27:01 PM10/22/09
to
I did use the realization sample too, but that didn't help performance much.
It depends though on how you mean me to use the realization sample. In that
case, they have a simple geometry transformed and copied many times, whereas
my geometry consists of many lines of differing lengths and positions with
the one transform applied to the lot. I'm not sure I can simplify the
geometry, unless every line is a geometry and I have heaps of small
geometries (actually I am going to have to think about that if I use Direct
2d, since the lines will have different colors too). Any thoughts?


"Richard [Microsoft Direct3D MVP]" wrote:

> [Please do not ail me a copy of your followup]

> .
>

0 new messages