# E_FAIL: An undetermined error occurred (-2147467259) when loading a cube texture

I'm trying to implement a skybox into my engine, and I'm having some trouble loading the image as a cube map. Everything works (but it doesn't look right) if I don't load using an ImageLoadInformation struct in the ShaderResourceView.FromFile() method, but it breaks if I do.

I need to, of course, because I need to tell SlimDX to load it as a cubemap. How can I fix this?

public static void LoadCubeTexture(string filename)
{
{
CpuAccessFlags = CpuAccessFlags.None,
Depth = 32,
FilterFlags = FilterFlags.None,
FirstMipLevel = 0,
Format = SlimDX.DXGI.Format.B8G8R8A8_UNorm,
Height = 512,
MipFilterFlags = FilterFlags.Linear,
MipLevels = 1,
OptionFlags = ResourceOptionFlags.TextureCube,
Usage = ResourceUsage.Default,
Width = 512
};
}


Each of the faces of my cube texture are 512x512.

• Try using debug DirectX runtime. Maybe it will print more precise error message. Apr 1 '12 at 1:19
• I tried using it with DebugView, but it only prints a few HR originated and HR propagated messages. Apr 1 '12 at 1:24