DirectX Texture Management
DirectX Texture Management
DirectX Texture Management
DirectX Texture Management
DirectX Texture Management
DirectX Texture Management DirectX Texture Management DirectX Texture Management DirectX Texture Management DirectX Texture Management DirectX Texture Management DirectX Texture Management DirectX Texture Management
DirectX Texture Management DirectX Texture Management
DirectX Texture Management
Go Back  Xtreme Visual Basic Talk > > > > DirectX Texture Management


Reply
 
Thread Tools Display Modes
  #1  
Old 05-13-2007, 07:41 PM
skane skane is offline
Newcomer
 
Join Date: Apr 2005
Posts: 4
Unhappy DirectX Texture Management


I'm currently writing a VB.NET DirectX program that uses TextureLoader.FromStream. Each time I call the TextureLoader.FromStream function, my program uses more and more resources. Is there some type of clean up or resource management that I need to run once I no longer need a texture? Below is my source code for loading my texture:

Code:
        Dim stream As New System.IO.MemoryStream
        m_image.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp)
        stream.Position = 0
        m_texture = TextureLoader.FromStream(device, stream)
        stream.Close()
I've tried the following methods for freeing up textures that I no longer need, but the memory resources are never released:

Code:
m_texture = Nothing

device.SetTexture(0, Nothing)
device.SetTexture(1, Nothing)
device.SetTexture(2, Nothing)
device.SetTexture(3, Nothing)
device.SetTexture(4, Nothing)
device.SetTexture(5, Nothing)
device.SetTexture(6, Nothing)
device.SetTexture(7, Nothing)

device.SetStreamSource(0, Nothing, 0)

device.EvictManagedResources()

device.Reset(pp)
None of the above methods work at all. I have literally spent hours researching this, and I have not come to any solution. Even if you don't know the exact answer, I would *greatly* appreciate any advice or direction at all.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
DirectX Texture Management
DirectX Texture Management
DirectX Texture Management DirectX Texture Management
DirectX Texture Management
DirectX Texture Management
DirectX Texture Management DirectX Texture Management DirectX Texture Management DirectX Texture Management DirectX Texture Management DirectX Texture Management DirectX Texture Management
DirectX Texture Management
DirectX Texture Management
 
DirectX Texture Management
DirectX Texture Management
 
-->