Sign in to follow this  

Sky Dome in D3D9

This topic is 1963 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?
[code]
IDirect3DCubeTexture9 *m_pSkyDome;
HRESULT hr = D3DXCreateCubeTextureFromFileA(d3dDevice,"SkyDome.jpg",&m_pSkyDome);

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

[/code] Edited by Muzzy A

Share this post


Link to post
Share on other sites
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
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

This topic is 1963 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this