DirectX 9 without HWND

Started by
1 comment, last by LeGreg 15 years, 7 months ago
Hi everyone, I'm trying to write a simple GPGPU application and ideally I don't need to output anything to the screen. I just want to set an effect, set the input data (some textures) and render everything to the output data (another texture, not the screen). Can DirectX 9 Graphics work without a valid window handle? And if not, should I create a window and leave it invisible? How do DirectX 10 and 11 behave under this point of view? And OpenGL? There are also other cases in which you wouldn't need to output anything to the screen, for instance if you are writing an offline renderer (maybe some sort of 3D model previewer for web sites). Thank you in advance for your help! Dario
Advertisement
I don't believe you can seperate them fully. Direct3D hooks into the message pump to monitor the lifecycle of the application so it'd probably get quite confused if you didn't have one of those [smile]

I don't think D3D10 or D3D11 change much in this regard. I have no knowledge of OpenGL's abilities in this area unfortunately.

That said, I think people have done work-arounds involving 1x1 windows with no border and/or invisible and/or off the side of the screen.

This is also one of the reasons why running a server-side Windows Service utilizing Direct3D is often impossible iirc.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Quote:Original post by damix911
Hi everyone, I'm trying to write a simple GPGPU application and ideally I don't need to output anything to the screen. I just want to set an effect, set the input data (some textures) and render everything to the output data (another texture, not the screen). Can DirectX 9 Graphics work without a valid window handle? And if not, should I create a window and leave it invisible? How do DirectX 10 and 11 behave under this point of view? And OpenGL?

There are also other cases in which you wouldn't need to output anything to the screen, for instance if you are writing an offline renderer (maybe some sort of 3D model previewer for web sites).


Cuda was made for you.

LeGreg

This topic is closed to new replies.

Advertisement