Mail Archives: djgpp/1997/10/27/23:16:52
From: | David Jenkins <me AT jenkinsdavid DOT demon DOT co DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Clipping or Double Buffering : Which one should I use? (Allegro) I dunno either. :)
|
Date: | Tue, 28 Oct 1997 01:59:29 +0000
|
Organization: | None
|
Distribution: | world
|
Message-ID: | <B1yiuABBcUV0EwCZ@jenkinsdavid.demon.co.uk>
|
References: | <632ddv$o5m$1 AT news DOT interlog DOT com>
|
NNTP-Posting-Host: | jenkinsdavid.demon.co.uk
|
MIME-Version: | 1.0
|
Lines: | 62
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
In article <632ddv$o5m$1 AT news DOT interlog DOT com>, "Gautam N. Lad"
<gautam AT interlog DOT com> writes
>Hi,
>I have a question. I'm writing a farily big program, and I need to know if I
>should
>use double buffering or clipping?
I've never used clipping (Don't you mean page flipping??)
But I'd like a few answers on this subject too. So I'll TRY and answer,
if I'm wrong please correct me.
>
>I draw (mainly polys) to a double buffer, and then blit it to the screen. Is
>there a
>speed difference between the two?
Not sure, I think page flipping uses all video memory, so the moving of
memory is all done in video memory which I assume is quicker.
A 2'nd buffer for double buffering is done in the actual PCs memory, I
think, so the Blit is slower. Am I right??
I think page flipping means you use twice as much video memory than you
would for double buffering. So a program written on a machine with 4meg
of vid mem, might not work on a machine with only 2.
Again, I'm no expert on this, I just use double buffering because that's
all I've ever used. How far wrong am I?? :)
>
>It doesn't really make much of a difference which one I use, but I need to know
>which one is faster.
>
>Right now, it takes my program to draw 8100 3D rectangles (in 4 views of size
>240x180) about 4 seconds. The polys drawn are not of the same view.
>This is using double buffering. I haven't tried clipping, but should I?
I think page flipping would require writing to video memory, all the
maths intensive stuff wouldn't change obviously, but the poly drawing
sending data to wherever might be slower, with it having to travel to
vid memory instead of somewhere nearby in the normal memory.
If that bull###t :) is right, it will depend on how fast the poly
drawing stuff is, i.e. would drawing slowly to video memory and flipping
the display be quicker than drawing to normal memory then slowly copying
the buffer to video memory.
>
>My computer is 486 DX2 50MHz, w/ 32MB RAM (running on a DriveSpaced
>drive w/ 20MB free).
>
>Bye!
>
>-------------------------------------------------------------
>Gautam N. Lad
>-------------------------------------------------------------
>E-Mail: gautam AT interlog DOT com
>Website: http://www.interlog.com/~gautam
>
>POV-Ray Software, Gallery, and Links!
>-------------------------------------------------------------
--
http://www.jenkinsdavid.demon.co.uk for C programmers.
David Jenkins
- Raw text -