Re: Quickly drawing non-antialiased, discrete, pixels
Re: Quickly drawing non-antialiased, discrete, pixels
- Subject: Re: Quickly drawing non-antialiased, discrete, pixels
- From: mathew <email@hidden>
- Date: Mon, 6 Jan 2003 19:40:34 -0500
You could use OpenGL, of course.
// Draw three points
glBegin(GL_POINTS);
glVertex(100, 40);
glVertex(42, 50);
glVertex(110, 90);
glEnd();
To speed things up further and reduce the number of function calls
to 1, you could use vertex arrays and glDrawElements:
static unsigned int points[] = {
100, 40,
42, 50,
110, 90
};
glDrawElements(GL_POINTS, 3, GL_UNSIGNED_INT, points);
It would be interesting to see how fast that is, compared to going
through Quartz.
(I believe antialiasing is turned off for OpenGL points by default;
if not, you can always explicitly turn it off.)
mathew
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.