Category : alpha

I’m trying to render font on screen using freetype. For that, I implemented single channel texture but it always samples 0. cpp unsigned char *blankData = new unsigned char[8 * 8]; for(int i = 0; i < 8 * 8; i++){ blankData[i] = 126; } glActiveTexture(GL_TEXTURE0); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); GLuint m_texture2D; glGenTextures(1, &m_texture2D); glBindTexture(GL_TEXTURE_2D, m_texture2D); glTexImage2D(GL_TEXTURE_2D, ..

Read more