Skip to main content
gamedev.net
🔒 Locked

Hardware capacity

Started by Mike Lue Apr 14, 2002 at 9:54 PM 0 replies 350+ views
Original Post
Mike Lue
Mike Lue
Hi: Has anyone ever run and taken a close look at the microsoft Cubic mapping sample code before. the hardware capacity identifying part is so confusing and I have some questions about it. First of all, if the code: m_d3dCaps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP returns a value of 0, does that mean cubic mapping cannot be done on that particular computer? Atleast that is the value returned on my computer and then the sample code skips over the code that initialises the cubic texture, like this: if( m_d3dCaps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP ) { if( FAILED( D3DXCreateCubeTexture( m_pd3dDevice, CUBEMAP_RESOLUTION, 1, D3DUSAGE_RENDERTARGET, m_d3dsdBackBuffer.Format, D3DPOOL_DEFAULT, &m_pCubeMap ) ) ) { if( FAILED( D3DXCreateCubeTexture( m_pd3dDevice, CUBEMAP_RESOLUTION, 1, 0, m_d3dsdBackBuffer.Format, D3DPOOL_DEFAULT, &m_pCubeMap ) ) ) { m_pCubeMap = NULL; } } } The thing amazes me is that the cubic mapping seems still working fine.A plane is flying around a teapot with the dynamic reflections on it. I am confused that the cubic mapping still works without the initialization of the cubic texture. Can anyone tell me why, helping me to make things clearer? Thanks for any help in advance
a person
a person
first off i am going to assume you ran the code without modifications sans the additional code that tells you whether the cubemap was initilized (ie displaying an error message using a messagebox()). obviously you are using an older sdk sample since the d3d8 sample looks nothing like that (its more object oriented with its checking). and if the hardware dont support cubemaps, the cubemap code cant work (unless it uses a round about way of rendering to some textures and combining it using some clevel tricks. please explain more of what you did to the code, and examine the entire code path to really make sure that no initilization of any cube map (real or psudeo) is done.

so examine the code carfully, i cant unfotunatly look at it since i dont have the older sdk installed nor have the sample. could you try commenting out the init for the cubemap? if it trully was not init the cubemap then it should work fine. how do you know for sure that your card dont support cubic mapping? try checking with the dx caps viewer. you may be doing things wierd (ie testing the value without doing proper inits and function calls in your code, or improperly (or before the value is placed in the varible) printing the value when dealing with the sample code)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.