Click here to Skip to main content
15,923,006 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Redraw problem Pin
John R. Shaw4-Nov-05 20:41
John R. Shaw4-Nov-05 20:41 
GeneralRe: Redraw problem Pin
vikas amin4-Nov-05 22:24
vikas amin4-Nov-05 22:24 
QuestionDatabase connectivity ? Pin
shivditya4-Nov-05 17:09
shivditya4-Nov-05 17:09 
QuestionIf anybody here ? Pin
shivditya4-Nov-05 18:14
shivditya4-Nov-05 18:14 
AnswerRe: Database connectivity ? Pin
cmk4-Nov-05 18:41
cmk4-Nov-05 18:41 
QuestionRe: Database connectivity ? Pin
shivditya4-Nov-05 20:14
shivditya4-Nov-05 20:14 
AnswerRe: Database connectivity ? Pin
cmk5-Nov-05 10:30
cmk5-Nov-05 10:30 
AnswerRe: Database connectivity ? Pin
vikas amin4-Nov-05 19:01
vikas amin4-Nov-05 19:01 
QuestionRe: Database connectivity ? Pin
shivditya4-Nov-05 19:21
shivditya4-Nov-05 19:21 
QuestionRe: Database connectivity ? Pin
shivditya4-Nov-05 19:25
shivditya4-Nov-05 19:25 
AnswerRe: Database connectivity ? Pin
vikas amin4-Nov-05 19:51
vikas amin4-Nov-05 19:51 
QuestionRe: Database connectivity ? Pin
shivditya4-Nov-05 20:12
shivditya4-Nov-05 20:12 
QuestionDoes OpenGL do alpha or not? Pin
Swinefeaster4-Nov-05 11:30
Swinefeaster4-Nov-05 11:30 
AnswerRe: Does OpenGL do alpha or not? Pin
Graham Shanks4-Nov-05 12:26
Graham Shanks4-Nov-05 12:26 
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 
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 

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.