Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Xeno

DIRECT3DDEVICE8::Reset() acts strange

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

hi , im try to get my engine to function with the Reset() routine , but , for some reason it acts very strange. well , on win2k , it seems to work fine except for one thing - it wont restore the original app resolution , lets say my desktop res is 1024x786 , and my game res is 800x600, then when i call reset the game res will change to 1024x786... why? on win98 it doesnt work at all , im getting a vc++ runtime error... well, anyone ever got it to work? does anyone know where i can see a code that implement it right? thanks a lot.

Share this post


Link to post
Share on other sites
Advertisement
I though Reset is used to recapture the Device after it is lost? I don''t think it is neccessarily supposed to restore any settings...

-----------------------------
Direct3D vs. OpenGL
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Democracy is where you say what you want and do what you''re told.

Share this post


Link to post
Share on other sites
quote:
Original post by Promit
I though Reset is used to recapture the Device after it is lost? I don't think it is neccessarily supposed to restore any settings...


Well, it's made for both, i.e. recapturing the device after it's lost (e.g. when you hit ALT-TAB within a fullscreen DX-App) *and* applying new presentation params.


@Xeno: be sure to release all device objects before you perform the reset and re-create the objects after the reset.

You can find this in the DX SDK-Docs at Reset():
quote:

Calling Reset causes all texture memory surfaces to be lost, managed textures to be flushed from video memory, and all state information to be lost. Before calling the Reset method for a device, an application should release any explicit render targets, depth stencil surfaces, additional swap chains and D3DPOOL_DEFAULT resources associated with the device.



Furthermore be sure that the presentation params (passed to Reset()) are correct.

I hope that'll help

Bye, VizOne

Edited by - VizOne on February 25, 2002 6:02:30 PM

Share this post


Link to post
Share on other sites
VizOne: im doing it , im releasing all the video memory resources and calling reset with the same params i created my device...
its strange , anyone can send me some source code that works and using reset()?

Share this post


Link to post
Share on other sites
hi guys ,
well , i installed updated drivers on both systems - win2k and win98, and now i dont have this problem with win2k , it resets the device and restore the graphics and everything is great.

but , on win98 , it still dont work. when i press ALT + TAB and then restore the window again , the window will maximaize and then will suddenly quit... well , why?
it works fine on win2k , then , for sure im not doing anything wrong.
did it happen to any of you?
plz post any help you can offer , thanks.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!