Original Post
Okay I hate to post yet another message regarding problems with 16bit color macros but I have spent 6 hours pouring over these forums and have not found a message that seems to nail the issue I have. I have tried multiple solutions provided in this forum with no luck. I am trying to create a basic 2d engine using directX9 here is my problem. First the latest Macro I have been using to build the 16 bit word for the colour. #define _16BIT(r,g,b) ((b>>3)|((g>>2)<<5)|((r>>3)<<11)) okay, I will openly admit I know next to nothing about bit shifting and dont have a good grasp on what this does. I have tried about 12 different macros that I have found online all have the same problem. Reds dont appear Green is off in shade Blue appears to be fine here is the code I am using to fill a screen by displaying random pixels //lock the surface lpddsprimary->Lock(NULL,&ddsd, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT,NULL); //setup video buffer UCHAR *video_buffer = NULL; //attempt to draw on screen video_buffer = (UCHAR *)ddsd.lpSurface; for(int i=0; i < 500; i++) { int x = rand()%800; int y = rand()%600; video_buffer[x*2 + (y*ddsd.lPitch)] = RGB(255,0,0); } lpddsprimary->Unlock(NULL); Now I am no expert but if 16bot colour is posing such a problem has or should Microsoft build a function into directdraw to build the values from and RGB set for us??? I would greatly appreciate any help anyone can provide. TheTrust It's only impossible until its not