iphone - OpenGL-ES variable texture alpha (2D)? -


I have a texture with transparency (white triangle with that light notice), and simply it did not make it Alpha Variable .

The drawing code, with the missing piece:

  // the left view glLoadIdentity () in the polygon corner beneath the location; GlTranslatef (center, center, 0); // Draw the "diffuse" layer globbdenactation (GL_digitanti, spittexture [0]); // bind GlDrawArrays (GL_TRIANGLE_STRIP, 0, 4); // offset during development only glLoadIdentity (); GlTranslatef (center X-10, center + 10, 0); // Draw "Specular" layer glActiveTexture (GL_TEXTURE0); Globbdenctación (GL_EnglishEndy, Spitactactation [1]); // bind // Some smart alpha scaling codes are required ... glDrawArrays (GL_TRIANGLE_STRIP, 0, 4);  

Can anyone help me with the appropriate lines of code? Some glBlendFunc, or maybe glTextEnvi stuff I think

OK, I have found it even though I do not know what I did.

  // Place the polygon corner at the bottom left to see. GlLoadIdentity (); GlTranslatef (center, center, 0); // - 1 // Draw the "diffuse" layer glActiveTexture (GL_TEXTURE0); Globbdenctectation (GL_EducationalEndy, SpitTexture [0]); // bind // blending Globefenck (GL_On, GL_On); GlDrawArrays (GL_TRIANGLE_STRIP, 0, 4); // - 2 // Draw "Specular" Layer GlobIndactures (GL_EducationEndy, Spitactation [1]); // bind // blending GlColor4f (Opacity, Opacity, Opacity, Opacity); Globefenk (GLICCRCOLOR, GL_ONMINUSISUSRCCLAAPHA); GlDrawArrays (GL_TRIANGLE_STRIP, 0, 4);  

I tried another way before ...

  glColor4f (1.0f, 1.0f, 1.0f, opacity); Globefenk (GLICCR_ALPHA, GL_ONMIMINUSURSCALAPHA);  

... but the second map was somehow "weak".


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -