www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/15/12:15:09

From: "Cody" <cody1 AT ktsnet DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <3afc6377 AT leia DOT ktsnet DOT com> <83pudf8hhm DOT fsf AT mercury DOT st DOT hmc DOT edu>
Subject: Re: [OT] graphics routines
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Original-NNTP-Posting-Host: 216-60-177-161.ktsnet.com
Message-ID: <3afda209@leia.ktsnet.com>
Date: Sat, 12 May 2001 15:50:28 -0500
NNTP-Posting-Host: 216.60.177.225
X-Complaints-To: abuse AT swbell DOT net
X-Trace: nnrp2.sbc.net 989943212 216.60.177.225 (Tue, 15 May 2001 11:13:32 CDT)
NNTP-Posting-Date: Tue, 15 May 2001 11:13:32 CDT
Organization: SBC Internet Services
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> If you use allegro, you can just call its functions, and don't need to
> know how it works inside.  I found the manual and example programs
> quite sufficient to figure out how to use it.
I've scanned the allegro libraries, but almost every allegro program that
was compiled by someone else (not my fault) has given me various VxD errors
on my new computer w/ Nvidia TNT2 graphics card.  I figured that maybe I
ought not trust something that's going to make me restart my computer.  When
I used make to build allegro, it said that it compiled fine (after about an
hour of tinkering with different things b/c of the errors), but it never
would let me use allegro in my programs.  I use RHIDE and followed all of
its instructions for using it, but it talked about undefined references and
such, and I just gave up.  Besides, there's such a bulk of code in allegro,
and I only want a couple of procedures, that I don't need all of the excess
functions that many of allegro's functions rely on... but I appreciate that
advice and will certainly look back at it to see if I overlooked something.
> __dpmi_int
I am apparently too ignorant to understand only this... how do I use
__dpmi_int?  just put that and then 10h for instance?
> _farpokeb(_dos_ds, 0xa0000 + offset, color)
I've heard that this is extremely slow (due to far ptr)... is that the case
or not?
> __dpmi_int
... again, how do I implement that?

> Actually, if your algorithm depends on putpixel being fast, it's in
> trouble.  You should draw your image to a buffer somewhere and blit it
> into video memory (dosmemput is helpful here).
since I'm going to be using thousands of calls to putpixel at once (I'm
making a SMALL game), I figured that it would be nice if it was fairly fast.
I didn't figure that using c routines would be quite as efficient as
optimized asm routines, but I guess I was wrong.  Thanks for your help.
Btw, how do I use __dpmi_int, and more importantly than that even, how do I
use dosmemput?  I've never heard of the latter... how would I use it?  Could
I just have, say, a 64000 byte array (320*200) that I could use to put into
the graphics all at once with dosmemput, or is that not what it does?  and
if so, then how?


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019