带有额外阿尔法通道的绘图角色



>我可以用阿尔法通道精细地绘制图像, 但无法通过颜色参数修改 Alpha 通道。

试过这个:

d3dImage->Begin(D3DXSPRITE_ALPHABLEND|D3DXSPRITE_SORT_DEPTH_BACKTOFRONT|D3DXSPRITE_DO_NOT_ADDREF_TEXTURE);

我正在使用精灵来渲染矩形和图像:

void DrawRect(float x, float y, int width, int height, DWORD color)
{
imgPosition.x = x;
imgPosition.y = y;
imgSize.left = 0;
imgSize.right = width;
imgSize.top = 0;
imgSize.bottom = height;
d3dImage->Draw(texWhite, &imgSize, NULL, &imgPosition, color);
}

仅适用于8 位纹理。

最新更新