Original Post
🔒 Locked
Transparency + Surfaces
Advertisement
When loading the bitmap into a texture via D3DXCreateTextureFromFileEx, you can specify a "colorkey" - a color that is searched for in the bitmap, and replaced with a transparent color. Then, you enable alpha-testing and render whatever you want with your texture - the transparent pixels won't be drawn.
You can also try creating an offscreen surface and loading the image to it. This can be done by calling following functions:
IDirect3DDevice9::CreateOffscreenPlainSurface
D3DXLoadSurfaceFromFile
This API allows the color key to be used too. Also call D3DXGetImageInfoFromFile can become handy if you decide to try this.
-nuc
IDirect3DDevice9::CreateOffscreenPlainSurface
D3DXLoadSurfaceFromFile
This API allows the color key to be used too. Also call D3DXGetImageInfoFromFile can become handy if you decide to try this.
-nuc
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement