Original Post
Hey, I'm programming in C++/DirectX on a Win32 project and I was wondering how I could make it look like space in the background. I just don't know how to slow the stars down enough to make it look like space. For now I just use a for loop of 250 and use the SetPixel command to plot pixels that are white. When I ran the test, they flash so quickly on screen (I put them in the render function of DirectX I made) you can't tekk what they are and it looks like crap. Does anyoner have any idea on a better way?
void render(void)
{
if(pd3dDevice == NULL)
return;
pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,0,0), 1.0f, NULL);
for(int i=0; i<250; i++)
{
SetPixel(hdc, rand()%640,rand()%480,RGB(255,255,255));
}
pd3dDevice->Present(NULL, NULL, NULL, NULL);
}