Mail Archives: djgpp/1998/03/09/16:47:23
From: | Vic <tudor AT cam DOT org>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Accessing BITMAPs Directly in Allegro
|
Date: | Mon, 09 Mar 1998 16:14:39 +0200
|
Organization: | Communications Accessibles Montreal, Quebec Canada
|
Lines: | 17
|
Message-ID: | <3503F94F.573F@cam.org>
|
References: | <350440b2 DOT 0 AT 204 DOT 101 DOT 95 DOT 15>
|
NNTP-Posting-Host: | dialup-382.hip.cam.org
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Colin Walsh wrote:
>
> Hi all,
>
> I'm currently trying to eke out as much speed as possible from my 3D
> engine, and I figure that the _putpixel/_getpixel routines (even
> for asm) should be slower that directly accessing the bytes in the
> BITMAP.
I think _putpixel will do just that. there is no clipping or anything.
> So I was wondering if there is a method of directly accessing the
> bitmap, and if so, how?
Yes, but in 8 bit modes only. You can say bitmap->line[y][x]=color;
or color=bitmap->line[y][x] where y is the Y and x is the X (yes they
are reversed!). But this is just 8 bit modes. I'm afraid for highcolor
you need the putpixel routine.
--
--> http://www.cam.org/~tudor <--
- Raw text -