Remove large resources. (#16)

This commit is contained in:
2025-03-22 20:55:59 +00:00
parent d0c8316f79
commit d827d02a15
185 changed files with 2504 additions and 527675 deletions

View File

@@ -11,7 +11,8 @@
#include "examplewidget.h"
ExampleWidget::ExampleWidget(QWidget * parent) :
QOpenGLWidget(parent), mScene(new ExampleScene(new Qtk::SceneEmpty)) {
QOpenGLWidget(parent), mScene(new ExampleScene)
{
// NOTE: The decorator pattern is used to save / load scenes in Qtk currently.
// The initializer above sets mScene to the concrete decorator ExampleScene.
// Qtk::SceneEmpty provides an empty scene as the concrete component.
@@ -27,7 +28,8 @@ ExampleWidget::ExampleWidget(QWidget * parent) :
setFocusPolicy(Qt::ClickFocus);
}
void ExampleWidget::initializeGL() {
void ExampleWidget::initializeGL()
{
initializeOpenGLFunctions();
connect(this, SIGNAL(frameSwapped()), this, SLOT(update()));
glEnable(GL_MULTISAMPLE);
@@ -40,18 +42,21 @@ void ExampleWidget::initializeGL() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
void ExampleWidget::resizeGL(int width, int height) {
void ExampleWidget::resizeGL(int width, int height)
{
Qtk::Scene::getProjectionMatrix().setToIdentity();
Qtk::Scene::getProjectionMatrix().perspective(
45.0f, float(width) / float(height), 0.1f, 1000.0f);
}
void ExampleWidget::paintGL() {
void ExampleWidget::paintGL()
{
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
mScene->draw();
}
void ExampleWidget::update() {
void ExampleWidget::update()
{
mScene->update();
QWidget::update();
}