COBERA READ THIS PLEASE
Got any idea how the function decompress works from his engine here it is:
void world_t::decompress()
{
for(int i = 0; i < bsp->leaf_count; i++) {
int_vec visible;
dleaf_t& leaf = bsp->leaves;
int v = leaf.visofs;
const byte* vis = bsp->vis;
for(int c = 1; c < bsp->models[0].visleafs; v++) {
if(vis[v] == 0) {
v++;
c+=(vis[v]<<3);
}
else {
for(byte bit = 1; bit; bit<<=1,c++) {
if(vis[v] & bit) {
visible.push_back(c);
}
}
}
}
leaf_visibility.push_back(visible);
}
}
I think tha it expands all leafs so that PVS can be found. Haven''t got that much of a clue though. Does each leaf have much face data which needs to be used to point in the edges array
PLEASE HELP COULD YOU OUTLINE HOW BASICALLY THE BSP FORMAT WORKS
PSEDUO CODE WOULD BE GREAT
i have seen the quake 2 documentation on Flipcode and Bart Sekura''s half-life loader but still abit confused as i''m quite new to the world of 3D graphics and openGL
Thanks ALOT Cobera
Steve
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement