Unload resources before destroying device.
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
using System.Runtime.InteropServices;
 | 
					using Nerfed.Runtime.Video;
 | 
				
			||||||
using Nerfed.Runtime.Video;
 | 
					 | 
				
			||||||
using RefreshCS;
 | 
					using RefreshCS;
 | 
				
			||||||
 | 
					using System.Runtime.InteropServices;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Nerfed.Runtime.Graphics;
 | 
					namespace Nerfed.Runtime.Graphics;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -372,6 +372,11 @@ public class GraphicsDevice : IDisposable
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                    resources.Clear();
 | 
					                    resources.Clear();
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                ResourceManager.Unload(FullscreenVertexShader);
 | 
				
			||||||
 | 
					                ResourceManager.Unload(TextFragmentShader);
 | 
				
			||||||
 | 
					                ResourceManager.Unload(TextVertexShader);
 | 
				
			||||||
 | 
					                ResourceManager.Unload(VideoFragmentShader);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            Refresh.Refresh_DestroyDevice(Handle);
 | 
					            Refresh.Refresh_DestroyDevice(Handle);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user