Click here to Skip to main content
15,918,471 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Does OpenGL do alpha or not? Pin
El Corazon4-Nov-05 19:31
El Corazon4-Nov-05 19:31 
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 
I assume the semi-transparent cube is always drawn first? Then yes, it will blend with the background, then you draw the opaque cube and it will either cover up the semi-transparent cube or it will clip it (as in it will not be drawn due to GL_CULL_FACE). Since you say you are blending with the background, you are in fact blending, period.

you've also partially stumbled across the example where alpha-blending fails to provide a true result in any case. If you draw as whole objects, things start breaking down.

You can help the situation by breaking all objects into triangles and sorting the triangles. At the very least you will want to draw the opaque square first, then draw the semi-transparent, that's a simple object sort, but not always true, especially with large triangles.

There is another method called depth peeling that draws using multi-frame rendering techniques multiple depth slices to cut the scene in many sections drawing piece by piece.

nVidia layers program[^]

_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
GeneralRe: Does OpenGL do alpha or not? Pin
Swinefeaster15-Nov-05 8:49
Swinefeaster15-Nov-05 8:49 
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 

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.