git-svn-id: svn://db.shs.com.ru/libs@556 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-06-21 15:28:39 +00:00
parent 7eb0919657
commit cff4fbed36
8 changed files with 118 additions and 50 deletions

View File

@@ -1,5 +1,6 @@
#include "glwidget.h"
#include "qglview.h"
#include "renderer_simple.h"
#include "renderer_deferred_shading.h"
#include <QVBoxLayout>
@@ -22,22 +23,22 @@ QColor GLWidget::backColor() const {
}
float GLWidget::lineWidth() const {
qreal GLWidget::lineWidth() const {
return view_->lineWidth();
}
float GLWidget::FOV() const {
qreal GLWidget::FOV() const {
return view_->FOV();
}
float GLWidget::depthStart() const {
qreal GLWidget::depthStart() const {
return view_->depthStart();
}
float GLWidget::depthEnd() const {
qreal GLWidget::depthEnd() const {
return view_->depthEnd();
}
@@ -83,7 +84,7 @@ QColor GLWidget::hoverHaloColor() const {
}
float GLWidget::hoverHaloFillAlpha() const {
qreal GLWidget::hoverHaloFillAlpha() const {
return view_->hoverHaloFillAlpha();
}
@@ -98,18 +99,22 @@ QColor GLWidget::selectionHaloColor() const {
}
float GLWidget::selectionHaloFillAlpha() const {
qreal GLWidget::selectionHaloFillAlpha() const {
return view_->selectionHaloFillAlpha();
}
void GLWidget::stop() {
return view_->stop();
view_->stop();
}
void GLWidget::start(float freq) {
return view_->start(freq);
void GLWidget::start(float freq, GLRendererBase * r) {
if (r == nullptr) r = new RendererSimple(view_);
GLRendererBase * pr = nullptr;
view_->setRenderer(r, &pr);
if (pr != nullptr) delete pr;
view_->start(freq);
}
@@ -118,22 +123,22 @@ void GLWidget::setBackColor(const QColor & c) {
}
void GLWidget::setLineWidth(const float & arg) {
void GLWidget::setLineWidth(const qreal & arg) {
view_->setLineWidth(arg);
}
void GLWidget::setFOV(const float & arg) {
void GLWidget::setFOV(const qreal & arg) {
view_->setFOV(arg);
}
void GLWidget::setDepthStart(const float & arg) {
void GLWidget::setDepthStart(const qreal & arg) {
view_->setDepthStart(arg);
}
void GLWidget::setDepthEnd(const float & arg) {
void GLWidget::setDepthEnd(const qreal & arg) {
view_->setDepthEnd(arg);
}
@@ -178,7 +183,7 @@ void GLWidget::setHoverHaloColor(const QColor & arg) {
}
void GLWidget::setHoverHaloFillAlpha(const float & arg) {
void GLWidget::setHoverHaloFillAlpha(const qreal & arg) {
view_->setHoverHaloFillAlpha(arg);
}
@@ -193,7 +198,7 @@ void GLWidget::setSelectionHaloColor(const QColor & arg) {
}
void GLWidget::setSelectionHaloFillAlpha(const float & arg) {
void GLWidget::setSelectionHaloFillAlpha(const qreal & arg) {
view_->setSelectionHaloFillAlpha(arg);
}