Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

Load png Image to create texture

$
0
0

I created image texture brush with texture image and like water color brush. in draw method load image texture and need to load png but in my case , png image not set a image texture for draw brush

void TextureBrush::setBrushTexture(std::string textureName){
    this->textureName = textureName;

        std::string name("textures/" + this->textureName + "-" + "1" + ".png");
        this->textures.load(name);
        this->textures.getTexture().generateMipmap();
        this->textures.getTexture().setTextureMinMagFilter( GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR);

    this->textureSize = this->textures[0].getWidth();
}

png available in given path when load jpg image it is OK .(OpenFramework version 11)

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles