Discussion:
renew DirectX texture
(too old to reply)
Thomas Petzold
2009-04-30 16:50:03 UTC
Permalink
Hallo,

I have the following problem

- I draw a bitmap with GDI
- save this to a stream
- and read the stream with TextureLoader.FromStream

that works fine but I redraw this Bitmap every 30 seconds and every time of
using the TextureLoader the application memory is reassign up 2MB so that
there is a OutOfMemory after a longer time.

is there a other method to do this?

Regards
Thomas
faulty.lee
2009-05-09 18:05:18 UTC
Permalink
Hi Thomas,

Assuming you're using MDX and .Net 1.1, the saving to stream method
seems to leak memory. It doesn't happen in .Net 2.0 though.

The only workaround for my case was to save the bitmap to disc and the
load it back again using TextureLoader.FromFile

Regards,
Faulty

On May 1, 12:50 am, Thomas Petzold
Post by Thomas Petzold
Hallo,
I have the following problem
- I draw a bitmap with GDI
- save this to a stream
- and read the stream with TextureLoader.FromStream
that works fine but I redraw this Bitmap every 30 seconds and every time of
using the TextureLoader the application memory is reassign up 2MB so that
there is a OutOfMemory after a longer time.
is there a other method to do this?
Regards
Thomas
Loading...