Results 1 to 2 of 2

Thread: Help making a render target transparent

  1. #1

    Help making a render target transparent

    I'm making this:

    I want to make the black area transparent, and I need help. What I'm doing is drawing the 3D red cylinder in a texture, using setRenderTarget. The texture is created this way:

      D3DXCreateTexture(_scene.device, _width, _height, 1,
    To draw on it I use:

        _texture.GetSurfaceLevel(0, surf);
        _device.SetRenderTarget(0, surf);
      _device.Clear(0, nil, D3DCLEAR_TARGET or D3DCLEAR_ZBUFFER, _backColor,
        1.0, 0);
    The I use a ID3DXSprite instance to draw the texture in the screen, so it is placed in the right level of the graphical interface.

    Setting the back color's alpha = 0 doesn't make the background transparent, as I supposed. Is there a way to make the rendering texture's background transparent? I have no clue what to do.

    I would really appreciate any help on this.

  2. #2

    Help making a render target transparent

    I found the problem myself, I was using a XRGB color instead of ARGB :lol:


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Comodo SSL