Jump to content
  • Advertisement
Sign in to follow this  
Mandella

[SlimDX] How do I load a 3d texture? (C#, DX10)

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

Hallo, I want to load a 3D texture in C# with SlimDX and DirectX10. The fileformat is a custom one and I read the file into a byte array. What I tried is creating a Texture3DDescription with proper values and then use that to create a Texture3D. To fill the texture with data I tried to call the Map function but always get the same error: E_INVALIDARG.
DX10.Texture3DDescription tex3Ddes = new DX10.Texture3DDescription();
tex3Ddes.Width = sizeX;
tex3Ddes.Height = sizeY;
tex3Ddes.Depth = sizeZ;
tex3Ddes.Format = DXGI.Format.R8_SInt;

tex3D = new DX10.Texture3D(device, tex3Ddes);
tex3D.Map(0, DX10.MapMode.Read, DX10.MapFlags.None);

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!