RE: Exception raised when drawing many circles
- From: Olivier Lauffenburger <utanapishtim@xxxxxxxxxxxxxxxxx>
- Date: Thu, 8 Sep 2005 02:01:03 -0700
Sorry if I have not been clear enough in the explanation of the PIX file.
Actually, these D3D calls are those made by the class Line itself (and
probably by ID3DXLine underneath) ! I do not use
DrawIndexedPrimitives(D3DPT_TRIANGLELIST) at all in my code. It is called by
the line engine, probably after it has broken down the stippled line into
triangles.
This is also the case when I point out that a call to
ID3DVertexBuffer9::Unlock() is missing. The method ID3DXLine::DrawTransform()
seems to make the following repeated calls :
IDirect3DVertexBuffer9::Lock()
IDirect3DDevice9::GetViewport()
--- here it probably fills the vertex buffer used internally by the line
engine ---
IDirect3DVertexBuffer9::Unlock()
IDirect3DDevice9::DrawIndexedPrimitives(D3DPT_TRIANGLELIST)
At one moment in my PIX file (call 71127), we can see that the line engine
locks its internal vertex buffer but it does not unlock it. After that, all
the calls to
IDirect3DDevice9::DrawIndexedPrimitives() made by ID3DXLine::DrawTransform()
are doomed to fail.
--
Olivier Lauffenburger
Missler Software
"Rhett Gong [MSFT]" wrote:
> From your PIX log, you called DrawIndexedPrimitive as following:
> //----------------------------------------
> IDirect3DDevice9::DrawIndexedPrimitive(
> D3DPT_TRIANGLELIST, // D3DPRIMITIVETYPE Type,
> 0, // INT BaseVertexIndex,
> 0, // UINT MinIndex,
> 4, // UINT NumVertices,
> 0, // UINT StartIndex,
> 2); // UINT PrimitiveCount
> //---------------------------------------
>
> In the code, you pass 4 vertices and want 2 trianglelist primitives, this is why you get the invalid call error. you may need to carefully check the indexed buffer first and make
> this call then.
>
> Thanks,
> Rhett Gong [MSFT]
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp&SD=msdn
>
> This posting is provided "AS IS" with no warranties and confers no rights.
>
>
.
- Follow-Ups:
- RE: Exception raised when drawing many circles
- From: Rhett Gong [MSFT]
- RE: Exception raised when drawing many circles
- References:
- Exception raised when drawing many circles
- From: Olivier Lauffenburger
- RE: Exception raised when drawing many circles
- From: Rhett Gong [MSFT]
- RE: Exception raised when drawing many circles
- From: Olivier Lauffenburger
- RE: Exception raised when drawing many circles
- From: Rhett Gong [MSFT]
- Exception raised when drawing many circles
- Prev by Date: RE: Exception raised when drawing many circles
- Next by Date: DexterLib.dll
- Previous by thread: RE: Exception raised when drawing many circles
- Next by thread: RE: Exception raised when drawing many circles
- Index(es):
Loading