mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 17:03:58 +02:00
Simplification, window fix.
This commit is contained in:
parent
ba50beab91
commit
a3e65fc231
2 changed files with 2 additions and 5 deletions
|
@ -2036,12 +2036,9 @@ void HeightfieldRenderer::render(bool cursor) {
|
|||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().bind();
|
||||
float sDistance = 2.0f / (innerWidth - 1);
|
||||
float tDistance = 2.0f / (innerHeight - 1);
|
||||
float distanceProduct = -sDistance * tDistance;
|
||||
DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().setUniformValue(
|
||||
DefaultMetavoxelRendererImplementation::getBaseHeightScaleLocation(), 1.0f / width, 1.0f / height,
|
||||
sDistance / distanceProduct, tDistance / distanceProduct);
|
||||
(innerWidth - 1) / -2.0f, (innerHeight - 1) / -2.0f);
|
||||
DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().setUniformValue(
|
||||
DefaultMetavoxelRendererImplementation::getBaseColorScaleLocation(), (float)width / innerWidth,
|
||||
(float)height / innerHeight);
|
||||
|
|
|
@ -48,7 +48,7 @@ enum GridPlane {
|
|||
const glm::vec2 INVALID_VECTOR(FLT_MAX, FLT_MAX);
|
||||
|
||||
MetavoxelEditor::MetavoxelEditor() :
|
||||
QWidget(Application::getInstance()->getGLWidget(), Qt::Tool) {
|
||||
QWidget(Application::getInstance()->getWindow(), Qt::Tool) {
|
||||
|
||||
setWindowTitle("Metavoxel Editor");
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
|
Loading…
Reference in a new issue