Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application
Minimizing a windowed DirectX application Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
Go Back  Xtreme Visual Basic Talk > > > > Minimizing a windowed DirectX application


Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2010, 01:43 PM
bufer24 bufer24 is offline
Newcomer
 
Join Date: Aug 2005
Posts: 4
Default Minimizing a windowed DirectX application


Hi, I am wondering how do I minimize a windowed DirectX application without getting an application error. Like in various tutorials, I captured the OnDeviceLost event, but what do I have to put inside it? The application displays a simple cube without textures and it uses 1 light. There is no rendering loop running. The rendering block is called only if needed (i.e. setting viewer position, setting light color etc.).
Reply With Quote
  #2  
Old 09-17-2010, 08:25 AM
CrashPilot CrashPilot is offline
Regular
 
Join Date: Jun 2009
Location: Netherlands
Posts: 73
Default

I knew the answer to that question, i'll get back to you when I look at my source at home this evening. As far as I recall now it has to do that the device is reset on a form resize. Minimizing does fire that event. (you can hook it from your device). And the device needs to be recreated for the adjusted form size. Also when a device is reset all of your recourses that are not managed need to be recreated. Those include vertices, lights, textures, sprites etc. Normally (for performance reasons) your recources would be unmanaged. Trying to render anything that doesn't exist will throw an error. Do you not get the same error when resizing the window by dragging the borders?

I'll post some source tonight when I get back from work.
__________________
-- I divided by zero... and survived --
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
Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
Minimizing a windowed DirectX application Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
 
Minimizing a windowed DirectX application
Minimizing a windowed DirectX application
 
-->