Direct2D |
Post Reply |
Author | |
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
Posted: 08 November 2008 at 6:47am |
Any plans to use Direct2D in the toolkit? Sounds much better than GDI+ rendering for markup.
CXTPGraphicBackendGDI CXTPGraphicBackendGDIplus CXTPGraphicBackendD2D http://blogs.technet.com/thomasolsen/default.aspx |
|
Codejock support
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Are you ready to ask all your customers install DirectX10.1 to allow run your application ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Hi Oleg,
therefore different backends. If Direct2D is not available then fallback to GDI or GDI+. Direct2D will also run on DirectX9 hardware. class CXTPGraphicBackend { virtual DrawLine(...) = 0; }; class CXTPGraphicBackendGDI { virtual DrawLine(...) { pDC->MoveTo(...); pDC->LineTo(...); } }; class CXTPGraphicBackendD2D { virtual DrawLine(...) { ... } }; |
|
Codejock support
|
|
evoX
Senior Member Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
|
Vista is already based on DirectX, maybe when the next version of windows will be released, and Microsoft will no longer offer support for XP, then you should move to DirectX
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Codejock support
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Another problem that we can't ask all our customers install DirectX SDK to allow compile toolkit.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Sorry Oleg,
but I don't take this argument. a) It would be ok to ask developers to install the latest Windows SDK! b) You could integrate required files into the toolkit c) You could make a compile switch / configurations d) You could make the graphic backends as separate dll's, or at least the Direct2D one. What would be wrong with a xtp1210d2d.dll ? I would vote for option d) - Build separate Direct2D graphic backend DLL (requires latest Windows / DirectX SDK) - Load DLL at runtime - Set backend |
|
Codejock support
|
|
evoX
Senior Member Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
|
I don't mind installing the DirectX SDK.
|
|
jimmy
Senior Member Joined: 11 November 2003 Location: Austria Status: Offline Points: 515 |
Post Options
Thanks(0)
|
Hello,
Does this also work with Win98 ? Because we MUST support this. Jimmy |
|
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
What advantage to CJ products other than speed (which IMO is ok now anyway)?
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Direct2D will be Vista/Win7 and maybe XP only. So under Win98 you'll have to fallback to GDI drawing. |
|
Codejock support
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Watch the PDC presentation. Better quality and speed, text rotation with DirectWrite etc. While I agree that the performance of most of the controls is ok markup rendering with GDI+ suffers from the lack of performance of GDI+ software rendering. Direct2D is about 4 times faster than GDI+, so any charts etc. based on markup rendering will be significantly faster. |
|
Codejock support
|
|
jimmy
Senior Member Joined: 11 November 2003 Location: Austria Status: Offline Points: 515 |
Post Options
Thanks(0)
|
Sure,
will be nice to have a own Draw Interface. XTPDrawer() .DrawText(...) .DrawMultiline .DrawGradient ...... without known about the background drawing machine. And all painting run over this interface. Jimmy |
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Exactly Currently the control logic, rendering and theming are not well separated. If the code would be separated well it would just be a matter of a new graphic backend to port the markup rendering to a new platform like Android or the iPhone. Instead Codejock tightly binds its business modell to aging technologies like MFC and ActiveX while not being able to deliver WinForms and WPF controls + new emerging platforms. Heck, not even a CE / Windows mobile version of the toolkit. Instead they conjure up excuses why they can't adopt new technologies like Direct2D. |
|
Codejock support
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Actually its how it works now:
void CXTPMarkupDrawingContext::DrawTextLine(LPCWSTR lpszText, UINT nCount, LPCRECT lpRect)
{ m_pDeviceContext->DrawString(lpszText, nCount, lpRect); } and there is CXTPMarkupDeviceContext + CXTPMarkupGdiPlusDeviceContext.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Hello Oleg,
CXTPMarkupDeviceContext is tightly bound to MFC/GDI (HDC, CRect, etc.), so it is not an abstract interface. CXTPMarkupGdiPlusDeviceContext is derived from CXTPMarkupDeviceContext. CXTPMarkupDrawingContext uses either CXTPMarkupDeviceContext or CXTPMarkupGdiPlusDeviceContext, but is itself bound to a HDC, so not yet ready for Direct2D. There is only a #define _XTP_EXCLUDE_GDIPLUS to decide at compile time if we want GDI or GDI+, that should be setable at runtime. What if I want GDI+ only for a single control but not for an other? There should be a default renderer as well as the option to set any renderer for any markup. CXTPMarkup::SetDefaultRenderer(...); pMarkup->SetRenderer(...); |
|
Codejock support
|
|
JerryEvans
Groupie Joined: 01 May 2008 Location: United Kingdom Status: Offline Points: 39 |
Post Options
Thanks(0)
|
I'd have to agree - it would be nice to specify the graphics engine. I'd like to be able to use AGG2D for example.
One thing worth noting with GDI+ - you will disappoint clients who run your software on Linux using WINE. The WINE project has not ported GDI+ - indeed is unlikely to do so as GDI+ is sort of an evolutionary dead end. |
|
Tomasz
Senior Member Joined: 05 August 2006 Status: Offline Points: 109 |
Post Options
Thanks(0)
|
Precisely!
MANY our customers run our applications using WINE, or Parallels (on Mac). For them, all that new things just cause compatiblity problems. As far as I am concerned, I will stop buying upgrades to XTP once Codejock starts making library incompatible with older windows/WINE/Parallels. MFC may be old but it is working, fast and compatible with everything. If somebody loves all newest and slow stuff, just use this bloated .NET. |
|
evoX
Senior Member Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
|
I think it's important for codejock to bring more customers even if a few will no longer make upgrades, it's better to lose 1 customer and win 10 new.
|
|
Product: Xtreme ToolkitPro 19.30
Platform: Windows 10 64bit Language: Visual C++ (VS 2019) |
|
WaLtI
Groupie Joined: 30 March 2008 Status: Offline Points: 16 |
Post Options
Thanks(0)
|
I have posted a Direct2D render for Markup here http://forum.codejock.com/forum_posts.asp?TID=15926. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |