Skip to main content
gamedev.net
🔒 Locked

ProcessVertices() & Vertex Buffers...

Started by VyvyanBasterd Aug 17, 2000 at 11:34 PM 7 replies 550+ views
Original Post
VyvyanBasterd
VyvyanBasterd
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
WitchLord
WitchLord
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
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel
VyvyanBasterd
VyvyanBasterd
Again, thanks Witchlord. You seem to be one of the few here that knows about these esoteric interfaces. Thanks again!

Vyvyan
Gladiator
Gladiator
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=-..
Gladiator
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=-..
WitchLord
WitchLord
Well, you ain''t getting it. And if you don''t stop harrassing people in this forum I will banish you forever

- WitchLord
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel
aanand_420
aanand_420
JUST DO IT!!!!

V don'' ''ve time 4 reading those crap!! PLEEEEEEZ!!!

There is no problem so complicated that it cannot be complicated further.
Gladiator
Gladiator
Say wha''?

-------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.