Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

113 Neutral

About _Flame_

  • Rank

Personal Information

  • Interests
  1. _Flame_

    second glBufferStorage fails

    I have found the root cause. Looks like it's indeed GL_BUFFER_IMMUTABLE_STORAGE. Since a buffer created by glBufferStorage is immutable that it's not allowed to call glBufferStorage for it again. So it's necessary to delete a buffer, create it again by glGenBuffers, bind it and now we can call glBufferStorage!
  2. _Flame_

    second glBufferStorage fails

    Definitely not first case. What does second case mean?
  3. Hello. For some reason if I call glBufferStorage only once when everything works just fine. I want to recreate a buffer by calling glBufferStorage second time(and more) if its size is not enough but this second call generates GL_INVALID_OPERATION error. After that glMapBufferRange return nullptr and that's it. Has anyone had similar problem before? This is how I create/recreate buffer: const auto vertex_buffer_size = CYCLES * sizeof(Vertex) * VERTICES_PER_QUAD * m_total_text_length; GLint current_vertices_size; glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &current_vertices_size); if (vertex_buffer_size > current_vertices_size) { if (m_syncs[m_buffer_id] != 0) { glClientWaitSync(m_syncs[m_buffer_id], GL_SYNC_FLUSH_COMMANDS_BIT, -1); glDeleteSync(m_syncs[m_buffer_id]); } glUnmapBuffer(GL_ARRAY_BUFFER); GLuint error = glGetError(); glBufferStorage(GL_ARRAY_BUFFER, vertex_buffer_size, 0, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT); GLuint error2 = glGetError(); m_vertices = static_cast<Vertex*>(glMapBufferRange(GL_ARRAY_BUFFER, 0, vertex_buffer_size, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT)); m_buffer_id = 0; for (auto& sync : m_syncs) { glDeleteSync(sync); sync = 0; } }
  4. I have a box with dimensions = 1m:1:m:1m and mass = 1kg. Gravity acceleration is 9,8m/c^2. Also i have a "push" force in my scene which has newtons units. I expect that force value(basic force) should be 9,8 to compensate the gravity but it's very different number. Also it changes when i change parameter "scaling:units" in the PhysX tools. So i'm confused how to deal with it.
  5. _Flame_

    3DMax physx plugin import

    Ok, 3dmax saves it into *.max file. I forget it.
  6. _Flame_

    3DMax physx plugin import

    The key is "all time". And what if 3dmax crashes? Do you want me to do all work from scratch again? Very clever.
  7. _Flame_

    3DMax physx plugin import

    Hello. I'm wondering how to load physics settings in 3DMax. It's not convenient to hold 3DMax opened all time.
  • 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!