Help with DirectDraw Alpha Effect in Blt()

How do you use alpha effects with DDraw?

Page 1 of 1

0 Replies - 4576 Views - Last Post: 29 April 2006 - 01:58 PM Rate Topic: -----

#1 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 783
  • View blog
  • Posts: 7,610
  • Joined: 05-May 05

Help with DirectDraw Alpha Effect in Blt()

Post icon  Posted 29 April 2006 - 01:58 PM

Here is the code I use to draw images:
void draw(int xpos,int ypos,int xto = -1,int yto = -1)
	{
  // Draws this image as it would be shown normally
  src.bottom = height;
  src.left = 0;
  src.right = width;
  src.top = 0;
  dst.bottom = ypos+height;
  dst.left = xpos;
  dst.right = xpos+width;
  dst.top = ypos;
  // Are we scaling?
  if(xto != -1 && yto != -1)
  {
 	 dst.right = xto+xpos;
 	 dst.bottom = yto+ypos;
  }
  if(FAILED(back->Blt(&dst,data,&src,DDBLT_WAIT | DDBLT_KEYSRC,NULL)))
 	 error_debug("DirectX Normal 2D Image Draw Error. Either your video card sucks or DirectX is broken.");
  fatal_debug("***Drawing Error.***");
	}



What must I do to the function or DDBLTFX struct to get alpha effects working. I have already played with the values in DDBLTFX and DDBLT flags and that doesn't work.

*** Do not refer me to another site, i've already been everywhere else.
*** Do not tell me a software equivalent method, it must be accelerated by hardware.


Is This A Good Question/Topic? 0
  • +

Page 1 of 1