|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DirectX rendered inside a control?virtually non-existant. If anyone can suggest where else I can post this with better results, please let me know... DirectX uses a completely different paradigm than what I'm used to painting forms normally with GDI+. From what I can tell, you cannot have a "DirectX control", but rather you have to pass a handle to an entire form, and then the rendering is done on the form itself. My first tries have lead me to beileve that I just can't incoprorate hardware-accelerated rendering into an application with other windows controls, especially not if I want the render area to be contained in a panel or other control. If this is true DirectX would seem to be a completely unworkable tool to use in standard WinForms applications. Anyone want to share their own points of view, experiences using DirectX in non-gaming applications? TIA, Paul P.S. I'm using the version 10 SDK "PJ6" <no***@nowhere.net> kirjoitti viestissä:uoL$c%237xGHA.2***@TK2MSFTNGP05.phx.gbl...<snip> > DirectX uses a completely different paradigm than what I'm used to You can render to panel etc. just fine with DirectX. When you create Device > painting forms normally with GDI+. From what I can tell, you cannot have a > "DirectX control", but rather you have to pass a handle to an entire form, > and then the rendering is done on the form itself. My first tries have > lead me to beileve that I just can't incoprorate hardware-accelerated > rendering into an application with other windows controls, especially not > if I want the render area to be contained in a panel or other control. just pass it a control you wanna render into. <snip> "cSharpLess" <no@mails.invalid> wrote in message I get a very unhelpful error message when I try that (as opposed to just news:OaCBEs8xGHA.3608@TK2MSFTNGP06.phx.gbl... > You can render to panel etc. just fine with DirectX. When you create > Device just pass it a control you wanna render into. > > <snip> passing the form handle). If you're feeling generous, please post a simple class inheriting from Control that renders something using DirectX 10. Thanks, Paul AFAIK DX10 is not usable from Managed Code yet ? Or do I miss something ?
IMO it's generally better to mention the exact error message you have (the debug runtime can also be helpfull) and that you provide the simplest possible code that repro the error if needed. A sample won't do exactly what you want and could not include som other point that causes the problem... You can try microsoft.public.win32.programmer.directx.managed if you don"t have tried it already.... -- Patrice "PJ6" <no***@nowhere.com> a écrit dans le message de news: uB5KAx9xGHA.3***@TK2MSFTNGP06.phx.gbl...Show quoteHide quote > "cSharpLess" <no@mails.invalid> wrote in message > news:OaCBEs8xGHA.3608@TK2MSFTNGP06.phx.gbl... >> You can render to panel etc. just fine with DirectX. When you create >> Device just pass it a control you wanna render into. >> >> <snip> > > I get a very unhelpful error message when I try that (as opposed to just > passing the form handle). > > If you're feeling generous, please post a simple class inheriting from > Control that renders something using DirectX 10. > > Thanks, > Paul > Ahh now we're getting somewhere. I thought something was wrong when I
blue-screened myself. Well, after I had a good laugh. I'll back up, uninstall 10 and go with 9. Good NG suggestion, too. Thank you! Paul Show quoteHide quote "Patrice" <scr***@chez.com> wrote in message news:elkK50ByGHA.4232@TK2MSFTNGP05.phx.gbl... > AFAIK DX10 is not usable from Managed Code yet ? Or do I miss something ? > > IMO it's generally better to mention the exact error message you have (the > debug runtime can also be helpfull) and that you provide the simplest > possible code that repro the error if needed. > > A sample won't do exactly what you want and could not include som other > point that causes the problem... > > You can try microsoft.public.win32.programmer.directx.managed if you don"t > have tried it already.... > > -- > Patrice "PJ6" <no***@nowhere.com> kirjoitti viestissä:uB5KAx9xGHA.3***@TK2MSFTNGP06.phx.gbl...<snip> > If you're feeling generous, please post a simple class inheriting from Ahhh, I missed that DX10 part :)> Control that renders something using DirectX 10. |
|||||||||||||||||||||||