Skip to main content
gamedev.net
🔒 Locked

Alpha Channel Transparency

Started by Pooya65 Jan 21, 2008 at 5:33 AM 4 replies 1.3k views
Original Post
Pooya65
Pooya65
hi i am using devil with OpenGL and i want to draw images(no texture)whit Transparency(using alpha chanel in the png files) on the screen via using glDrawPixels function, how i can do it?!
MaR_dev
MaR_dev
Draw a quad (or two triangles) with right tex coordinates and set your image as a texture. In fact its really simple, no need to use glDrawPixels.
Pooya65
Pooya65
hi
how i can use "Alpha Channel Transparency" ????

i_luv_cplusplus
i_luv_cplusplus
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
OpenGL fanboy.
V-man
V-man
Quote:
Original post by Trenki
I don't think that is even possible with glDrawPixels. AFAIK the use of glDrawPixels should be avoided too, since that is not too fast.


Yes it is possible.
And use a format like GL_BGRA for good performance.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.