Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Blending issue, please post some advise ..

This topic is 5321 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all I want to blend an image in DX using the alpha channel. Below is the code I use to make the Blend_Buffer to rendered later on: --- CODE --------------- data.color = D3DCOLOR_RGBA(alpha, alpha, alpha, 0); if(FAILED(D3D_Device->CreateVertexBuffer(sizeof(data), 0, D3DFVF_D3DVertexDif, D3DPOOL_DEFAULT, &Blend_Buffer, NULL))) { //.. error message goes here } Vertex* vertices; if(FAILED(Blend_Buffer->Lock(0, sizeof(data), (void**)&vertices, 0))) { //.. error message goes here } memcpy(vertices, Blend_Data, sizeof(data)); Blend_Buffer->Unlock(); --- CODE END --------------- BUT I want to do this at RUNTIME, and I think the Lock and Unlock operations slow things down - is there any other way to blend an image in DX ??, or is this the way its done ?? thanks [edited by - Mille on February 29, 2004 8:58:33 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!