Jump to content
  • Advertisement


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


Blending issue, please post some advise ..

This topic is 5403 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!