|
|
#include "nfbWinStr.h"xxx is the routine's prefix. Valid values are gen to use the default routine or your driver's prefix if you are rewriting this routine to use the specific capabilities of your hardware.void xxxDrawPoints ( DDXPointPtr ppt, unsigned int npts, unsigned long fg, unsigned char alu, unsigned long planemask, DrawablePtr pDrawable );
fg
at points specified by ppt,
applying alu and planemask.
pptx and y coordinates
for each solid span.
nptsfgalu and planemask values are applied.
aluimage with the contents of the frame buffer.
See
``alu'' in Developing NFB graphics adapter drivers.
planemaskplanemask
that specifies modification of all planes.
pDrawablepDrawable->pScreen.
Your screen private is connected to the bottom of ScreenRec.
alu and planemask values,
but you could create a specialized case where
if alu == GXcopy and planemask == 0,
you could write the fg color
directly to the frame buffer address
referenced by ppt[i].
DrawPoints( ) works for 1, 8, 16, and 32 bits-per-pixel hardware.
void
NTE(DrawPoints)(
DDXPointPtr ppt,
unsigned int npts,
unsigned long fg,
unsigned char alu,
unsigned long planemask,
DrawablePtr pDrawable)
{
ntePrivateData_t *ntePriv = NTE_PRIVATE_DATA(pDrawable->pScreen);
int count = npts;
NTE_BEGIN(ntePriv->regs);
NTE_CLEAR_QUEUE(3);
NTE_WRT_MASK(planemask);
NTE_FRGD_MIX(NTE_FRGD_SOURCE, NTE(RasterOps)[alu]);
NTE_FRGD_COLOR(fg);
NTE_MAJ_AXIS_PCNT(0);
while ((count -= 2) >= 0)
{
NTE_CLEAR_QUEUE(6);
NTE_CURX(ppt->x);
NTE_CURY(ppt->y);
NTE_CMD(S3C_CMD_LINE | S3C_CMD_DRAW | S3C_CMD_RADIAL |
S3C_CMD_MULTIPLE | S3C_CMD_WRITE);
++ppt;
NTE_CURX(ppt->x);
NTE_CURY(ppt->y);
NTE_CMD(S3C_CMD_LINE | S3C_CMD_DRAW | S3C_CMD_RADIAL |
S3C_CMD_MULTIPLE | S3C_CMD_WRITE);
++ppt;
}
if (count == -1)
{
NTE_CLEAR_QUEUE(3);
NTE_CURX(ppt->x);
NTE_CURY(ppt->y);
NTE_CMD(S3C_CMD_LINE | S3C_CMD_DRAW | S3C_CMD_RADIAL |
S3C_CMD_MULTIPLE | S3C_CMD_WRITE);
}
NTE_END();
}