K so Im trying to give my Directx menu a transparent background.
I know I have to change the Alpha value while Defining the Directx color
Code:
#define BLACK D3DCOLOR_ARGB(150, 000, 000, 000)
D3DCOLOR_ARGB means (A, R, G, B)
the A is Alpha While changing it to 0 or 255 Not changes.
Anyone has another solution to make BLACK Transparent?
Originally Posted by xCyberxx
K so Im trying to give my Directx menu a transparent background.
I know I have to change the Alpha value while Defining the Directx color
Code:
#define BLACK D3DCOLOR_ARGB(150, 000, 000, 000)
D3DCOLOR_ARGB means (A, R, G, B)
the A is Alpha While changing it to 0 or 255 Not changes.
Anyone has another solution to make BLACK Transparent?
I've never dealt with DirectX before because I write all of my projects in C (I use GDI). I pulled this from the article (URL below)
"In color blending, each primary color is multiplied by some pre-determined factor. While this can get quite complex, building a simple color blend is quite simple. Before you begin rendering, you tell Direct3D what it should use for these factors. Usually, you will use an object's Alpha channel. We'll go over how this is done in a moment.
When you select what factor is to be used, Direct3D always translates that value into a FLOAT between 0.0 and 1.0.
In color blending, each primary color is multiplied by some other number between 0.0 and 1.0. Where that number comes from, you will determine (we'll go over how in the next section).
For example, if you were to create a semi-transparency effect, you might use a model's alpha channel. The alpha channel (which is a value between 0 and 255) gets translated into a value between 0.0 (fully transparent) and 1.0 (fully opaque). The color is then multiplied by new number. If the alpha were 192 (or .75 once translated), then the color would show at 75 of its usual brightness. All you would then have to do is add 25 of whatever was behind that (we'll go over this in a bit as well)"
You are correct about using the alpha values. Dunno if it will help you though, but the basic principal does regard color opacity.