コード例 #1
0
//Construct texture given filename
GLTexture::GLTexture( GLenum target, const char *fileName, bool mipmap):
	_target(target)
{
    XTRACE();
    SDL_Surface *image;
    IMG_InvertAlpha(1);
    if( (image = IMG_Load( fileName)) == 0)
    {
	fprintf(stderr,"Couldn't load %s: %s\n", fileName, SDL_GetError());
        _textureID = 0;
        _image = 0;
    }
    else
    {
        init( image, mipmap);
    }
}
コード例 #2
0
	int Image::InvertAlpha(int on)
	{
		return IMG_InvertAlpha(on);
	}