Hi all,
Heres a quick question for you....
I'm doing some work on our game engine and I want to add something to the main screen, but I want it to be alpha blended.
I create a surface and fill it with black (0) for transparency, then I draw on it. I want to draw a section of this on the main screen using alpha blend so the user can see whats underneath, but all I get is nothingness. No errors, just nothing.
As soon as I change the drawAlpha to draw, it works.
So my code goes something like this:-
Apologies if the syntax isn't quite right, and just figured I'd ask the question in case anyone else has encountered this problem and has found a solution.Code:.... // Create the surface 'mySurface' .... // Draw on the surface 'mySurface' .... // Draw a portion of 'mySurface' on the main surface fDXDraw.surface.drawAlpha(dstRect,srcRect,mySurface,true,150); ....
That code doesn't work, but draw(left,top,srcRect,mySurface,true); (again, apologies if the syntax isn't quite right) does. Any ideas? Its not a show stopper, but alpha is just much nicer and it doesn't obscure the players view completely.
Bookmarks