Home Forums Programming transparency question

Welcome to our forums. These forums were active from 2003-2014. We have now decided to close them down, but will leave them here as an archive.

Remember you can send us feedback, news, jobs and content ideas by clicking here.

If you're really stuck for time, email news@gamedevelopers.ie.

You can also follow us on Twitter @gamedev_ie 



This topic contains 2 replies, has 2 voices, and was last updated by  peter_b 12 years, 6 months ago.

  • Author
  • #4357


    been a while since i did any 2d stuff especially with dx9, mostly did it with 7\8.

    Can any of ye tell me for the colorkey to work in loading a bitmap to a IDirect3DSurface9 surface does alpha blending need to be switched on in the renderstate of the direct3d device? coz i banged together a bit of code the other night, but seems that all my bitmaps have a black box around them, even though i set a colorkey (transparency on pink), backgrounds of the bitmaps are pink because its a colour which is used no where else in the game. but still get a black box around the bitmap.. really screwing up the effect of my aliens and ray gun particles.. :)

    Anyway if anyone can shed a light twould be nice.

  • #23191


    Is colour keying supported with IDirect3DSurface9? Last time I did anything in 2D I used Direct Draw 7 surfaces. And didn’t need to do anything aside from setting the color key per surface…

    My understanding is that after 7 the directx dev group stopped supporting a proper 2D pipeline, and expected you to switch over to using alpha channels and all that to suit the hardware they now assumed everyone would have, infuriating quite a few developers in the casual market. (There’s something of a rant about it in Game Coding Complete)

  • #23216


    cheers ill check that up. i do know though that colokeys are supported in directx8. ill have to check 9 so.

The forum ‘Programming’ is closed to new topics and replies.