Jump to content
  • Advertisement
Sign in to follow this  
Muzzy A

Sky Dome in D3D9

This topic is 2180 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

Hi im trying to make a skydome in DirectX 9. I know how to make a skydome, but for some reason this one is not working, all of my other objects are rendering, but not my skydome.

can anyone think of any reason why this wouldn't render?


EDIT: hmm... I just found out that the The Texture is getting NULL. Does the image type have to be .dds?

IDirect3DCubeTexture9 *m_pSkyDome;
HRESULT hr = D3DXCreateCubeTextureFromFileA(d3dDevice,"SkyDome.jpg",&m_pSkyDome);

// RESULT
// hr == E_FAIL
// m_pSkyDome == NULL

Edited by Muzzy A

Share this post


Link to post
Share on other sites
Advertisement
No, it does not have to be DDS. If you enable the debug runtimes (in the DirectX Control Panel) and link to the debug version of d3dx9.lib, then you will get messages in the debug output telling you why the call failed.

Share this post


Link to post
Share on other sites
ya it's not bringing anything up, i moved it all over to a brand new project and solution it's still failing.

Share this post


Link to post
Share on other sites
Oh I'm sorry, I read your code wrong. I didn't realize you were loading a cube texture. That function does indeed require a .DDS file, and the DDS file has to contain a cube map. There's a DirectX Texture Tool that comes with the SDK, which can assemble a cube map from 6 separate faces.

Share this post


Link to post
Share on other sites
ok thanks, but i can't quite figure out how to use it, i clicked format and switched it to a Cube Map, picked positive X face. But then i dont know what to do from there, it only covers like 1/5th of the sphere no matter what size it is.


EDIT: Nevermind, after searching forever i finally found a little documentation on it. So little help on that topic lol. Edited by Muzzy A

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!