0

SDL_Texture の不透明度を変更するにはどうすればよいですか? そして、関数に不透明度を適用する方法がわかりません。

私のコード

    void drawTexture(SDL_Texture *img, int x, int y, int width, int height, double opacity)
    {
        SDL_Rect SrcR;
        SDL_Rect DestR;

        SrcR.x = 0;
        SrcR.y = 0;
        SrcR.w = width;
        SrcR.h = height;

        DestR.x = x;
        DestR.y = y;
        DestR.w = width;
        DestR.h = height;

        SDL_RenderCopy(_main::_main_renderer, img, &SrcR, &DestR);
    }
4

2 に答える 2