Results 1 to 10 of 34

Thread: Thyandyr's voxel engine

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Seems TDictionary frees memory as item count goes down.
    Last edited by Thyandyr; 05-11-2017 at 09:17 PM.

  2. #2
    Quote Originally Posted by Thyandyr View Post
    Seems TDictionary frees memory as item count goes down.
    lol how else would you expect any kind of storage class ever to possibly work?

    Also as far as the chunk post you made above this one... The kind of use case you're outlining there is far better suited to a TStack than a TDictionary. Not that you have to use one or the other... you could for example have some kind of global TDictionary to manage the overall voxel chunks by string ID, and a local TStack instantiated within some kind of renderer class that references the same values as the TDictionary. (Assuming that the chunks are classes and can be directly assigned without creating copies... if they're records you'd obviously need to make the TStack's specialization a pointer type instead.)

  3. #3
    TStack would be better for those lists that do not need to search for specific content, which is most of the lists in the Chunk manager. I think I'll update it (as you see I have no pre-knowledge on anything). Actually I need it to be TDictionary. But anyway, what is the difference between TStack.Pop and TStack.Extract? Docs say both remove and return.

    TDictionary has method called TrimExcess made me think maybe it does not release the used memory automatically. Which would be nice in my case. Had it been so I could had the benefits of both the 'static' (or increase on demand) size and arbitrary indexes.

    The load, unload etc lists will pump up and down in size constantly. Wouldn't it be beneficial if they grew in size but never shrank even when empty, or took the theoretical maximum size and kept at that.
    Last edited by Thyandyr; 06-11-2017 at 06:28 PM.

  4. #4
    Achieved:
    • TChunkManager per frame update (TChunks load, create, unload etc. few items per frame)
    • Each TChunk in separate VBO
    • Frustrum culling on Camera change (TChunk.InFrustrum = boolean). VBO stays in but does not get drawn if not in frustrum.
    • VBO freed on TChunk unload


    Managed to introduce annoying stutter effect on fast camera movements.

  5. #5
    I'm back from few weeks holiday. I have no idea what I am doing but somehow I manage to make some progress.

    Stutter is fixed, frustrum culling is working much better too (only on one plane, need to add 4 more.

  6. #6
    Quote Originally Posted by Thyandyr View Post
    ...frustrum culling is working much better too
    Now with 4 planes and distance is handled by other means. Nice job me!

  7. #7

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •