-/* $Id: wmesa.c,v 1.24 2002/01/15 18:14:34 kschultz Exp $ */
+/* $Id: wmesa.c,v 1.25 2002/01/16 15:42:17 kschultz Exp $ */
/*
* Windows (Win32) device driver for Mesa 3.4
b = GetBValue(Current->clearpixel);
iSize = Current->width;
while (i < iSize) {
- *lpb++ = r;
- *lpb++ = g;
*lpb++ = b;
+ *lpb++ = g;
+ *lpb++ = r;
i++;
}
lpb = Current->pbPixels + Current->ScanWidth;
else if(nBypp == 2)
*((LPWORD)lpb) = BGR16(r,g,b);
else if (nBypp == 3)
- *((LPDWORD)lpb) = BGR24(r,g,b);
+ {
+ *lpb++ = b;
+ *lpb++ = g;
+ *lpb = r;
+ }
else if (nBypp == 4)
*((LPDWORD)lpb) = BGR32(r,g,b);
}
void wmSetPixel3(PWMC pwc, int iScanLine, int iPixel, BYTE r, BYTE g, BYTE b)
{
LPBYTE lpb = pwc->pbPixels + pwc->ScanWidth * iScanLine + iPixel + iPixel + iPixel;
- *((LPDWORD)lpb) = BGR24(r,g,b);
+ *lpb++ = b;
+ *lpb++ = g;
+ *lpb = r;
}
void wmSetPixel2(PWMC pwc, int iScanLine, int iPixel, BYTE r, BYTE g, BYTE b)