mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 13:10:04 -05:00
--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:
parent
6a14ef89e4
commit
f806ba745d
@ -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:
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user