Sign in to follow this  

Odd Present Error

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

Ok, some of this is MDX but I'm gonna try to translate for you non-MDX guys... On an old Video Card (NVidia GeForce 2 MX)... I know, I develope on dinosaurs to ensure game quality for a wider range of users. So, here's what I do... Create a texture... oTexture = New Texture(moDevice, 32, 32, 1, Usage.None, Format.A8R8G8B8, Pool.Managed) That works... I then lock the rectangle to manipulate some bytes on my own... Dim oStream As GraphicsStream = oTexture.LockRectangle(0, System.Drawing.Rectangle.Empty, LockFlags.Discard, lPitch) I read my data, I set my data, I then unlock the rectangle... Then, outside of my function that does all of this, I use a sprite to draw the texture onto the screen somewhere... and then I do a Present. The Present Blows up giving me the following: Unhandled Exception: Error in the application. -2005530585 (D3DERR_DRIVERINTERNALERROR) Why? I don't get this error if I don't enter the texture generation function. And it only seems to happen After the first call. Thanks!

Share this post


Link to post
Share on other sites
Do you have the latest drivers? Have you tried the debug runtimes? Does it work if you don't lock the texture? (EDIT: Just re-read your post [smile])

Internal driver errors are a Bad Thing, and it's unlikely that your application's at fault (Well, you might be doing something wrong, but D3D or the driver should have caught it).

Share this post


Link to post
Share on other sites
I'll run out and grab the latest drivers here in a second (just to be sure)...

but just testing things... I decided to try something.

In the function, I created the texture but only if it wasn't already created. If it was already created, I passed the New call... Now, I went back and test if it is a valid pointer, then I dispose it and remove the pointer. Then, I do a New on it again. Now, that worked (although, I took a large performance hit for it).

I can see the first frame with the texture drawn correctly... I'm almost 100% sure that the error occurs on the next frame that I try to update the texture that has already created.

Anyway, I'll check the drivers.

EDIT: Ok, reread this and came out a little unclear....


'Currently it is like this and it doesn't work
If oTexture is Nothing Then
oTexture = New Texture(moDevice, 32, 32, 1, Usage.None, Format.A8R8G8B8, Pool.Managed)
End If

'Did a test using this instead and it worked
If oTexture Is Nothing = False Then
oTexture.Dispose()
oTexture = Nothing
End if
oTexture = New Texture(moDevice, 32, 32, 1, Usage.None, Format.A8R8G8B8, Pool.Managed)

Share this post


Link to post
Share on other sites

This topic is 4201 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this