Re: Drawing DirectX surface to an Image (possible?)



For the flicker you experience, try setting the DoubleBuffered property to
true, it should help. Other than that, it's perfectly normal you get this
kind of behavior because you seem to use the graphics object which is GDI+
and is not hardware accelerated (on most adapters), with what you get as a
result...

Tought, I'd be interested to know how you do get the rendered image to the
graphics object... I'm actually trying to do pretty much the same thing,
only I want to stream the image as a jpeg into a web site... so it
definitely need to render offscreen and I don't know how to do that... I
know what you're doing is probably under copyright laws, but if it's not,
would you mind sending me the code for just this part? and if it is under
copyright, would you be kind enough to do a small sample of what you need to
do to achieve this (and send it here, by e-mail or a link to a web page)?

thanks

ThunderMusic

"Michael Brown" <mikeb@xxxxxxxxxxxxxx> wrote in message
news:1160546179.853174.179740@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Anyone know if it's possible to get a directx device to draw to an
Image instead of a control/form handle?

I've been given a task that seems harder than it looks.. I have a form
which contains no controls, and draws everything in the OnPaint event.
I need to draw directx output during the OnPaint in the graphics object
(don't ask why)... I tried dynamically creating a panel and adding it
to the form, but it flickers horribly because of other things drawn
during the OnPaint event. I'm not sure how get the panel to draw itself
after other things are drawn on the form, it just flickers badly. I'm
gonna try clipping the area but I would rather draw in an area on the
form itself instead of adding a panel control and passing the
handle....


Hopefully I explained that properly lol...


-Mike



.



Relevant Pages

  • No double-buffering on a Panel?
    ... I would like to draw to a Panel, but it flickers like crazy when resized. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Flickering of gradient rectangle
    ... But is still flickers when I resize ... public partial class PanelEx: Panel ... flags and use this control to draw your gradient... ... The problem is that when I resize the window (in my test app the panel ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Flickering of gradient rectangle
    ... But is still flickers when I resize ... public partial class PanelEx: Panel ... The problem is that when I resize the window (in my test app the panel ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: User drawn custom control flickers when moved
    ... I'm developing a custom winforms control that uses the Graphics objects to ... draw itself to the default UserControl panel. ... draw some very basic things, it flickers when I move ... I can see some tearing in the control's image (or whatever ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: smooth progress bar flickering
    ... > values in a row quickly of it and watch it on screen it flickers... ... If you are clearing the drawing area every time you draw a new ...
    (microsoft.public.dotnet.languages.vb)