Sky Dome in D3D9

Started by
3 comments, last by Muzzy A 11 years, 9 months ago
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

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.
ya it's not bringing anything up, i moved it all over to a brand new project and solution it's still failing.
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.
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.

This topic is closed to new replies.

Advertisement