Jump to content
  • Advertisement
Sign in to follow this  
pescador

Sprite is not fully transparent

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

Hi developers! Well, I made some pictures in PNG format to make some parts of the sprites transparent. But I can't understand why it's not fully transparent (I still can see the "transparent" area). See the blue ball: http://i33.tinypic.com/2ev6wjq.jpg
//init function

    glDepthMask(GL_FALSE);
    glDisable(GL_DEPTH_TEST);
    glDisable(GL_CULL_FACE);
    glDisable(GL_DITHER);
    glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);

//render function

    glEnable(GL_TEXTURE_2D);

    glPushMatrix();
    glTranslatef(-0.5, 0, 0);
    glScalef(0.3, 0.3, 0);
    glRotatef(angle, 0, 0, 1);
    glCallList(dlist1);
    glPopMatrix();

    //blue ball
    glPushMatrix();
    glTranslatef(0.5, 0, 0);
    glScalef(0.3, 0.3, 0);
    glRotatef(angle, 0, 0, 1);
    glEnable(GL_BLEND);
    glCallList(dlist2);
    glDisable(GL_BLEND);
    glPopMatrix();

    glDisable(GL_TEXTURE_2D);

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

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