• Content count

  • Joined

  • Last visited

Community Reputation

110 Neutral

About redcoding

  • Rank
  1. Hello, I need some help understanding what I am doing wrong. I am drawing text into a texture and then render this texture to the screen. The texture used is a grayscale texture. Why? Because the tutorial I have the code from says it saves memory. OK, so I have white text that I need to color. That means I want to color my grayscale texture when I am drawing it. But the result turns out to be unsatisfying. I am drawing the texture with a quad, each vertex getting the color red and full alpha (1,0,0,1); Result 1: I use this code for blending: glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); The red is as expected (full red), but the alpha channel is opaque. Result 2: glEnable(GL_BLEND); glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); With this code, I can remove the black background, but the red is rather pale. Which settings could I use to remove the black background and keep the full red color? Or is this not possible and I should use an RGBA texture in the first place? I could then color the text when rendering it to the texture. Anyway, I want to understand what is going on, before I decide to spend more memory.