Jump to content
  • Advertisement
Sign in to follow this  
UNREAL WARRl0R

DX11 D3DXFillCubeTexture in DirectX11

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

So I was porting the Local Deformable PRT sample from DirectX9 and I noticed a function that seems to be not possible in DirectX11

Is there any DX11 version of D3DXFillCubeTexture? Or can someone provide me with how it works so I can write my own?

Share this post


Link to post
Share on other sites
Advertisement
Can I please have some help here? This one thing is killing me. I tried re-implementing it off of some source that I found, but there aren't any PixelFormatDescs

I am completely lost with this, I started DirectX programming when 11 came out, so I have no experience with 9 or 10

Share this post


Link to post
Share on other sites
It looks like it locks each surface of the cubemap (there are 6 x N surfaces in a cubemap, where N is the number of mips), iterates through each texel, and calls a callback function. For D3D11 what you'd want to do instead is allocate CPU memory for all of the texels, fill them, and pass a pointer to that memory when creating an IMMUTABLE Texture2D resource.

Share this post


Link to post
Share on other sites

It looks like it locks each surface of the cubemap (there are 6 x N surfaces in a cubemap, where N is the number of mips), iterates through each texel, and calls a callback function. For D3D11 what you'd want to do instead is allocate CPU memory for all of the texels, fill them, and pass a pointer to that memory when creating an IMMUTABLE Texture2D resource.


Thanks! I am Implementing now
BTW, I am a big fan of some of your work :P

Share this post


Link to post
Share on other sites

It looks like it locks each surface of the cubemap (there are 6 x N surfaces in a cubemap, where N is the number of mips), iterates through each texel, and calls a callback function. For D3D11 what you'd want to do instead is allocate CPU memory for all of the texels, fill them, and pass a pointer to that memory when creating an IMMUTABLE Texture2D resource.


It works! Thanks!

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!