Skip to main content
GameDev.net gamedev.net
🔒 Locked

Alpha Blending D3D Problems

Started by Theta_Alpha Jun 15, 2002 at 11:55 AM 0 replies 350+ views
Original Post
Theta_Alpha
Theta_Alpha
Thanks guys for sending me to: http://64.33.37.114/ddab.html That really helped me out alot. The only problem im having now is this guys function: LPDIRECTDRAWSURFACE7 MGM_LoadBitmap(LPDIRECTDRAW7 lpDD,LPDIRECT3DDEVICE7 lpDevice,char * string,DDPIXELFORMAT surfaceformat); I tried to load a bitmap and it jumped out of the game! I tested the D3D and D3D Device objects for if they worked and they all succeeded. So im thinking that I did something wrong with the DDPIXELFORMAT structure when I passed it. Everything compiles fine it just screws up right as soon as I load a bmp with that function. ex. SurfaceRequest requester; ZeroMemory(&requester,sizeof (requester)); requester.BPP=32; requester.AlphaBits=8; requester.FoundIt=false; lpDevice->EnumTextureFormats(( LPD3DENUMPIXELFORMATSCALLBACK )EnumTextures, ( void* )&requester ); if (requester.FoundIt==false) { PostQuitMessage(0); } lpdds7 = MGM_LoadBitmap(lpdd7,lpDevice,"footman.bmp",requester.ddpf); I got that from the site and of course I thought that the code above would fill with all the necessary DDPIXELFORMAT info before loading the bitmap. Please, if you have gotten this guys code to work show me what I am doing wrong [edited by - Theta_Alpha on June 15, 2002 2:59:12 PM]
Gamma Particles go at speeds of 3.0E10 meters per second. Knowing this we can presume that cells in living organisms can be altered due to the speed of these Gamma Particles.
Daemonae
Daemonae
Standard BMP files do not contain Alpha channel, they only support 24-bit RGB color data. You will need to either use a non-standard loader and creation application for BMPs or use another format like PNG which has innate support for the Alpha channel.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.