Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.



This topic is 6112 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

this is driving me insane. i installed a new graphics card in my computer and now code that generated a texture fine on my old card doesn't work. it should draw solid color lines across the width of the texture with white at the top and black at the bottom, but instead it gives the result shown. pTex->CreateTexture(32,32,16,pScreen); if (pTex->GetSurface()->GetDC(&hdc) == DD_OK) { COLORREF clr; short nWidth = pTex->Width(); short nHeight = pTex->Height(); for (short y = 0; y < nHeight; ++y) { clr = BlendColors(clrWhite,clrBlack,(float)y / (float)nHeight); // i know this function works for (short x = 0; x < nWidth; ++x) { SetPixel(hdc,x,y,clr); } } pTex->GetSurface()->ReleaseDC(hdc); }

it almost looks like SetPixel is plotting the pixel wrong but i don't know how this can be happening. i've tried changing the color depth of my texture to 8 and 32. 8 bit gives the same results as 16, and 32 is totally whacked giving garbage pixels in between vertical white bars spaced 8 pixels apart. my new card is a PNY geforce2 mx-400 pci with 64megs. my old one was an integrated intel with 4megs. i've also tried running some games which all appear to be fine. WTF IS GOING ON???? Edited by - Fragmo on October 21, 2001 6:05:57 PM Edited by - Fragmo on October 21, 2001 6:07:25 PM Edited by - Fragmo on October 21, 2001 6:08:08 PM

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!