Driving me nuts this is
note that is managed direct 3d mobile (C#)
Im trying to load a PVRTC4 texture into video memory in windows mobile 5. I've had success using P8 format. 9 hours later, I can't get this damn thing to work.
Basically my teximgsize is set to 256 * 256 /2. this would equate to 4bpp that PVRTC4 is.
texsize is 256.
So I have a 2D array of textures to make up a large image bigger than 2048 x 2048.
The (Format) cast should be passing the correct value. My MakeFourCC was copied straight from micosoft's C# example.
The FourCC code is straight from PVR themselfs.
The texture was compressed from PVRTC library file, but anyhow, I'd assume you could throw any data at it and still operate?.
The error I get is 80004005 which is a GraphicsException.
Has anyone got this working?
[/code][/i]
note that is managed direct 3d mobile (C#)
Im trying to load a PVRTC4 texture into video memory in windows mobile 5. I've had success using P8 format. 9 hours later, I can't get this damn thing to work.
- Code:
byte[] arr = new byte[teximgsize];
arr = br.ReadBytes(arr.Length);
MemoryStream ms = new MemoryStream(arr, 0, arr.Length, true, true);
Tex[y][x] = TextureLoader.FromStream(device, ms, teximgsize, texsize, texsize, 1, Usage.Texture, (Format)Utility.MakeFourCC('P', 'T', 'C', '4'), Pool.VideoMemory, Filter.None, Filter.None, 0);
Basically my teximgsize is set to 256 * 256 /2. this would equate to 4bpp that PVRTC4 is.
texsize is 256.
So I have a 2D array of textures to make up a large image bigger than 2048 x 2048.
The (Format) cast should be passing the correct value. My MakeFourCC was copied straight from micosoft's C# example.
The FourCC code is straight from PVR themselfs.
The texture was compressed from PVRTC library file, but anyhow, I'd assume you could throw any data at it and still operate?.
The error I get is 80004005 which is a GraphicsException.
Has anyone got this working?