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