🔒 Locked
ProcessVertices() & Vertex Buffers...
Advertisement
Original Post
Has anyone used ProcessVertices() with their vertex buffers yet? I noticed that, by specifying a flag, one can clip vertices that aren''t in the viewing frustum. My question is: How does this affect the destination vertex buffer? And how do I draw the resulting (processed) vertex buffer when I''m done?
Example:
Let''s say we''ve got a model with 1000 polygons in it, stored in a vertex buffer named srcVB. Normally, we would call DrawIndexedPrimitiveVB() on it, and drawing it as a TRIANGLELIST. Instead, let''s say we do the following:
destVB -> ProcessVertices(DO_CLIPPING, srcVB, 1000);
OK, now that we''ve done the clipping:
a) Are all 1000 entries in destVB filled up? Are polygons that were clipped marked in some way?
b) How do I draw it? Can I now call: DrawIndexedPrimitiveVB(TRIANGLELIST,destVB, 1000, model_indices_list)?
Lookin'' for some advice/experience here...
Vyvyan
Clipping affects the destination buffer in that for each vertex a flag is set if the vertex is not visible. That is all that is done in ProcessVertices(). All vertices are transformed and lit even if they are visible or not. The actual clipping isn''t done until the triangles are rendered, then they use these flags to quickly determine which triangles needs to be clipped or not.
You draw from the processed vertex buffer just like you would from the original one, with Draw(Indexed)PrimitiveVB(). (like you wrote in your post)
- WitchLord
You draw from the processed vertex buffer just like you would from the original one, with Draw(Indexed)PrimitiveVB(). (like you wrote in your post)
- WitchLord
Again, thanks Witchlord. You seem to be one of the few here that knows about these esoteric interfaces. Thanks again!
Vyvyan
Vyvyan
Who the hell is Witchlord? This is the first time I see him. I''m sure he doesn''t know what he''s talking about! Vyvyan Basterd, don''t listen to what he''s saying. He''s probably crazy or something.
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
Who''s that idiot Victor? I don''t know anybody with the name of Victor. And who are you? Are you famous around here? I have never seen you even though I''ve been hanging around here day and night. Worse than a hawk. I want an explanation!
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
JUST DO IT!!!!
V don'' ''ve time 4 reading those crap!! PLEEEEEEZ!!!
V don'' ''ve time 4 reading those crap!! PLEEEEEEZ!!!
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement