Archived

This topic is now archived and is closed to further replies.

amish1234

DrawPrimitiveUP question

Recommended Posts

Let''s say I''m rendering with DrawPrimitiveUP and I am using a transformation matrix. After redering, if I go look at the vertices, will they be modified (multiplied by the transformation matrix)? ___________________________________________________________ Proceeding on a brutal rampage is the obvious choice.

Share this post


Link to post
Share on other sites
As Lupin concisely put it. No.

The "Draw*Primitive*" calls are one way - output only you can''t get the result of a transformation half way down the pipeline.


If you do need the transformed result, use ProcessVertices(). Beware PV() is always run on the CPU without any GPU assistance (GPUs are write only - which is why the Draw* calls are)

--
Simon O''Connor
3D Game Programmer &
Microsoft DirectX MVP

Share this post


Link to post
Share on other sites
So if I called ProcessVertices(...) instead of DrawPrimitive(...) then nothing would get drawn but my triangle array would get modified?

___________________________________________________________
Proceeding on a brutal rampage is the obvious choice.

Share this post


Link to post
Share on other sites
quote:
Original post by amish1234
So if I called ProcessVertices(...) instead of DrawPrimitive(...) then nothing would get drawn but my triangle array would get modified?

ProcessVertices doesn''t do in-place transformation, you pass it a a destination vertex buffer that''s filled with the transformed vertices.
And yes, nothing will be rendered.

Muhammad Haggag

Share this post


Link to post
Share on other sites