P-152: Virtual World Concept Update 63: Chunked Levels of Detail Using Quad Trees Part 31
I have succeeded in drawing my first quad!
This may seem like a trivial matter, but it took considerable effort to get this far. In addition to the extensive modification and bug fixes that I wrote about before, I also had to modify the entire algorithm that creates the data points, to ensure they are compatible with the new system.
I eventually arrived at a situation where I had four points for each node that I wanted to render, which is what I wanted. I then needed to render these four points as a quad, which I assumed would be a simple task.
In actual fact, it turned out to be quite complex. Everything in computer graphics in rendered with triangles, which require three points. So, to render a quad using two triangles, I would need six points, not four, with two points being reused.
I looked into a few different ways of solving this problem, including using GFXTriangleLists as a rendering method, and using an index/primitive buffer.
I am confident that the index buffer idea would have worked, but it would have required even more changes to the codebase to implement that. I decided for now to just create four points, as normal, then, when I am loading the points into the quad tree node, I will duplicate two of them, so I will have six points stored per node instead of 4. During rendering, I should then be able to draw those six points as two triangles.
I don’t know if this is going to work yet, but I am reasonably confident.
There is still a lot of work to be done on this, but I feel I am making significant progress.









