Re: IDirect3DSurface9 and alpha channels

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Run DXCapsViewer on this card. Check out its capabilities, and see what kind
of hardware blending it offers (frame buffer alpha and texture stage
blending)...

--
Wessam Bahnassi
Microsoft DirectX MVP,
Lead Programmer
In|Framez
--
In|Structurez Arabic Gamedev Community
www.instructurez.com


"hamlatzis" <hamlatzis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CC94427B-A9A0-4411-B8CA-DE7844D74715@xxxxxxxxxxxxxxxx
> As promissed, the technical spec of minimum hardware:
>
> VGA: VIA/S3G UniChrome IGP with 32MB shared memory
>
> total RAM : 512MB (of those 32MB are shared with video card)
> CPU : 1GHz
>
> Iosif
>
> "Eyal Teler" wrote:
>
>> What kind of hardware graphics card are you using? For years cards
>> have been able to use non-power-of-2 textures (with some conditions).
>> Also, what kind of per-pixel operations does this card support?
>>
>> Also, what kind of blending do you want? I can understand blending two
>> images with one alpha channel (determining who much of each to
>> choose), but if both have alpha channels, how are you planning to use
>> this?
>>
>> Eyal
>>
>> hamlatzis wrote:
>> > Thanks alot.
>> >
>> > The reason I'm loading the images onto surfaces has to do with memory
>> > consumption and frame rates. I'm implementing a game that runs full
>> > screen
>> > 800x600 and I am given a minimum hardware that has to run onto. This PC
>> > has
>> > an onboard AGP card and it supports textures with power of 2
>> > dimensions. When
>> > I've tested the software even without blending (for special effects)
>> > but
>> > using textures, the frame rate dropped to a point that there were no
>> > fps to
>> > apply the game's logic. On the other hand when using surfaces, again
>> > obviously without any blending, the rendering speed was acceptable to
>> > perform
>> > the game's logic.
>> >
>> > I thought there was a way to do blending with surfaces, as I can use
>> > D3DXLoadSurfaceFromFile to load the image without losing the alpha
>> > channel on
>> > a surface, I've tested this as I saved the image back to a temp file
>> > using
>> > D3DXSaveSurfaceToFile and haven't lost the alpha channel.
>> >
>> > If using GDI I could do a crude transparency with:
>> >
>> > BitBlt(hdcTemp, 0, 0, ptSize.x, ptSize.y, hdcBack, 0, 0, SRCAND);
>> > BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdcTemp, 0, 0, SRCPAINT);
>> >
>> > why shouldn't I be able to do the same or even a more sophisticated
>> > (semi)transparency with alpha channels using directX?
>> >
>> > Back to drawing board.
>> >
>> > "Wessam Bahnassi" wrote:
>> >
>> >
>> >>There isn't a HW-accelerated way to blend two IDirect3DSurface9 objects
>> >>together.
>> >>You can however lock them and do the blending by hand if you don't need
>> >>real-time operation. BTW, even if your images are 800x600, I don't see
>> >>any
>> >>reason stopping you from putting them into textures... You can either
>> >>stretch them to cover a full 1024x1024 texture or just make them use a
>> >>sub
>> >>rect of that texture...
>> >>
>> >>--
>> >>Wessam Bahnassi
>> >>Microsoft DirectX MVP,
>> >>Lead Programmer
>> >>In|Framez
>> >>
>> >>"hamlatzis" <hamlatzis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >>news:9ADB122D-6C5E-4EBA-BE1F-E61EC0B4B037@xxxxxxxxxxxxxxxx
>> >>
>> >>>I'm loading two images that have alpha channels using
>> >>
>> >>D3DXLoadSurfaceFromFile
>> >>
>> >>>and want to use each image's alpha channel to blend them together, but
>> >>>obviously I'm doint something wrong as I only see the top image. I
>> >>>dont'
>> >>
>> >>want
>> >>
>> >>>to use textures as my images are 800x600 pixels.
>> >>>
>> >>>Can someone help me?
>> >>>
>> >>>Thanks
>> >>>
>> >>>Iosif
>> >>
>> >>
>> >>
>>


.



Relevant Pages

  • Re: IDirect3DSurface9 and alpha channels
    ... textures rendering, then rest assured it doesn't support alpha blending at ... > Now as far as your question about the images and their alpha channel, ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: IDirect3DSurface9 and alpha channels
    ... what kind of per-pixel operations does this card support? ... I can understand blending two ... >> an onboard AGP card and it supports textures with power of 2 dimensions. ... >> D3DXLoadSurfaceFromFile to load the image without losing the alpha channel on ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: D3D: Qberschneidende_Grafiken?=
    ... Bei korrekter Transparenz führt an dem Sortieren kein Weg ... > Transparenz mit Alpha Kanal in der Textur und Alpha ... Mit Alphakanal direkt in der Textur ... Bei der Alpha Blending (er heißt ja Alpha Blending, ...
    (microsoft.public.de.german.entwickler.directx)
  • Re: Graphic options for DS10L
    ... once the card has been initialized - the standard is ... openGL does ?), would OpenGL need to have intimate knowledge of the card ... (perhaps because of their issues with BIOS in the past). ... "may" find it's way into Alpha to keep the code stream from diverging - ...
    (comp.os.vms)
  • Re: SGI using ATI Chips?
    ... OpenGL, and mipmapping is definitely supported. ... The only reason I can see why alpha blending isn't supported, is, ...
    (comp.sys.sgi.misc)