code format
This commit is contained in:
@@ -1,39 +1,37 @@
|
||||
/*
|
||||
QGL VertexObject
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
QGL VertexObject
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <QOpenGLExtraFunctions>
|
||||
#include "glvertexobject.h"
|
||||
|
||||
#include <QOpenGLExtraFunctions>
|
||||
|
||||
using namespace QGLEngineShaders;
|
||||
|
||||
|
||||
VertexObject::VertexObject():
|
||||
buffer_obj (GL_ARRAY_BUFFER, GL_STREAM_DRAW),
|
||||
buffer_sel (GL_ARRAY_BUFFER, GL_STREAM_DRAW) {
|
||||
vao_ = 0;
|
||||
buffers_binded = false;
|
||||
VertexObject::VertexObject(): buffer_obj(GL_ARRAY_BUFFER, GL_STREAM_DRAW), buffer_sel(GL_ARRAY_BUFFER, GL_STREAM_DRAW) {
|
||||
vao_ = 0;
|
||||
buffers_binded = false;
|
||||
objects_changed = selected_changed = true;
|
||||
}
|
||||
|
||||
|
||||
VertexObject::~VertexObject() {
|
||||
}
|
||||
VertexObject::~VertexObject() {}
|
||||
|
||||
|
||||
void VertexObject::init(QOpenGLExtraFunctions * f) {
|
||||
@@ -59,13 +57,13 @@ void VertexObject::reinit() {
|
||||
vao_ = 0;
|
||||
buffer_obj.reinit();
|
||||
buffer_sel.reinit();
|
||||
buffers_binded = false;
|
||||
buffers_binded = false;
|
||||
objects_changed = selected_changed = true;
|
||||
}
|
||||
|
||||
|
||||
void VertexObject::bind(QOpenGLExtraFunctions * f) {
|
||||
//qDebug() << "bind" << target_ << buffer_;
|
||||
// qDebug() << "bind" << target_ << buffer_;
|
||||
f->glBindVertexArray(vao_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user