Jump to content
  • Advertisement
Sign in to follow this  

SetVertexQuantity wild magic Geometric tools

This topic is 3152 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hy. I'use wild magic engine from geometric tools. My problem is that i must fill a vertexbuffer with data but i don't know how many vertex the mesh have at the start, then i'm trying to use the SetVertexQuantity for dinamically allocate new space , the problem is that this don't work:
if(m_pkCurrVBuffer->GetVertexQuantity()<= (nQuantityCurrent)

when nQuantityCurrent+1 is the new size of the vertexbuffer. This cause some memory problem : a map or some vars that are in the scope of the function are leaked. But if i set a large size at the start:
    Attributes kAttr;
    m_pkCurrVBuffer = WM4_NEW VertexBuffer(kAttr, 1000);

all works fine. Someone uses this engine? How i can dinamcally resize the vertexbuffer

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!