History

Simplification, window fix.

Andrzej Kapolka committed 11 years ago

Commit a3e65fc1 parent ba50bea2 files · +2 −5Browse files

Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 2 files). Show all

Unified · Split

interface/src/MetavoxelSystem.cpp+1−4
@@ -2036,12 +2036,9 @@ void HeightfieldRenderer::render(bool cursor) { · 2035 unmodified lines
2036 glColor4f(1.0f, 1.0f, 1.0f, 1.0f);2036 glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
2037 2037
2038 DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().bind();2038 DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().bind();
2039 float sDistance = 2.0f / (innerWidth - 1);
2040 float tDistance = 2.0f / (innerHeight - 1);
2041 float distanceProduct = -sDistance * tDistance;
2042 DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().setUniformValue(2039 DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().setUniformValue(
2043 DefaultMetavoxelRendererImplementation::getBaseHeightScaleLocation(), 1.0f / width, 1.0f / height,2040 DefaultMetavoxelRendererImplementation::getBaseHeightScaleLocation(), 1.0f / width, 1.0f / height,
2044 sDistance / distanceProduct, tDistance / distanceProduct);2041 (innerWidth - 1) / -2.0f, (innerHeight - 1) / -2.0f);
2045 DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().setUniformValue(2042 DefaultMetavoxelRendererImplementation::getBaseHeightfieldProgram().setUniformValue(
2046 DefaultMetavoxelRendererImplementation::getBaseColorScaleLocation(), (float)width / innerWidth,2043 DefaultMetavoxelRendererImplementation::getBaseColorScaleLocation(), (float)width / innerWidth,
2047 (float)height / innerHeight);2044 (float)height / innerHeight);