There is a texture (suppose it is plain text in the image). It is necessary to somehow add the effect of "transfusion" of color, i.e. transition from one color to another. While watching classes GL11 did not find anything. What is the method, or third-party API?

  • Specify what the effect of "transition" in your understanding. - Kromster
  • "Transfusion" of color, i.e. transition from one color to another. - xDark

1 answer 1

The simplest thing is to turn on blending (glBlend) and draw another texture on top, gradually changing its transparency.

glEnable(GL_BLEND); // Π Π°Π·Ρ€Π΅ΡˆΠΈΡ‚ΡŒ смСшиваниС glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Π’ΠΈΠΏΠΎΠ²ΠΎΠΉ Ρ€Π΅ΠΆΠΈΠΌ смСшивания glDepthFunc(GL_LEQUAL); // Π Π΅ΠΆΠΈΠΌ налоТСния (рисуСм Ρ‚ΠΎ Ρ‡Ρ‚ΠΎ Ρ€Π°Π²Π½ΠΎ ΠΈΠ»ΠΈ Π±Π»ΠΈΠΆΠ΅) 

If you are using modern OpenGL, then transfer both textures and time to the shader, and then combine them as you like.

  • It worked. Thank. - xDark