Is It possible to draw a MASKED bitmap in to an Already loaded texture object ?
I tried to draw a bitmap into my Loaded texture with next commands.
I am trying to solve the problem by glTexSubImage2D. This function is modifying
my loaded texture but the result is not MASKED. It modifies my texture by
drawing all the pixels but for example I dont want to draw Black areas of my
// I am first binding my original texture
// Now I am drawing my bitmap into Texture1
// (Mypbits is a pointer to my second image pixels)
glTexSubImage2D(GL_TEXTURE_2D, 0, x,y, w,h, GL_BGRA, GL_UNSIGNED_BYTE,
p.s.: I have also tried Enabling ALPHA and setting Alpha Function at the
begining of code , but it doesn’t worked.
My second image is in RGBA format. And I want to use Alpha or some color mask.
Could you helpme ?