Refresh the Screen
Refresh the Screen
Refresh the Screen
Refresh the Screen
Refresh the Screen
Refresh the Screen Refresh the Screen Refresh the Screen Refresh the Screen Refresh the Screen Refresh the Screen Refresh the Screen Refresh the Screen
Refresh the Screen Refresh the Screen
Refresh the Screen
Go Back  Xtreme Visual Basic Talk > > > > Refresh the Screen


Reply
 
Thread Tools Display Modes
  #1  
Old 05-03-2005, 03:05 PM
theController theController is offline
Centurion
 
Join Date: May 2004
Posts: 120
Default Refresh the Screen


I have followed IcePlug's tutorial, http://iceplug.vwebservices.com/

Everything works as it should, now I would like to further it.

For now I have the question of how to clear the screen of the drawings in the background?

I have the idea that maybe, you refresh the backbuffer, then display that, repeatedly.

I use the game loop like he has done.

Take a look at the picture to see what I am talking about, the trails.. I would like them gone. Also the FPS turns into blocks because the numbers just write out on top of each other.
Attached Images
File Type: jpg Screen.JPG (29.2 KB, 12 views)
Reply With Quote
  #2  
Old 05-04-2005, 07:38 AM
Machaira's Avatar
MachairaRefresh the Screen Machaira is offline
Jedi Coder

* Expert *
 
Join Date: Aug 2002
Location: Abingdon, MD
Posts: 3,438
Default

Normally you clear the entire window each frame before drawing. Which tut is this from?
Reply With Quote
  #3  
Old 05-04-2005, 07:47 AM
Iceplug's Avatar
IceplugRefresh the Screen Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

The Refreshing Part doesn't come in until you get to this one.
http://iceplug.vwebservices.com/cnddfrsh.htm
If you started with the first one, you only get immediate results (that's to help simplify the beginning code) ... no moving is allowed.

In addition, this
http://iceplug.vwebservices.com/cnddmove.htm
covers moving specifically.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #4  
Old 05-04-2005, 09:06 PM
theController theController is offline
Centurion
 
Join Date: May 2004
Posts: 120
Default

i think i missed it, i followed all those from the beginning, it doesnt refresh like it should, it just keeps drawing, like you say,
Quote:
"It will redraw the screen everytime the monitor is looking. It's not inefficient to draw this much; in fact, it's how DirectX was designed... for lots of drawing. Graphical intensity is more than just one picture bashed onto the screen. "
so it repeatedly draws it, but doesnt erase anything?
Reply With Quote
  #5  
Old 05-04-2005, 09:48 PM
Iceplug's Avatar
IceplugRefresh the Screen Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

So, how are you moving it? Did you follow the 5th tutorial yet?
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #6  
Old 05-05-2005, 08:10 PM
theController theController is offline
Centurion
 
Join Date: May 2004
Posts: 120
Default

Quote:
Originally Posted by Iceplug
So, how are you moving it? Did you follow the 5th tutorial yet?

yea, i have the loop that has BackUpSf.DrawFast( intX, intY, PictureSf, DrawFastFlags.Wait ) in there, and then the movement chanegs the intX variables and intY.

but i dont have a refresh screen method in the loop..
Reply With Quote
  #7  
Old 05-06-2005, 07:57 PM
Iceplug's Avatar
IceplugRefresh the Screen Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

The display is refreshed by way of surface flipping, as done by this line:
MainSf.Flip(BackupSf, FlipFlags.NoVSync)
It's just below the BackupSf.DrawFast call .
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
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
Refresh the Screen
Refresh the Screen
Refresh the Screen Refresh the Screen
Refresh the Screen
Refresh the Screen
Refresh the Screen Refresh the Screen Refresh the Screen Refresh the Screen Refresh the Screen Refresh the Screen Refresh the Screen
Refresh the Screen
Refresh the Screen
 
Refresh the Screen
Refresh the Screen
 
-->