Results 1 to 7 of 7

Thread: [RESOLVED] SeeThrough objects [VB6]

  1. #1

    Thread Starter
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Resolved [RESOLVED] SeeThrough objects [VB6]

    Everytime i solve a problem, i seem to get another 2 more

    I have finally managed to draw 3D objects (*.x files) but for some reason, the textures become transparent and hence i'm able to see through them. Is there a way to stop this?
    Attached Images Attached Images  
    Last edited by Andrew G; Mar 6th, 2006 at 04:27 AM.

  2. #2
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: SeeThrough objects [VB6]

    Show me the code. It seems alphablending has been enabled.

  3. #3

    Thread Starter
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: SeeThrough objects [VB6]

    Heres a simple version of my overcomplicated project

    Also For some reason i seem to have stuffed up the way that box is show so it tends to change shape.
    [Edit]Fixed the weird box thing - comment out
    VB Code:
    1. Direct3D_Device.SetRenderState D3DRS_SRCBLEND, D3DBLEND_SRCALPHA
    Attached Files Attached Files
    Last edited by Andrew G; Mar 7th, 2006 at 06:36 AM.

  4. #4
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: SeeThrough objects [VB6]

    Set this line to false:

    VB Code:
    1. Direct3D_Device.SetRenderState D3DRS_ALPHABLENDENABLE, [b]True[/b]

  5. #5

    Thread Starter
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: SeeThrough objects [VB6]

    Nope didn't work

  6. #6
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Re: SeeThrough objects [VB6]

    Um.. what do you except when not enabling the Z-buffer?

    'Init
    Direct3D_Window.EnableAutoDepthStencil = 1

    'Clear
    Direct3D_Device.Clear 0, ByVal 0, D3DCLEAR_TARGET Or D3DCLEAR_ZBUFFER, D3DColorRGBA(0, 0, 0, 0), 1, 0

  7. #7

    Thread Starter
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: SeeThrough objects [VB6]

    Thanks so much, it worked
    Last edited by Andrew G; Mar 15th, 2006 at 01:50 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width