Hey there!
I've got a small problem that unfortunately is holding up development of our whole production pipeline..
So, like many others we're loading Meshes, Textures, etc. from Streams (in our case MemoryStreams from the Ionic.Zip Library, if that matters). Now here's a quick description of the problem:
a) Loading multiple textures after each other (in our texture viewer) works just fine.
Dim gdiTexture As New Microsoft.DirectX.Direct3D.Texture(TInternals.GetTexture(texture))
Dim gdilocked As Microsoft.DirectX.GraphicsStream = gdiTexture.LockRectangle(0, Microsoft.DirectX.Direct3D.LockFlags.ReadOnly)
Dim gdiBitmap As New Bitmap(256, 256, 4 * 256, PixelFormat.Format32bppRgb, gdilocked.InternalData)
gdiTexture.UnlockRectangle(0)
gdiTexture.Dispose()
TTextureFactory.DeleteTexture(texture)
b) Loading multiple meshes (X-Files) without their corresponding textures works fine as well.
mesh = TScene.CreateMeshBuilder()
mesh.LoadXFile(pakMan(path).GetTVData) 'The pakMan's our Package manager
c) Now here's the problem: After loading a mesh via the commands above (with or without textures, doesn't matter) I can't load any further textures. TV Log says the following:
03-10-2010 16:56:55 | RESOURCE MANAGER : Reset failed ! DX Error : -2147024809
03-10-2010 16:56:55 | TEXTURE MANAGER : Couldn't recreate the render texture after it has been reset. DirectX error : -2005530516
03-10-2010 16:56:55 | TEXT MANAGER : Failed to create vertex buffer for text rendering 3D
This is being repeated about 20 times before it quits with this message:
03-10-2010 16:56:55 | TEXTURE MANAGER : Couldn't load the texture file ##MEMORY:59020720|1398256. Unknown error : -2005530518
In VS I get stopped with a Null-Reference-Exception.
Would be really good if someone had an explanation for that issue. If further code's needed, just tell me.
Greets,
Philipp //Illuminated Games