mirror of
https://github.com/Linloir/SceneEditor.git
synced 2025-12-17 07:28:12 +08:00
Minor changes
This commit is contained in:
parent
7b6b82b743
commit
a44e2b932a
@ -1,9 +1,15 @@
|
||||
#include "sceneviewer.h"
|
||||
|
||||
#include <vector>
|
||||
#include <qsurface.h>
|
||||
#include <qsurfaceformat.h>
|
||||
|
||||
using std::vector;
|
||||
|
||||
SceneViewer::SceneViewer(QWidget* parent)
|
||||
: QOpenGLWidget(parent)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
SceneViewer::~SceneViewer() {
|
||||
@ -11,13 +17,18 @@ SceneViewer::~SceneViewer() {
|
||||
}
|
||||
|
||||
void SceneViewer::initializeGL() {
|
||||
initializeOpenGLFunctions();
|
||||
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
void SceneViewer::resizeGL(int w, int h) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
void SceneViewer::paintGL() {
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
//
|
||||
}
|
||||
@ -7,6 +7,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "renderable.h"
|
||||
#include "vao.h"
|
||||
#include "utils.h"
|
||||
|
||||
class SceneViewer : public QOpenGLWidget, protected QOpenGLFunctions
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
|
||||
#include "vao.h"
|
||||
|
||||
VertexArrayObject::VertexArrayObject() {
|
||||
OPENGL_EXTRA_FUNCTIONS->glGenVertexArrays(1, &_id);
|
||||
}
|
||||
VertexArrayObject::VertexArrayObject() {}
|
||||
|
||||
VertexArrayObject::VertexArrayObject(const VertexBufferObject& vbo) :
|
||||
_vbo(vbo) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user