There are a number of example OpenGL programs that claim to demonstrate
how to use OpenGL for rasterization only, that is to say the
program supplies vertex data that is in window coordinates so the GL
need not do matrix transformations, etc. Also there is the advice in
the OpenGL Programming Guide that explains how to setup the projection
matrix for pixel-for-pixel rasterization.
I haven't done any extensive testing, but from my reading of the code
and using gdb to trace through Mesa's handling of a call to
glDrawArrays(), this is not currently optimized. Granted the GL forces
all vertices to be clipped (which is a pain because I can guarantee
my vertices will be on screen for this 2D app), but there should be a
path where mesa only clips and then rasterizes all the primitives. My
* how much work would it be to integrate this rasterize-only
path into mesa>
* What hacks would be needed to cut out even the clipping part
of the transform? Would the Higher Powers be willing to add a
MESA extension for that?
In my dream world I would like to use mesa to feed on-screen vertices
directly to whatever hardware graphics is being used, and leveraging
mesa to do a bunch of 2D texturing, blending, etc. Normally the
transforms wouldn't matter, but I'm trying to get into the millions of
triangles per second, and your average cpu just can't transform all
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
Get latest updates about Open Source Projects, Conferences and News.