Skip to main content
GameDev.net gamedev.net
🔒 Locked

Beginner QuadTree & Index/Vertex Buffer question

Started by Tutukun Mar 21, 2007 at 4:19 PM 3 replies 1.6k views
Original Post
Tutukun
Tutukun
Hi, I've been playing around with Geomipmap and Quadtree(for LOD). And I've noticed that Geomipmap only works if the heightfield size is 2^n + 1. So my 1st question is: -Does Quadtree has this same limitation? My 2nd question: -When does Vertex/Index Buffer is placed in the memory? After the CreateIndex/VertexBuffer() call or after the first Lock()&Unlock() calls? If it's the first case(after the CreateIndex/VertexBuffer() call) then: - How does the system insert data into buffers if they were created with the Read-only flag?. Thanks for looking :) Cheers :D
VerMan
VerMan
You fill the vertex buffer with a call to Lock(), it's the same... the READONLY flag promises the driver that your application will not attempt to add data to it. It's mainly used for performance issues.
JohnBolton
JohnBolton
Quote:
Original post by Tutukun
Hi,
I've been playing around with Geomipmap and Quadtree(for LOD). And I've noticed that Geomipmap only works if the heightfield size is 2^n + 1. So my 1st question is:

-Does Quadtree has this same limitation?


It is not required to have this limitation. In fact, the meshes don't even have to be grids. On the other hand, making the size 2n+1 helps when it comes to issues such as joining adjacent patches and LOD transitions (geomorphing, for example.)
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
Tutukun
Tutukun
Quote:
Original post by VerMan
You fill the vertex buffer with a call to Lock(), it's the same... the READONLY flag promises the driver that your application will not attempt to add data to it. It's mainly used for performance issues.


what about index buffer? is it the same as vertex buffer?

Cheers


Quote:
It is not required to have this limitation. In fact, the meshes don't even have to be grids. On the other hand, making the size 2n+1 helps when it comes to issues such as joining adjacent patches and LOD transitions (geomorphing, for example.)

So you mean for size that is not 2^n+1 Quadtree is harder to do than the one for 2^n+1 size?

Thanks :)

[Edited by - Tutukun on March 23, 2007 7:03:50 AM]
Tutukun
Tutukun
Bump
Could anyone answer my questions? :D

Topic Locked

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

Sign in to reply to this topic.