Jump to content
  • Advertisement

Archived

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

Ructions

IPicture (Tranparency with Gif Files)

This topic is 5423 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

i am using the Ipicture code from the nehe. but this code only makes black tranparent. i am using gif and want to make the tranparent areas in the gif transparent on the screen but they show up as white on the screen at the moment. // Convert From BGR To RGB Format And Add An Alpha Value Of 255 for(long i = 0; i < lWidthPixels * lHeightPixels; i++) // Loop Through All Of The Pixels { BYTE* pPixel = (BYTE*)(&pBits); BYTE temp = pPixel[0]; pPixel[0] = pPixel[2]; pPixel[2] = temp; if ((pPixel[0]==0) && (pPixel[1]==0) && (pPixel[2]==0)) pPixel[3] = 0; else pPixel[3] = 255; i have this in the initGL function glAlphaFunc(GL_GREATER,0.1f); glEnable(GL_ALPHA_TEST); i was wondering how do i set it up so that the transparency to be transparent and not the black be transparent. I was also wondering what the #include <olectl.h> header file is and whats its use. Hopefully this makes sence. i am a newbie to opengl

Share this post


Link to post
Share on other sites
Advertisement

  • 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!