Texturing from alpha data to RGBA data

Hi experts,
Can anyone please tell me how to apply GL_ALPHA texture to GL_RGBA?

I mean how can i use glTexImage2D ( GL_TEXTURE_2D, 0, GL_ALPHA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels );
In this code if do so it won’t convert the things and gives o/p as (0,0,0,255) but expected o/p is (0,0,0,A).

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.