Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- From: "R.Wieser" <address@xxxxxxxxxxxxx>
- Date: Mon, 9 Jul 2007 11:58:43 +0200
Richard [Microsoft Direct3D MVP] <legalize+jeeves@xxxxxxxxxxxxxxxxx> schreef
in berichtnieuws #tZH$FYwHHA.4736@xxxxxxxxxxxxxxxxxxxxxxx
Hello Richard,
If you don't want to calculate it, then you could always pass the full
range of indices on your buffer, but that would slow things down.
Actually, as I can't seem to find any information about what is needed (the
actual calculation or even a description to it) and I do not know what
happens if I provide it with a too-low number (again, no info to be found),
that looks to be my *only* option.
And yes, I can understand that that would slow-down the whole considerably,
but what am I to do ?
The entity that knows this relationship is the entity that loads
the primitives into the vertex/index buffers. That is your
application. When you construct the primitives, make note
of the range of indices in some data structure and be done
with it.
I've allready done pretty-much that (defining a structure that holds all the
info for a simple model : the vertexbuffer and indexbuffer and
texture-object handles, the size of those buffers, as well as translation
and rotation for the model). But even if I would want to store those
numbers into such a structure how can I as I do not even know how to
calculate them ? :-\
I did find a 170MByte copy of the v8.1 SDK (a struggle in itself), and found
a nice help-file in there. Imagine my disappointment and frustration when
it did not have any specific info about that calculation either.
It *looks* like it is saying that it wants to know how many primitives will
actually be drawn (like I can, for a cube, draw 12 triangle primitives with
only 8 vertices), but with all this conflicting information (like the one
which seemed to suggest that it needed to buffer a range of vertices and
thus a simple "ceil((HighestUsedVertex-LowestUsedVertex) div
VerticesPerShape)" should be used) I cannot be sure.
Regards,
Rudy Wieser
.
- Follow-Ups:
- Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- From: Richard [Microsoft Direct3D MVP]
- Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- References:
- Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- From: R.Wieser
- Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- From: Richard [Microsoft Direct3D MVP]
- Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- From: R.Wieser
- Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- From: Richard [Microsoft Direct3D MVP]
- Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- Prev by Date: Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- Next by Date: starting with directx
- Previous by thread: Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- Next by thread: Re: A beginner in DirectX - A question about DrawIndexedPrimitive
- Index(es):
Relevant Pages
|