Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Restoration in DX8

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
EACam Posted - May 01 2004 : 6:46:32 PM
OK ok ok ok ok o k ok

I've tried everything:

**I've looked at examples of working code and found barely any difference between theirs and mine.
**I've exausted the SDK
**I've spent hours of hopelessness trying random things that never did one diddle

Ok, when I check to see if the device is lost, I pause my main loop, when I get the D3DERR_DEVICENOTRESET error from the TestCooperativeLevel I try to reset the device. Well, it turns out that I can't reset the device for anything...ever. I've used for doing other things such as going from windowed to fullscreen on the same device (without completely reinitializing) and I got the same error.

Here's what happens. According to my Log file, the Reset operation returns the D3DERR_DEVICELOST error code. It then finishes the sub and returns that the device is not ready for rendering so my pause loop continues and check it again again until it's fixed. I know this because my log file says the sub finishes ok. But then I get a C++ error (you know, not a plain VB error) and, if I'm running in the IDE, EVERYTHING closes (that is, the IDE and the program). If I'm running a compiled version of the program, it simply gives me the error and closes.

I don't have a CLUE what's going on. I know my presentation parameters that I use for resetting the device are the same as when I initialized (I use the same variable for goodness sake, and I've checked it for changes).

THIS SHOULD BE WORKING!!!!

I've tried releasing memory (even tho everythings loaded in Pool_Managed anyway).

PLEASE HELP!!! I can't even begin to guess why this isn't working.



Thanks.
8   L A T E S T    R E P L I E S    (Newest First)
Spodi Posted - May 05 2004 : 12:13:01 AM
For future reference, here is what I sent EACam:

  
'Check to see if the d3d device is not ready
If D3DDevice.TestCooperativeLevel <> D3D_OK Then
  
    'Check to see if the device can be reset  
    If D3DDevice.TestCooperativeLevel = D3DERR_DEVICENOTRESET Then
  
        'Clear the font from memory  
        MainFont.OnLostDevice  
  
        'Reset the device  
        D3DDevice.Reset D3DWindow  
  
        'Restore the font  
        MainFont.OnResetDevice  
  
        'Reset the textures and device settings  
        Engine_Init_Gfx  
  
    Else
  
        'Exit the sub since the device is not ready to be used or reset  
        Exit Sub
  
    End If
  
End If
  
'Make sure the screen is not minimized
If frmMain.WindowState = vbMinimized Then Exit Sub
  


~D3DDevice is, well, the d3d device
~frmMain is whatever form you set the device to draw to
~MainFont is your D3DXFont(s) - make sure you list them all
~Engine_Init_Gfx is a sub that does the following:
1) Restore all device render states
2) Restore all textures
EACam Posted - May 02 2004 : 8:27:33 PM
Cool. Thanks!
Spodi Posted - May 02 2004 : 2:03:54 PM
I got it on DXRE, I can send you the code to do it in a few hours.
Lachlan87 Posted - May 02 2004 : 11:34:26 AM
I would recommend you try to re-create the error in a new project. All you should need to do is copy your intitialisation code, your code for handling device loss, and write a extremely simple game loop to use it all. You don't even have to display any graphics or anything. If you can't re-create the error by doing this, it would be a big step toward solving the problem. If the error still occurs, you will have a very small little bit of functioning source code you can e-mail me or anyone else interesting in helping you solve your problem. I can't tell you how many times I've managed to solve a bugger of a problem by reducing the amount of code I'm working with like that.

As it is right now, I have a hard time invisioning what your code looks like, or even what your errors look like.
EACam Posted - May 02 2004 : 08:03:34 AM
I described that "error" in detail in my first post
Eric Coleman Posted - May 01 2004 : 9:17:27 PM
Ok, so its an "error." That really helps. I know eactly what the problem is.
EACam Posted - May 01 2004 : 8:46:00 PM
Sorry, that sounds like a different degree of a problem.

Mine is causing DX8 to give me an error and everything closes (crashes).

(It's also using DD7...)
Eric Coleman Posted - May 01 2004 : 8:10:03 PM
Read Lucky's post, http://voodoovb.talosstudios.com/archives19.html

Does that help any?

VBGamer © Go To Top Of Page
This page was generated in 0.14 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.