Click here to Skip to main content
15,905,913 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Does OpenGL do alpha or not? Pin
vikas amin5-Nov-05 1:22
vikas amin5-Nov-05 1:22 
GeneralRe: Does OpenGL do alpha or not? Pin
Swinefeaster7-Nov-05 8:55
Swinefeaster7-Nov-05 8:55 
GeneralRe: Does OpenGL do alpha or not? Pin
El Corazon7-Nov-05 9:16
El Corazon7-Nov-05 9:16 
GeneralRe: Does OpenGL do alpha or not? Pin
Swinefeaster7-Nov-05 12:41
Swinefeaster7-Nov-05 12:41 
GeneralRe: Does OpenGL do alpha or not? Pin
El Corazon7-Nov-05 13:57
El Corazon7-Nov-05 13:57 
GeneralRe: Does OpenGL do alpha or not? Pin
Swinefeaster14-Nov-05 15:40
Swinefeaster14-Nov-05 15:40 
GeneralRe: Does OpenGL do alpha or not? Pin
El Corazon14-Nov-05 17:08
El Corazon14-Nov-05 17:08 
GeneralRe: Does OpenGL do alpha or not? Pin
Swinefeaster15-Nov-05 8:49
Swinefeaster15-Nov-05 8:49 
Ok after trial and error over and over, I found the lucky combination:

glEnable(GL_LIGHTING);
glEnable(GL_BLEND);
glEnable(GL_DEPTH_TEST);
glDisable(GL_CULL_FACE);
glDepthFunc(GL_LEQUAL);

if(m_transparent)
{
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_DST_COLOR);
}

With this implementation, it doesn't matter which order the objects are drawn in. However, for some reason it still ignores how transparent an object is --- it is either somewhat transparent, or opaque. Any ideas?

BTW I couldn't get the nvidia samples to work with vc6.

swine

[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
GeneralRe: Does OpenGL do alpha or not? Pin
El Corazon15-Nov-05 16:17
El Corazon15-Nov-05 16:17 
QuestionLPSAFEARRAY issues Pin
Axonn Echysttas4-Nov-05 9:46
Axonn Echysttas4-Nov-05 9:46 
AnswerRe: LPSAFEARRAY issues Pin
Mircea Puiu4-Nov-05 23:31
Mircea Puiu4-Nov-05 23:31 
GeneralRe: LPSAFEARRAY issues Pin
Axonn Echysttas5-Nov-05 10:51
Axonn Echysttas5-Nov-05 10:51 
GeneralRe: LPSAFEARRAY issues Pin
Axonn Echysttas5-Nov-05 21:23
Axonn Echysttas5-Nov-05 21:23 
QuestionLinker Error Pin
Maskarat4-Nov-05 7:54
Maskarat4-Nov-05 7:54 
AnswerRe: Linker Error Pin
Blake Miller4-Nov-05 10:49
Blake Miller4-Nov-05 10:49 
GeneralRe: Linker Error Pin
Maskarat6-Nov-05 4:01
Maskarat6-Nov-05 4:01 
QuestionHelp me :What is wrong here???? Pin
Member 18584504-Nov-05 7:26
Member 18584504-Nov-05 7:26 
QuestionRe: Help me :What is wrong here???? Pin
David Crow4-Nov-05 7:51
David Crow4-Nov-05 7:51 
QuestionA different registry question - edit offline? Pin
charlieg4-Nov-05 7:24
charlieg4-Nov-05 7:24 
QuestionRe: A different registry question - edit offline? Pin
David Crow4-Nov-05 7:50
David Crow4-Nov-05 7:50 
AnswerRe: A different registry question - edit offline? Pin
charlieg4-Nov-05 8:03
charlieg4-Nov-05 8:03 
QuestionRe: A different registry question - edit offline? Pin
David Crow4-Nov-05 8:08
David Crow4-Nov-05 8:08 
AnswerRe: A different registry question - edit offline? Pin
charlieg4-Nov-05 8:20
charlieg4-Nov-05 8:20 
QuestionRe: A different registry question - edit offline? Pin
David Crow4-Nov-05 9:01
David Crow4-Nov-05 9:01 
AnswerRe: A different registry question - edit offline? Pin
Maximilien4-Nov-05 7:56
Maximilien4-Nov-05 7:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.