0
我可以使用alpha通道精細繪製圖像, 但無法通過顏色參數修改Alpha通道。只有8位紋理使用額外的alpha通道繪製精靈
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);
}