以下の内容はhttps://toburau.hatenablog.jp/entry/20060720/1153419676より取得しました。


テクスチャの透明色

テクスチャを描画するときに透明にしたい部分はSetColorKeyか、SetColorKeyPosで設定する。色で指定する場合はSetColorKeyを、指定した座標のピクセル色を使う場合はSetColorKeyPosを使う。この設定は画像イメージを読み込む前に行う必要がある。

GlTexture tex;

tex = new GlTexture();
tex.SetColorKey(0,0,0);   // 色で指定する場合
tex.SetColorKeyPos(0,0);  // 座標で指定する場合
tex.Load("image.jpg");

描画するときには、Screen2DGIでBlendSrcAlphaを指定する。

Screen2DGl screen;

screen.BlendSrcAlpha();
screen.Blt(tex, 0, 0);

TextureLoaderを利用するときには、色で指定する場合も座標で指定する場合もSetColorKeyを使う。

SmartTextureLoader smartLoader;
smartLoader = new SmartTextureLoader();

TextureLoader texLoader = smartLoader.LoadDefFile("texlist.txt");
texLoader.SetColorKey(0,0,0);  // 色で指定する場合
texLoader.SetColorKey(0,0);    // 座標で指定する場合



以上の内容はhttps://toburau.hatenablog.jp/entry/20060720/1153419676より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14