--User changes

-Change how the PositiveYUp option is actually handled to make things more compatible with Apophysis. depending on the value of that option:
 --Moving an affine up or down will mean a positive or negative value.
 --Locally, the display of the affine will be flipped.

--Bug fixes
 -Fix waffle.
This commit is contained in:
Person 2020-01-16 20:22:41 -08:00
parent 6a14ef89e4
commit f806ba745d
3 changed files with 10 additions and 41 deletions

View File

@ -1792,8 +1792,8 @@ public:
virtual void Precalc() override
{
m_SinR = std::sin(m_Rotation);
m_CosR = std::cos(m_Rotation);
m_SinR = m_Weight * std::sin(m_Rotation);
m_CosR = m_Weight * std::cos(m_Rotation);
}
protected:

View File

@ -456,7 +456,7 @@ void Fractorium::OnMoveUpButtonClicked(bool checked)
double d = ToDouble(combo->currentText(), &ok);
if (ok)
m_Controller->MoveXforms(0, d, pre);
m_Controller->MoveXforms(0, m_Settings->YAxisUp() ? d : -d, pre);
}
/// <summary>
@ -473,7 +473,7 @@ void Fractorium::OnMoveDownButtonClicked(bool checked)
double d = ToDouble(combo->currentText(), &ok);
if (ok)
m_Controller->MoveXforms(0, -d, pre);
m_Controller->MoveXforms(0, m_Settings->YAxisUp() ? -d : d, pre);
}
/// <summary>

View File

@ -34,42 +34,6 @@
"void main() {\n"
" gl_FragColor = texture2D(quadtex, texcoord.st);\n"
"}\n";
/*
static const char* vertexShaderSource =
"#version 120\n"
"in vec4 posattr;\n"
"uniform mat4 matrix;\n"
"void main() {\n"
" gl_Position = matrix * posattr;\n"
"}\n";
static const char* fragmentShaderSource =
"#version 120\n"
"uniform vec4 mycolor;\n"
"out vec4 fragout;"
"void main() {\n"
" fragout = mycolor;\n"
"}\n";
static const char* quadVertexShaderSource =
"#version 120\n"
"in vec4 posattr;\n"
"uniform mat4 matrix;\n"
"out vec4 texcoord;\n"
"void main() {\n"
" gl_Position = matrix * posattr;\n"
" texcoord = posattr;\n"
"}\n";
static const char* quadFragmentShaderSource =
"#version 120\n"
"uniform sampler2D quadtex;\n"
"in vec4 texcoord;\n"
"out vec4 fragout;"
"void main() {\n"
" fragout = texture(quadtex, texcoord.st);\n"
"}\n"; */
#endif
/// <summary>
@ -585,7 +549,12 @@ void GLWidget::paintGL()
#else
m_Program->bind();
m_ProjMatrix.setToIdentity();
m_ProjMatrix.ortho(-unitX, unitX, -unitY, unitY, -1, 1);//Projection matrix: OpenGL camera is always centered, just move the ember internally inside the renderer.
if (!controller->Renderer()->YAxisUp())
m_ProjMatrix.ortho(-unitX, unitX, unitY, -unitY, -1, 1);//Projection matrix: OpenGL camera is always centered, just move the ember internally inside the renderer.
else
m_ProjMatrix.ortho(-unitX, unitX, -unitY, unitY, -1, 1);
m_ModelViewMatrix.setToIdentity();
//this->DrawUnitSquare();
controller->GLController()->DrawAffines(pre, post);