Post

 Resources 

Console

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

 All Forums
 VBGamer
 VBGamer
 Strange Problems 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
Iodiplin Posted - Oct 25 2004 : 4:49:53 PM
I've got two problems here (seems I've had lots of those recently) both with DX8.

The first is a little more straight forward than the other, so I'll give that one first.

When I go from windowed mode to full-screen mode (by changing the presentation parameters and resetting) it works just fine. When I switch between full-screen mode to windowed mode it also works fine...almost. In the latter case, the windowed form becomes COMPLETELY enveloped by the rendering, therefore the title bar and its contents are not visible, they're being drawn on. The only way I can seem to fix it is by minimizing the window (only accessable by the task bar button) and then restoring it again. Even by doing this, somehow the size of the render target gets smaller so things are being chopped off at the bottom and right edges (like the FPS counter text, at first I thought it was saying I had an FPS of 9, but it was because the 2 was cut off, so it was actually 92).

Screenie after going back to windowed mode:


I can't understand why this is happening, because it looks fine when I initialize right into windowed mode.

Hopefully someone will have experience here to point me in the right direction. (I've tried everything )



This second problem is recent, and it's VERY weird. Ok, I was testing my ability to make a nice interpolated sun-set sky in the background, so I stretch a 1x1 white pixel on the screen and color blend the sides to get my sky. It looks quite nice actually. However, it get's very messed up during a very specific circumstance in my game (which is a 2D side scroller). When I'm moving my little guy around on the floors (currently all one texture, I'm not done with the graphics) the sky simply sits in the background unintrusively. But, when I let my guy fall in a part of the map in which NO tiles are being drawn (just the background and him) the background suddenly becomes a large colorized, stretched floor texture and my guy disappears!

Screenies:

Regular (notice the background gradient):


Messed Up (notice the same background gradient, applied to the wrong texture):

I've tried setting the rendering texture to nothing and setting it back again; doesn't work. I can't think what could be going wrong, cuz' when I go back to an area with tiles again, it works fine, so it's not like it's loosing any data!

Thanks in advance.
4   L A T E S T    R E P L I E S    (Newest First)
Iodiplin Posted - Oct 26 2004 : 5:46:15 PM
Thanks. I'll see if I can't put the DoEvents somewhere else and ensure the OS finishes chaning the screen resolution before reassigning the render target.

As for the second, I think you may be right. I'll have to experiment more with it. Perhaps it actually isn't setting up the verts correctly for the sky but it doesn't cause a problem when other things are being renderered. ??? Notice that the messed up background is using the wrong texture, but it appears the texture (floor texture) isn't actually being drawn correctly (as if I wanted it drawn). It 's a bit too beig for the scren. Of course, with a mere gradient, you wouldn't notice that, but with the texture, it's more apparent. Dunno. I'll post my results.

Thanks again!
Eric Coleman Posted - Oct 26 2004 : 09:28:40 AM
The first problem is obvious, but a fix for it is't. What's happening is that you're intializing directx to use the form's drawable area before the operating system gets a chance to define the masked areas where the title bar and windows border should be.

It may not work but its something to try, use a picturebox for rendering when in windowed mode. Also, what event are you using to call the re-intializing code for directx? DoEvents is probably not working for you because your event isn't finished, so other events may not execute because they need the uncompleted event to finish first.

For the second error, I'm not sure. It's possible that you're calling a render function with no vertices, and I think that behavior is undefined. Since there are no tiles on the screen, your tile data should be empty right? If that's the case, then you shouldn't even call the render function. Directx might be getting bogus data from memory and rendering leftover information.
Iodiplin Posted - Oct 25 2004 : 8:58:26 PM
Yes...it didn't work.
VBBR Posted - Oct 25 2004 : 6:36:30 PM
Have you tried putting a DoEvents before the Reset call?

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

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