Got a minor issue here with rendering my 2D images. My image has transparency, but when rendering it isn't showing up. Unsure where i'm going wrong here or what to add to my code.
Any help would be greatly appreciated .
Image of the image i'm rendering, the middle section which is appearing black should be transparent:
[media]http://imageshack.us/photo/my-images/408/issue.png/[/media]
My Drawing code:
glBindTexture(GL_TEXTURE_2D, texture);
//Begin Drawing Quads
glBegin(GL_QUADS);
// Top-left vertex (corner)
glTexCoord2i(0, 0);
glVertex2i(x, y);
// Bottom-left vertex (corner)
glTexCoord2i(1, 0);
glVertex2i( x + imageWidth, y);
// Bottom-right vertex (corner)
glTexCoord2i(1, 1);
glVertex2i( x + imageWidth, y + imageHeight);
// Top-right vertex (corner)
glTexCoord2i(0, 1);
glVertex2i(x, y + imageHeight);
glEnd();
glLoadIdentity();