Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Transparent png doesn't bind to ofMesh

$
0
0

@antocreo wrote:

Hi,
I am trying to bind a transparent png to a ofMesh. The png is a simple white hexagon on transparent background.
My aim is binding that to a mesh with 6 vertices and use it as a mask. However I get a strange behaviour. The mesh doesn't show up when I draw it but if I draw it together with the image, I can see it.
I don't get it.

Any good hint anyone please?

Thanks

        ofPushMatrix();
        ofTranslate(500,500);
        ofEnableAlphaBlending();
        maskImg.getTextureReference().bind();
//        maskImg.draw(100, 100); // if I uncomment this I see nothing.
        mymesh.draw();
        maskImg.getTextureReference().unbind();
        ofDisableAlphaBlending();
        ofPopMatrix();

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles