Alpha supported ?

Everything else that doesn't fall into one of the other PB categories.
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post by djes »

Why don't you use DrawingBuffer?
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

djes wrote:Why don't you use DrawingBuffer?
doesn't work with images...
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Any news ?
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

fred any chance to get png alpha support working on 2d sprites??

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

To get it working with simple images would be at least quite good :)
And to have a possibility of getting the whole image to a memory buffer too (and that very easy to implement...)
I'm waiting for this since I registered Purebasic, which is quite a few time now...
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

nco2k wrote:fred any chance to get png alpha support working on 2d sprites??

c ya,
nco2k
Unfortunately, it's not supported by DirectX 7 (and all above DX work with textures and 3D). From the DirectSurface::Blt() doc:
Obsolete and unsupported flags
All DDBLT_ALPHA flag values.
Not currently implemented.
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Post by Amiga5k »

Wow, that's really surprising to hear that DX7 doesn't support that! Is this something that is supported in, say, DX9? (Or, if not that, then maybe OpenGL ;) )

Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
Steve Elliott
Enthusiast
Enthusiast
Posts: 109
Joined: Sun Jan 01, 2006 9:34 pm
Location: Wales, UK

Post by Steve Elliott »

Why can't you use Sprite3d?
Project S: loading...
Intel Core2 Duo E7200 @ 2.53Ghz, 3Gb RAM Intel G45 Express
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

because 2d sprites are more flexible imo. they dont get blured / filtered and can have any size you like.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Please, Fred, could you give me infos about the alpha of png files not loaded when using LoadImage ? the Point function only returns the rgb value, no rgba :( Same when using GetDIBits()
This is a feature I really need :(
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

If you use DrawAlphaImage() and it works, then the infos are here, i don't know why getdibbits doesn't work (you tell it to use 32 bits ?).
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

nco2k wrote:because 2d sprites are more flexible imo. they dont get blured / filtered
You can set the spritequality() to 0, and no filtering will occur.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Fred wrote:If you use DrawAlphaImage() and it works, then the infos are here, i don't know why getdibbits doesn't work (you tell it to use 32 bits ?).
I'm going to see it closer, I'll tell you here if it works. 8)
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

Fred wrote:
nco2k wrote:because 2d sprites are more flexible imo. they dont get blured / filtered
You can set the spritequality() to 0, and no filtering will occur.
actually it will always get filtered in some way.

with Sprite3DQuality(0) it wont get filtered as much as with Sprite3DQuality(1) of course, but it will still get filtered. it seems to be a direct3d issue (or maybe driver settings). i have played a lot with this in pb a time ago and also saw this "feature" often in the c/c++ written oldschool emus, where i can choose between directdraw and direct3d. the result was, direct3d always "smoothed" the sprites, even when i turned off the smoothing.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

I've tested DrawAlphaImage, you're right, it does work.
But if I try to do it manually (i retrieve the pixels with point, and draw them with plot), it does NOT work, even though Point should gives the alpha value along with the rgb, no ?
Gonna see with getdibits.
Post Reply