I have two VBOs, assigned to names 1 and 2. Only 2 is being drawn. However, if I comment out VBO 2, VBO 1 is drawn with no problem. Here’s the relevant code.
for m in shader._models: try: # Set the model's transform matrix uniform vbo, mode = m.render_data glUniformMatrix4fv( shader.uniforms['model'], 1, GL_FALSE, np.array(m.model_matrix)) vbo.bind() # Binds the VBO. glDrawArrays(mode, 0, len(vbo)) finally: vbo.unbind() # Unbinds it.
GL_ARRAY_BUFFER_BINDING in the loop gives me alternating 1 and 2s, so the buffers are binding correctly. I have done a variety of checks to ensure one object isn’t being hidden by the other, for instance.
The only explanation I can think of is glDrawArrays clears the whole buffer every time it draws? What the heck?
- Update your WhatsApp ASAP: Newly-discovered spyware can infect a phone just by a WhatsApp call
- Charging network EVgo goes tagless, tests battery buffers at stations
- Why did NC State lose after erasing a 22-point deficit? Here’s what happened
- Whoa! Horse racing announcer sues Amazon over trademarked call
- Ricciardo calls Renault result a ‘real statement’
- NHL apologizes to Vegas for key Game 7 penalty call; refs out for next round, report says
- Clippers benefit from being able to call on Lou Williams, Montrezl Harrell in relief
- Alabama dealt Clemson wake-up call last year: ‘We weren’t prepared for a fist fight’
- F1: Mercedes faces ‘major wake-up call’ after Canadian GP, loss of points lead
- Surgeon General Calls Addiction A Chronic Brain Disease