Archived

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

TeraZen

Tell me if I'm wrong but...

Recommended Posts

Tell me if I''m wrong but two persons playin at 800x600 75 hertz have (almost - it can drop a lil sometimes) the same frame rate? So using directx display mode 800x600 75 hertz for a gfx engine will make any machine run at the same speed... from dual 2.1 ghz to PII 266mhz? Regards Last of the Returners

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
800x600 75 hertz is the refresh rate. You draw a frame and set it''s address as the main screen, when the refesh comes through, it draws that screen instead of the other one. Depending on the CPU and GPU, that frame may take longer to draw on different systems before you submit it for refresh.

Let''s say you lock the surface and perform a bunch of GDI calls. That is very CPU intensive.

Let''s say you use TnL Hardware transformations, that''s very GPU orientated.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
No...75 Hertz is the frequency that the screen is updated at, it''s not a frame rate.

Share this post


Link to post
Share on other sites
When a monitor is set to 800x600 at 75 Hz, the 75Hz refers to how fast the picture tube is refreshing the monitor, it dosen''t have anything to do with the frame rate of the 3D application you are running. A program''s frame rate is determined by how fast the program is delivering graphics data to the video card, and how fast the card is capeable of rendering the graphics data. If you have a slow computer and a fast video card, you might have a slow frame rate because the program can''t deliver data to the card very quickly, or you could have a fast computer and a slow graphics card which creates the opposite problem.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
here''s a better example:

HERTZ
The hertz is a unit of frequency and is derived from the unit of per second (s-1). Frequency is the number of repetitive actions in a particular time. For example a pendulum swings with a frequency of 0.5 swings per second if a complete swing takes two seconds, that is:

1 swing per 2 seconds = = 0.5 swing per second = 0.5 s-1 = 0.5 hertz

One hertz is the same as one complete cycle in one second. Frequency is sometimes expressed as cycles per second (cps).

Which is how many times per second the screen is redrawn. How ever, you may update the frame 10 times before it is ever drawn to the screen. It really depends if you sync your drawing with the page flip.

For instance, I draw a 2d game that I blt everything to the surface to render the frame, then I blt that frame to the Primary surface and then start again on the next frame. This method gives me roughly 110 - 120 frames per second on a 60 hertz setting. If I use the DirectDraw Flip which trades the surface addresses during VSYNC, then yes, I only get 60 frames per second, but only because I wait for the VSYNC.

Share this post


Link to post
Share on other sites
Ok. Thanks guys! Now... Is there any function to tell DirectDraw let''s say to increment sprite position by one pixel ONLY when the monitor is refreshing?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yes, use the Flip method that is a part of the primary surface to flip the primary and back surfaces. there should also be a function called GDIflip (or something to that effect) for windowed mode applications. Simply:

Draw the frame.
Call flip method:
//Flip pages for next draw
g_pDDSPrimary->Flip(NULL, 0);

With IDirectDrawSurface7, the default behavior of this method is to wait for the accelator to finish. Therefore, under default conditions, this method never returns DDERR_WASSTILLDRAWING. If you want to see the error codes and not wait until the flip operation succeeds, use the DDFLIP_DONOTWAIT flag.

Share this post


Link to post
Share on other sites