Forum

Batching Verts?

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Re: Batching Verts?

Postby Spike » Sun Sep 20, 2015 1:06 pm

q1 surfaces have a private edge list, which refers to a list of public edges, which refer to pairs of verts. if the private edge is negative, then the edge is backwards and you should reverse the vertex pair or so. you can then just walk the private edges and pull out the appropriate vertex (they should otherwise be doubled up).
texture coords are not stored, but rather calculated based upon the surface's texinfo. just a dotproduct and addition (two times).

you can have as many textures as you want per vbo, and doing so is recommended to avoid vertex array state switches.
what you can't do is have multiple textures per draw call (unless you're using bindless textures, careful use of texture arrays, or atlasing).
nothing stops you from using vis culling other than your own lazyness. you will likely want to dynamically generate your element arrays in order to provide basic depth sorted geometry (which is made more complicated by 1-texture-per-draw-call) or to effectively deal with gaps caused by surfaces not being drawn. however, your _vertex_ data is generally best stored in a single vbo+vao.
Spike
 
Posts: 2883
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Previous

Return to Engine Programming

Who is online

Users browsing this forum: Google [Bot] and 1 guest