Skip to main content
GameDev.net gamedev.net
🔒 Locked

fullscreen

Started by jagguy Feb 24, 2005 at 2:38 AM 6 replies 450+ views
Original Post
jagguy
jagguy
i am using directX7 and C++. I can draw a tiled sprite on a screen and move it on a bitmap background in window mode (640*480). on win95 OS the problem is when i goto fullscreen 640*480 the background image flickers and you cant erase the sprite easy like in window mode as it leaves a trail. I erase the sprite with a rectangle of background image, then move the sprite and redraw. (OK in window mode) if the background static image is 640*480 itself then does resizing a background image to fullscreen (640*480)cause problems or what am I doing wrong. the frame rate in fullscreen has dropped to 60 comparec to 190 in window mode. i do use a backbuffer and i reset to fullscreen using CDisplays CreateFullScreenDisplay function..thats it [Edited by - jagguy on February 24, 2005 3:17:06 AM]
jagguy
jagguy
i can get a fullscreen to work with a static background .bmp that redraws every frame.
I cant get the background to be drawn once without flicker and a lighter color of the actual background being drawn on.

Of course if this is a non issue with directX9 then I will simply forget about this.
jagguy
jagguy
Quote:
Original post by Anonymous Poster
There must be something wrong with your backbuffer, post some code,
and about the trail, you should first clear your backbuffer (fill it with black)
and then draw on it.


is the idea to redraw the whole screen on each frame on tha backbuffer. My understanding is to just continually draw and erase on the backbuffer anything that is moving. So the backbuffer has a copy of the screen all the time.

i can put code up but it works fine in windowmode and I dont touch the code that draws to the screen at all.
lack o comments
lack o comments
I assume you are talking about DirectDraw, right?

Quote:

is the idea to redraw the whole screen on each frame on tha backbuffer. My understanding is to just continually draw and erase on the backbuffer anything that is moving. So the backbuffer has a copy of the screen all the time

It is probably easiest and best to clear the backbuffer and redraw everything each frame.

Quote:

the frame rate in fullscreen has dropped to 60 comparec to 190 in window mode.

The reason for the framerate drop is probably due to vsync. If you are using a flipping chain and setting the parameters to wait for vsync, the framerate will never go over the refreshrate of the monitor. You can either turn off vsync (a bad idea in 2D, if I do say so myself), try to raise the refresh rate (just make sure the hardware can handle it, or else...), or let it slide. Usually a resolution 800x600 has the widest-variety/highest refresh rates.
jagguy
jagguy
Quote:
Original post by lack o comments
I assume you are talking about DirectDraw, right?

Quote:

is the idea to redraw the whole screen on each frame on tha backbuffer. My understanding is to just continually draw and erase on the backbuffer anything that is moving. So the backbuffer has a copy of the screen all the time

It is probably easiest and best to clear the backbuffer and redraw everything each frame.

Quote:

the frame rate in fullscreen has dropped to 60 comparec to 190 in window mode.

The reason for the framerate drop is probably due to vsync. If you are using a flipping chain and setting the parameters to wait for vsync, the framerate will never go over the refreshrate of the monitor. You can either turn off vsync (a bad idea in 2D, if I do say so myself), try to raise the refresh rate (just make sure the hardware can handle it, or else...), or let it slide. Usually a resolution 800x600 has the widest-variety/highest refresh rates.


I didnt know that about fullscreen?

I might stop mucking around with directDraw so much and move onto directX8/9
The problem is I dont have enough information about directdraw and its old. I doing too muh guess work and making mistakes and taking time.
lack o comments
lack o comments
Quote:

The problem is I dont have enough information about directdraw and its old. I doing too muh guess work and making mistakes and taking time.

Avoiding something because you do not understand it will only haunt you later. In my experience, I found that making mistakes, taking my time, and guessing (along with testing/asking until I am no longer guessing), have served me very well. But if time is a constraint (job/school) I can also understand you need to move on. Still, I would urge that you try to understand the material better. In Direct3D, this will all come back... but in different form.
jagguy
jagguy
Quote:
Original post by lack o comments
Quote:

The problem is I dont have enough information about directdraw and its old. I doing too muh guess work and making mistakes and taking time.

Avoiding something because you do not understand it will only haunt you later. In my experience, I found that making mistakes, taking my time, and guessing (along with testing/asking until I am no longer guessing), have served me very well. But if time is a constraint (job/school) I can also understand you need to move on. Still, I would urge that you try to understand the material better. In Direct3D, this will all come back... but in different form.


I can do a Fullscreen with static background if I redraw the background on each frame...I didnt want to do that but only draw and erase what i need on the screen. This code didnt work in Fullscreen but it did in window mode.

I agree with you, I did do a program in window mode that works fine and I am sure if I put the code here someone could find the answer as to why FullScreen (part draw version) didnt work. Instaed I will put my efforts into OO design with my current thing, c++ game concepts and then directX8/9.I first did a whole lot of winAPI and VB6 with directX7....

I was using dxutil,dutil wrapper classes with directX and I lack information but there is plenty of other things to do and the same problem can be dealt with in directX8/9.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.