Mail Archives: djgpp/1998/07/22/17:04:57
From: | mvparvia AT alpha DOT hut DOT fi (Mikko V.I. Parviainen)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Allegro and blitting to screen
|
Date: | 21 Jul 98 05:16:23 GMT
|
Organization: | Helsinki University of Technology, CS lab
|
Lines: | 31
|
Distribution: | world
|
Message-ID: | <mvparvia.900998183@snakemail.hut.fi>
|
References: | <011801bdb41d$7e02b5c0$494e08c3 AT arthur>
|
NNTP-Posting-Host: | alpha.hut.fi
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
"Arthur" <arfa AT clara DOT net> writes:
[This is my former comment]
>>So, in my experience drawing to video memory can be very slow, and
>>double buffering a viable option sometimes.
>Not sure how this can happen. When you copy the buffer to the screen in
>double buffering, you are doing just that - copying loads of memory from one
>place to another. When you page flip, you simply change the value of the
>pointer to the screen. If this happens, I suggest you get Display Doctor or
>UniVBE and check your results again...
Actually, I think I figured out the strange behaviour.
This is what I did (and vsync() and some other things):
1) Page flipping
a) Clean drawing page by writing it full of zeroes
b) Draw the frame
c) Flip page
2) Double buffering
a) Clean double buffer by writing it full of zeroes
b) Draw the frame in buffer
c) copy frame into video memory
I guess that 1) a) and b) take so much time, because of slow video
memory, that it is faster to draw the pic only once to video memory.
With page flipping I drew the picture twice in video memory.
--
--
Mikko Parviainen
IMTU tc+ tm++ tn+ ru+ ge++ 3i+ jt-- jd++ pi au st- ls kk hi++ dr++ as+
va+ so- zh+ da++
- Raw text -