Blending problems
OK this is what I do:
/////////////////////////////
//draw all opaque objects
glDepthMask(GL_FALSE);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);//don''t know which one''s the
//the best
glColor4f(1.0f,1.0f,1.0f,0.5f);
for all transparent objects
draw object
glColor4f(1.0f,1.0f,1.0f,1.0f);
glDisable(GL_BLEND);
glDepthMask(GL_TRUE);
/////////////////////////////
Now, I''ve got this little problem, say I draw 2 transparent objects with both maybe the same texture. The second one I draw will be much more opaque than the second one. This might be a real simple sulotion or problem on my side, but excuse my stupidity.
Is it that I''m using the wrong blendfunctions or something or maybe I should reinitialize it within the loop or maybe it''s something way different.I dunno...
Can anyone help me ?
Thxz alot
---------------
Gaming is Life
---------------
>>Now, I''ve got this little problem, say I draw 2 transparent objects with both maybe the same texture. The second one I draw will be much more opaque than the second one. This might be a real simple sulotion or problem on my side, but excuse my stupidity.<<
whats the problem?
http://uk.geocities.com/sloppyturds/gotterdammerung.html
whats the problem?
http://uk.geocities.com/sloppyturds/gotterdammerung.html
If the two transparent objects are overlapping on the screen then that''s what you should see. If not, it looks like something is happening while drawing the objects that changes GL state or something.
zedzeek - The problem is that the second transparent object is far too bright or should I say opaque than the first, and both used the same blend src dst values.
zppz - That''s precisely kind of the problem, but none of the objects were overlapping
But good news I found the problem anyway - The transparent objects was in a linked list and all that happened was I accedentily draw them more than once, lol, pathetic.
Anyway thx for replies!!!
---------------
Gaming is Life
---------------
zppz - That''s precisely kind of the problem, but none of the objects were overlapping
But good news I found the problem anyway - The transparent objects was in a linked list and all that happened was I accedentily draw them more than once, lol, pathetic.
Anyway thx for replies!!!
---------------
Gaming is Life
---------------
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement