Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Direct2D
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Direct2D

 Post Reply Post Reply
Author
Message
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Topic: Direct2D
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2008 at 2:35am

Hi,

Are you ready to ask all your customers install DirectX10.1 to allow run your application ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2008 at 5:55am
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
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2008 at 10:33am
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
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2008 at 10:35am
Codejock support
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2008 at 11:27am

Hi,

Another problem that we can't ask all our customers install DirectX SDK to allow compile toolkit.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2008 at 11:41am
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
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2008 at 11:47am
I don't mind installing the DirectX SDK.
 
Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 9:07am
Hello,

Does this also work with Win98 ?
Because we MUST support this.

  Jimmy

Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 10:08am
What advantage to CJ products other than speed (which IMO is ok now anyway)?
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 10:13am
Originally posted by jimmy jimmy wrote:

Hello,

Does this also work with Win98 ?
Because we MUST support this.

  Jimmy



Direct2D will be Vista/Win7 and maybe XP only. So under Win98 you'll have to fallback to GDI drawing.

Codejock support
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 10:15am
Originally posted by ijwelch ijwelch wrote:

What advantage to CJ products other than speed (which IMO is ok now anyway)?


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
Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 10:44am
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

Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 11:14am
Originally posted by jimmy jimmy wrote:

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



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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 3:27pm
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
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2008 at 4:52pm
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
Back to Top
JerryEvans View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2008
Location: United Kingdom
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote JerryEvans Quote  Post ReplyReply Direct Link To This Post Posted: 21 November 2008 at 7:14am
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.
Back to Top
Tomasz View Drop Down
Senior Member
Senior Member


Joined: 05 August 2006
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tomasz Quote  Post ReplyReply Direct Link To This Post Posted: 21 November 2008 at 9:29pm
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.

Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2008 at 11:57am
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)
Back to Top
WaLtI View Drop Down
Groupie
Groupie


Joined: 30 March 2008
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaLtI Quote  Post ReplyReply Direct Link To This Post Posted: 28 December 2009 at 8:30am

I have posted a Direct2D render for Markup here http://forum.codejock.com/forum_posts.asp?TID=15926.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.