git-svn-id: svn://db.shs.com.ru/libs@664 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-12-09 20:36:54 +00:00
parent 1a210defb1
commit 86f4e0ad78
4 changed files with 48 additions and 23 deletions

View File

@@ -27,6 +27,7 @@ VertexObject::VertexObject():
buffer_obj (GL_ARRAY_BUFFER, GL_STREAM_DRAW),
buffer_sel (GL_ARRAY_BUFFER, GL_STREAM_DRAW) {
vao_ = 0;
buffers_binded = false;
}
@@ -64,7 +65,10 @@ void VertexObject::release(QOpenGLExtraFunctions * f) {
}
void VertexObject::bindBuffers(QOpenGLExtraFunctions * f, Buffer & geom, Buffer & elem) {
void VertexObject::bindBuffers(QOpenGLExtraFunctions * f, Buffer & geom, Buffer & elem, bool force) {
if (!force && buffers_binded) return;
buffers_binded = true;
init(f);
bind(f);