Skip to main content
deleted 112 characters in body
Source Link
dreta
  • 3.5k
  • 4
  • 22
  • 37

What do you mean by "buffers were changed"? You're calling glBufferData with NULL, so no data is initially set. If you're having errors, maybe this

glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, (GLintptr)_data.indices.length, _data.indices.bytes);

is incorrect. glBufferSubData requires size in bytes. You haven't allocated the buffer size explicitly as bytes so i'm guessing that sending just the length is not intentional.

EDIT:

Another thing is, you're using OpenGL ES2 and AFAIK it doesn't have VAOs, is that an extension? Are you sure that it's working properly?

What do you mean by "buffers were changed"? You're calling glBufferData with NULL, so no data is initially set. If you're having errors, maybe this

glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, (GLintptr)_data.indices.length, _data.indices.bytes);

is incorrect. glBufferSubData requires size in bytes. You haven't allocated the buffer size explicitly as bytes so i'm guessing that sending just the length is not intentional.

EDIT:

Another thing is, you're using OpenGL ES2 and AFAIK it doesn't have VAOs, is that an extension? Are you sure that it's working properly?

If you're having errors, maybe this

glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, (GLintptr)_data.indices.length, _data.indices.bytes);

is incorrect. glBufferSubData requires size in bytes. You haven't allocated the buffer size explicitly as bytes so i'm guessing that sending just the length is not intentional.

EDIT:

Another thing is, you're using OpenGL ES2 and AFAIK it doesn't have VAOs, is that an extension? Are you sure that it's working properly?

added 19 characters in body
Source Link
dreta
  • 3.5k
  • 4
  • 22
  • 37

What do you mean by "buffers were changed"? You're calling glBufferData with NULL, so no data is initially set. If you're having errors, maybe this

glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, (GLintptr)_data.indices.length, _data.indices.bytes);

is incorrect. glBufferSubData requires size in bytes. You haven't allocated the buffer with sizeof(GLuint)size explicitly as bytes so i'm guessing that thissending just the length is not intentional.

EDIT:

Another thing is, you're using OpenGL ES2 and AFAIK it doesn't have VAOs, is that an extension? Are you sure that it's working properly?

What do you mean by "buffers were changed"? You're calling glBufferData with NULL, so no data is initially set. If you're having errors, maybe this

glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, (GLintptr)_data.indices.length, _data.indices.bytes);

is incorrect. glBufferSubData requires size in bytes. You allocated the buffer with sizeof(GLuint) so i'm guessing that this is not intentional.

What do you mean by "buffers were changed"? You're calling glBufferData with NULL, so no data is initially set. If you're having errors, maybe this

glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, (GLintptr)_data.indices.length, _data.indices.bytes);

is incorrect. glBufferSubData requires size in bytes. You haven't allocated the buffer size explicitly as bytes so i'm guessing that sending just the length is not intentional.

EDIT:

Another thing is, you're using OpenGL ES2 and AFAIK it doesn't have VAOs, is that an extension? Are you sure that it's working properly?

Source Link
dreta
  • 3.5k
  • 4
  • 22
  • 37

What do you mean by "buffers were changed"? You're calling glBufferData with NULL, so no data is initially set. If you're having errors, maybe this

glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, (GLintptr)_data.indices.length, _data.indices.bytes);

is incorrect. glBufferSubData requires size in bytes. You allocated the buffer with sizeof(GLuint) so i'm guessing that this is not intentional.