Skip to main content
added 16 characters in body
Source Link
Nicol Bolas
  • 26.1k
  • 3
  • 78
  • 104

Your GLIntercept says glBindBuffer(GL_ARRAY_BUFFER,0) right before the call to glDrawArrays()glVertexAttribPointer. So you have theno buffer bound to attirbute 0 which will cause a memory violation error causing JVM to crash. You should look into why vbo_id is 0.

Your GLIntercept says glBindBuffer(GL_ARRAY_BUFFER,0) right before the call to glDrawArrays(). So you have the buffer bound to 0 which will cause a memory violation error causing JVM to crash. You should look into why vbo_id is 0.

Your GLIntercept says glBindBuffer(GL_ARRAY_BUFFER,0) right before the call to glVertexAttribPointer. So you have no buffer bound to attirbute 0 which will cause a memory violation error causing JVM to crash. You should look into why vbo_id is 0.

deleted 426 characters in body
Source Link
Christer
  • 1k
  • 6
  • 13

I found these lines rather odd, and unless there have been an recent update this is wrong.Your GLIntercept says createFloatBufferglBindBuffer(GL_ARRAY_BUFFER,0) should only take the buffer capacity as its arguments which isright before the number of floatscall to glDrawArrays(). So you have the buffer can store. This should be an int.

float[] vboData = new float[]{0.0f, 0.0f, 0.0f};
FloatBuffer buffer = BufferUtils.createFloatBuffer(vboData);

Try changing itbound to this.

float[] vboData = new float[]{0.0f, 0.0f, 0.0f};
FloatBuffer buffer = BufferUtils.createFloatBuffer(vboData.length);
buffer.put(vboData);
buffer.flip();

If this didn't help, please update your questions with any0 which will cause a memory violation error messages you are gettingcausing JVM to crash. You should look into why vbo_id is 0.

I found these lines rather odd, and unless there have been an recent update this is wrong. createFloatBuffer() should only take the buffer capacity as its arguments which is the number of floats the buffer can store. This should be an int.

float[] vboData = new float[]{0.0f, 0.0f, 0.0f};
FloatBuffer buffer = BufferUtils.createFloatBuffer(vboData);

Try changing it to this.

float[] vboData = new float[]{0.0f, 0.0f, 0.0f};
FloatBuffer buffer = BufferUtils.createFloatBuffer(vboData.length);
buffer.put(vboData);
buffer.flip();

If this didn't help, please update your questions with any error messages you are getting.

Your GLIntercept says glBindBuffer(GL_ARRAY_BUFFER,0) right before the call to glDrawArrays(). So you have the buffer bound to 0 which will cause a memory violation error causing JVM to crash. You should look into why vbo_id is 0.

Source Link
Christer
  • 1k
  • 6
  • 13

I found these lines rather odd, and unless there have been an recent update this is wrong. createFloatBuffer() should only take the buffer capacity as its arguments which is the number of floats the buffer can store. This should be an int.

float[] vboData = new float[]{0.0f, 0.0f, 0.0f};
FloatBuffer buffer = BufferUtils.createFloatBuffer(vboData);

Try changing it to this.

float[] vboData = new float[]{0.0f, 0.0f, 0.0f};
FloatBuffer buffer = BufferUtils.createFloatBuffer(vboData.length);
buffer.put(vboData);
buffer.flip();

If this didn't help, please update your questions with any error messages you are getting.