🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6116

Alternatives to putpixel()?

#6116
From: b39y
Date: Fri, 10 May 1991 13:49
29 lines
1082 bytes
I'm new to C in general, and Borland C++ in particular, and I'm wondering what
my alternatives are to using putpixel(x,y,c) to draw to the graphics screen. 
The code I've written is really slow in the display section, and I'm sure there
must be a faster way.  The code has all extraneous calculations removed:  here
follows an extract:

int i,j;
static unsigned char old[ 100 ][ 100 ];
static unsigned char new2[ 100 ][ 100 ];

int col;

.
.
.

for( j=0; j<100; j++ )
	for( i=0; i<100; i++ )
	{
		col = old[ j ][ i ];
		putpixel( i,j, col );
		new[ j ][ i ] = col;
	}

Any suggestions for what to do, or pointers for where to look for speedups? 
Thanks.

Dave
b39y@vax5.cit.cornell.edu
Technical Details
Message-ID: <1991May10.094921.4656@vax5.cit.cornell.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!vax5.cit.cornell.edu!b39y

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!vax5.cit.cornell.edu!b39y
From: b39y@vax5.cit.cornell.edu
Newsgroups: comp.os.msdos.programmer
Subject: Alternatives to putpixel()?
Message-ID: <1991May10.094921.4656@vax5.cit.cornell.edu>
Date: 10 May 91 09:49:21 EDT
Distribution: comp
Organization: CIT, Cornell University
Lines: 30