most settings are saved and restored
This commit is contained in:
@@ -23,19 +23,19 @@ private:
|
||||
QOpenGLShaderProgram m_program;
|
||||
GeometryEngine *m_dataEngine;
|
||||
|
||||
QVector4D m_backgroundColorOn = { 0.02f, 0.02f, 0.02f, 1.0f };
|
||||
QVector4D m_backgroundColorOff = { 0.5f, 0.8f, 1.0f, 1.0f };
|
||||
QVector4D m_backgroundColorOn;
|
||||
QVector4D m_backgroundColorOff;
|
||||
|
||||
bool m_wireframe = false;
|
||||
bool m_lightOn = false;
|
||||
bool m_backfaceCulling = false;
|
||||
bool m_wireframe;
|
||||
bool m_lightOn;
|
||||
bool m_backfaceCulling;
|
||||
|
||||
struct {
|
||||
QVector4D position = { 1,1,1,0 };
|
||||
QVector3D intensities = { 1.0,1.0,1.0 };
|
||||
float attenuationFactor = 0.0f;
|
||||
float ambientCoefficient = 0.005f;
|
||||
bool headlight = false;
|
||||
QVector4D position;
|
||||
QVector3D intensities;
|
||||
float attenuationFactor;
|
||||
float ambientCoefficient;
|
||||
bool headlight;
|
||||
} m_light;
|
||||
|
||||
struct {
|
||||
@@ -51,6 +51,7 @@ private:
|
||||
|
||||
// functions
|
||||
private:
|
||||
void setDefaultValues();
|
||||
void initShaders();
|
||||
void resetView();
|
||||
void updateLightPosition();
|
||||
@@ -89,5 +90,10 @@ public slots:
|
||||
void setHeadlight(bool value);
|
||||
void setBackfaceCulling(bool value);
|
||||
|
||||
// signals
|
||||
signals:
|
||||
void lightChanged(bool value);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user