Jump to content

  • Log In with Google      Sign In   
  • Create Account

Quick question, Alpha blending


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 alexmoura   Members   -  Reputation: 450

Like
Likes
Like

Posted 22 December 1999 - 06:17 PM

Just q quick question to avoid spending time seaching for it on the docs: does directdraw support any kind of alpha blending or do I just have to code it?
(in 16 bit, 32bit, whatever)
Thanks in advance

Sponsor:

#2 blaze   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 December 1999 - 11:24 AM

If your trying to do a transparent bitmap, the answer is NO, unfortunately, but you can use a texture map with D3DTLVERTEX vertices and render a blended texture mapped square to the screen, with the texture being the bitmap you want to display of course. This also has the advantage of using the 3D acceleration. This is how we do the transparent menus in JAKKAL.

------------------
--Shannon Schlomer, BLAZE Technologies, Inc.


#3 alexmoura   Members   -  Reputation: 450

Like
Likes
Like

Posted 22 December 1999 - 03:40 AM

Dang... Well, thanks anyway. I think I'l just code it myself, and if I find out I need the speed, I'll dig into D3D. Thanks again!

#4 SonicSilcion   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 December 1999 - 04:43 AM

I tried responding before, but my message got "bounced"...Anyways...
__I know DirectDraw doesn't handle it, but I could swear OpenGL can do it in 2D. I wish I had an OpenGL prog book. Can someone confirm/denounce this?

#5 Oofnish   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 December 1999 - 08:14 AM

OpenGL doesn't do 2d stuff very well... it does indeed to alphablending in 3d... and you could project a 3d rendered scene to make it look 2d, and use this feature.. but thats a pretty major waste.

I'd probably laugh pretty heartily if someone used stencil buffered alphablending to blit a font to the screen in a 2d game...

------------------
*oof*


#6 Coder++   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 December 1999 - 06:17 PM

Well, coding an alpha blend routine by hand for use with DirectDraw (I assume you will be using hardware acceleration) will suck...speedwise. It doesn't matter how great you optimize your code. The bottleneck is the bus. Writing to video memory causes an incredible slowdown. If you really want to write your own, your best bet is to not use hardware acceleration for any rendering, and do everything by hand to a system memory buffer, and then only copy that to a video memory backbuffer surface, and flip your primary surface.
However, I simply suggest that you read up on some Direct3D and use TL polygons for your sprites, and texture them with the bitmap. This has numerous advantages, like hardware accelerated scaling, filtering, alpha blending (of course), color modulation, etc...many, many good things.

#7 Melo   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 January 2000 - 01:11 AM

A cool http://www.gamedev.net/reference/programming/features/mmxblend/ can be found here at GDnet. Check it out!

#8 Melo   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 January 2000 - 01:12 AM

A cool http://www.gamedev.net/reference/programming/features/mmxblend/ can be found here at GDnet. Check it out!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS