From 87f8c49cffe8a994c62c08cdb207e03ed4e0b6b8 Mon Sep 17 00:00:00 2001 From: ccolin Date: Mon, 28 Dec 2020 18:58:34 +0100 Subject: remove deadcode --- src/drone_controller.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/drone_controller.cc') 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 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(); -- cgit v1.2.3-70-g09d2