HI!
Recently I have met problem you can see below:
Here is a code:
void MainInterface::RenderScene( void ) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glBegin( GL_QUADS ); glColor3ub( 0, 255, 0 ); glVertex2i( 0, 0 ); glVertex2i( 0, 10 ); glVertex2i( 5, 10 ); glVertex2i( 5, 0 ); glColor3ub( 255, 0, 0 ); glVertex2i( 5, 0 ); glVertex2i( 5, 10 ); glVertex2i( 10, 10 ); glVertex2i( 10, 0 ); glEnd(); glBlendFunc( GL_ONE, GL_ALPHA ); glEnable( GL_BLEND ); glBegin ( GL_TRIANGLES ); glColor4ub( 0, 0, 255, 100 ); glVertex2i( 2, 2 ); glVertex2i( 5, 8 ); glVertex2i( 8, 2 ); glEnd(); glDisable( GL_BLEND ); ////// glBlendFunc( GL_DST_COLOR, GL_ZERO ); // THIS IS A LINE OF INTEREST!!!!! ////// SwapBuffers(hDC); }
The output can be found here:
I thought if you change blending function without enabling it does not work in any way. Am I wrong ??
I have checked this with GeForce 4MX ( 'couse I’m using Radeon 9000 with Catalyst 3.9 drivers ) and it worked properly ( I thing because the triangles were the same ).
Can anybody explain it to me ??
Thx in advance
PS This is my first post here so if I made any mistakes with tags or anything please forgive me
[This message has been edited by enmaniac (edited 11-22-2003).]