Question about rendering vmfs in opengl
As I understand it, It's not a trivial process: you need to find all the intersections between planes, and then subdivide the resulting polygons into triangles, and reassemble them into indexed arrays.
You might be better off converting the VMF to some other format and parsing that.
As I understand it, It's not a trivial process: you need to find all the intersections between planes, and then subdivide the resulting polygons into triangles, and reassemble them into indexed arrays.
You might be better off converting the VMF to some other format and parsing that.
Thanks for responding, I know its not a trivial process, I was just looking for a general explanation or even a useful link. I know I could convert my model to obj, but thats not what I'm aiming for.
I know I could convert my model to obj, but thats not what I'm aiming for.
The only reason I mentioned this, is because you aren't meant to render VMF files directly. The usual approach is to run them through the BSP compiler, and render those.
As for implementing your own BSP compiler, I don't have a reference off hand, but older gamedev books would be more likely to cover the topic, and there are a bunch of open-source BSP compilers.
The only reason I mentioned this, is because you aren't meant to render VMF files directly. The usual approach is to run them through the BSP compiler, and render those.I know I could convert my model to obj, but thats not what I'm aiming for.
As for implementing your own BSP compiler, I don't have a reference off hand, but older gamedev books would be more likely to cover the topic, and there are a bunch of open-source BSP compilers.
My goal is to make a simple map editor which would require rendering the vmf. The code for the bsp compiler is already included in the sdk, but that's not what I'm trying to do.