Jump to content
  • Advertisement
Sign in to follow this  
yurixd

CreateDevice without window and backbuffer??

This topic is 4772 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This question it would be easy for you...but not for me IS it possible to create a device without define a backbuffer and a window? Imagine that the only want is to operate with grey image data with the Graphic card, but I dont need to show it in a window and i don-t need a backbuffer, the only thing i want is to profit the credit cards performance to operate with images. The only possibilitie i have thougth is to use a create render target, 4 vertex describing a square with the same dimensions to my image and load a texture in this square like my image. Then get the data and work with it. There is any other possibilitie?? Therefore, I have tried to create a Device without define a parameters for my device, because I don-t want backbuffer and a HWND...but it makes me error. How can I get it?? D3DPRESENT_PARAMETERS m_PresentParameters; HRESULT hr; //create Direct3D object if((m_pDirect3DObject = Direct3DCreate9(D3D_SDK_VERSION)) == NULL){ FatalError("Direct3DCreate9() failed!"); m_bRunningD3D = false; } ZeroMemory(&m_PresentParameters,sizeof(m_PresentParameters)); if(FAILED(hr=m_pDirect3DObject->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,NULL,m_dwVertexProcessing,&m_PresentParameters,&m_pDirect3DDevice))){ FatalError("CreateDevice() failed!"); m_bRunningD3D = false; } The value returned by hr is 0x86c ... so I think bad specified.

Share this post


Link to post
Share on other sites
Advertisement
What's keeping you from going ahead and passing in the HWND parameter? There's no rule saying you have to draw to the window. Once you have a device, just change the render target and do your thing. You will have to fill out the present parameters also, at least partially.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!