Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3696008
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:41:12+00:00 2026-05-19T04:41:12+00:00

I read about DynamicVertexBuffer, and how it’s supposed to be better for data that

  • 0

I read about DynamicVertexBuffer, and how it’s supposed to be better for data that changes often. I have a world built up by cubes, and I need to store the cubes’ vertices in this buffer to draw them to the screen.

However, not all cubes have vertices (some are air, which is transparent) and not all faces of the cubes need to be drawn either (they are facing each other), so how do I keep track of what vertices are stored where in the buffer? Also, certain faces need to be drawn last, namely the ones with transparency in them (like glass or leaves), and these faces also need to be drawn in a back-to-front order to not mess up the alpha blending.

If all of these vertices are stored arbitrarily in this buffer, how do I know what vertices are where?

Also, the number of vertices can change, but the DynamicVertexBuffer doesn’t seem very dynamic to me, since I can’t change it’s size at all. Do I have to recreate the buffer every time I need to add or remove faces?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:41:12+00:00Added an answer on May 19, 2026 at 4:41 am

    Sounds like you are approaching this in the wrong way – assuming you have anything more than a trivial number of cubes in your world. You should store the world (and it’s cubes) in a custom data structure that lets you rapidly determine which cubes (and faces) are visible based on the rules of your world from a given point when looking in a given direction.

    Then each time you render a scene generate batches of vertex buffers of just these faces. So don’t use vertex buffers as the basis for storing the entire geometry of your world. Vertex buffers are a rendering tool, not a world scene graph tool.

    These kind of large scale visibility issues are much faster run in code than by the GPU. For example if you are sat at the origin, looking +x, you can immediately ignore all cubes in the -ve x direction, this is a very simple example.

    For a more complete example search on oct-tree rendering. This kind of rendering would match your world layout quite nicely.

    Final tip – when I say generate batches of vertex buffers – I mean batch you cubes together in ways that minimize changes in the state of the GPU (e.g. same texture, same shader etc). Minimizing changes to the state of the GPU is key to optimizing the rendering – once you’ve gone as far as you can with culling faces from the render in the first place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read about partial methods in the latest C# language specification , so
I've read about and dabbled with some including active record, repository, data transfer objects.
Everything I read about better PHP coding practices keeps saying don't use require_once because
I once read about an open source database for postal codes with geolocation data
You can read about the 64-bit calling convention here . x64 functions are supposed
Read about Server push here . I want to push data to client from
I read about WPF and I have following concerns: Normally when we develop applications
I read about a string/word that did so the Routing crashed but I can't
I read about the Conditional attribute today. According to MSDN: Applying ConditionalAttribute to a
I read about using the CASE expression inside the WHERE clause here: http://scottelkin.com/sql/using-a-case-statement-in-a-sql-where-clause/ I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.