Re: Problem cleaning up after using vertex buffer.

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Rich [Microsoft Direct3D MVP] (legalize+jeeves_at_mail.xmission.com)
Date: 06/11/04


Date: Fri, 11 Jun 2004 12:59:23 -0700


[Please do not mail me a copy of your followup]

"=?Utf-8?B?SkI=?=" <JB@discussions.microsoft.com> spake the secret code
<212526C3-8FA2-4F31-9F64-A93B7C601F79@microsoft.com> thusly:

>Ok.. so I tried to take my first step to create a 3D object with
>VertexBuffers but I have a problem cleaning up. For some reason, after I
>do CreateVertexBuffer call and I try to exit the application, it keeps
>saying "reference count for D3D object is non-null". I am releasing the
>vertex buffer before I exit the application, and I'm using
>D3DPOOL_MANAGED for vertex buffer.

You must have outstanding references to the device, or an object on
the device. If you have the debug runtime installed, it should be
telling you exactly what resources you haven't released.

-- 
"The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ:
          <http://www.xmission.com/~legalize/book/>
	    Pilgrimage: Utah's annual demoparty
               <http://pilgrimage.scene.org>


Relevant Pages

  • Re: Directdraw
    ... Not necessary if you use DrawIndexedPrimitiveUP and besides this is ... >After all this you have to deallocate the vertex buffer. ... DrawLine is GDI, not DirectDraw. ... "The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ: ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: problem of calling D3DXLoadMeshFromX
    ... [Please do not mail me a copy of your followup] ... >buffer or vertex buffer is write only. ... What you can do is load it into a system memory mesh, ... "The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ: ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Info from VertexBuffer
    ... [Please do not mail me a copy of your followup] ... >info about vertices from vertex buffer? ... "The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ: ...
    (microsoft.public.win32.programmer.directx.graphics)