• Advertisement
Sign in to follow this  

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

This topic is 3450 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
Sign in to follow this  

  • Advertisement