diff options
author | ccolin | 2020-12-28 18:58:34 +0100 |
---|---|---|
committer | ccolin | 2020-12-28 19:37:01 +0100 |
commit | 87f8c49cffe8a994c62c08cdb207e03ed4e0b6b8 (patch) | |
tree | 1e07a02cf3a7f7a958ba4a07240f468c642a1850 /src/drone_controller.cc | |
parent | f3a34665978729ef65010ac2a4a9408e27d5bf3e (diff) |
remove deadcode
Diffstat (limited to 'src/drone_controller.cc')
-rw-r--r-- | src/drone_controller.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/drone_controller.cc b/src/drone_controller.cc index 9a6c5db..fc1cefe 100644 --- a/src/drone_controller.cc +++ b/src/drone_controller.cc @@ -26,8 +26,6 @@ Drone::Drone() { if (!mesh_initialized) { QVector<GLfloat> verts = load_obj(":/mdl/dji600.obj", LOAD_OBJ_NORMALS | LOAD_OBJ_UVS); QOpenGLTexture *texture = new QOpenGLTexture(QImage(":/img/dji600.jpg").mirrored()); - // texture->setMinificationFilter(QOpenGLTexture::LinearMipMapLinear); - // texture->setMagnificationFilter(QOpenGLTexture::Linear); mesh = new OpenGLMesh(verts, texture); mesh_initialized = true; } @@ -92,13 +90,16 @@ DroneController::DroneController(const QJsonObject &json) OpenGLWidget::instance->makeCurrent(); QOpenGLTexture *ground_tex = new QOpenGLTexture(QImage(":/img/ground.jpg").mirrored()); + ground_tex->setMagnificationFilter(QOpenGLTexture::LinearMipMapLinear); + ground_tex->setMinificationFilter(QOpenGLTexture::LinearMipMapLinear); + ground_tex->setWrapMode(QOpenGLTexture::MirroredRepeat); OpenGLMesh *ground = new OpenGLMesh({ - -100, 0, -100, 0, 1, 0, 0, 0, - 100, 0, -100, 0, 1, 0, 1, 0, - -100, 0, 100, 0, 1, 0, 0, 1, - 100, 0, -100, 0, 1, 0, 1, 0, - -100, 0, 100, 0, 1, 0, 0, 1, - 100, 0, 100, 0, 1, 0, 1, 1, + -1000, 0, -1000, 0, 1000, 0, 0, 0, + 1000, 0, -1000, 0, 1000, 0, 1000, 0, + -1000, 0, 1000, 0, 1000, 0, 0, 1000, + 1000, 0, -1000, 0, 1000, 0, 1000, 0, + -1000, 0, 1000, 0, 1000, 0, 0, 1000, + 1000, 0, 1000, 0, 1000, 0, 1000, 1000, }, ground_tex); OpenGLWidget::instance->meshes.append(*ground); OpenGLWidget::instance->doneCurrent(); |