From 989256aad068ddf6342a41b06f26ec83d47fefda Mon Sep 17 00:00:00 2001 From: tosh Date: Sat, 18 May 2013 13:33:01 +0200 Subject: [PATCH] clarifies some names --- interface/src/starfield/Controller.h | 10 +++++----- interface/src/starfield/renderer/Renderer.h | 18 +++++++++--------- interface/src/starfield/renderer/Tiling.h | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/interface/src/starfield/Controller.h b/interface/src/starfield/Controller.h index 93dc134392..3bbb7009a7 100644 --- a/interface/src/starfield/Controller.h +++ b/interface/src/starfield/Controller.h @@ -70,7 +70,7 @@ namespace starfield { double _valLodHighWaterMark; double _valLodOveralloc; size_t _valLodNalloc; - size_t _valLodNrender; + size_t _valLodNRender; BrightnessLevels _seqLodBrightness; #if STARFIELD_MULTITHREADING @@ -103,7 +103,7 @@ namespace starfield { _valLodHighWaterMark(1.0), _valLodOveralloc(1.2), _valLodNalloc(0), - _valLodNrender(0), + _valLodNRender(0), _valLodBrightness(0), _valLodAllocBrightness(0), _ptrRenderer(0l) { @@ -156,7 +156,7 @@ namespace starfield { // cannot allocate or render more than we have n = min(newLast, _valLodNalloc); - nRender = min(newLast, _valLodNrender); + nRender = min(newLast, _valLodNRender); } // determine new minimum brightness levels @@ -192,7 +192,7 @@ namespace starfield { _valLodHighWaterMark *= rcpChange; _valLodOveralloc *= rcpChange; _valLodNalloc = n; - _valLodNrender = nRender; + _valLodNRender = nRender; _valLodAllocBrightness = bMin; #if STARFIELD_MULTITHREADING _valLodBrightness.store(b, memory_order_relaxed); @@ -334,7 +334,7 @@ namespace starfield { { lock _(_mtxLodState); _valLodNalloc = n; - _valLodNrender = nRender; + _valLodNRender = nRender; _valLodFraction = fraction; _valLodLowWaterMark = fraction * (1.0 - realloc); diff --git a/interface/src/starfield/renderer/Renderer.h b/interface/src/starfield/renderer/Renderer.h index 415068ae35..cf7cee6234 100644 --- a/interface/src/starfield/renderer/Renderer.h +++ b/interface/src/starfield/renderer/Renderer.h @@ -71,13 +71,13 @@ namespace starfield { GLsizei* _arrBatchCount; GLuint _hndVertexArray; ProgramObject _objProgram; - int _alphaLocation; + int _alphaLocationHandle; Tiling _objTiling; unsigned* _itrOutIndex; - vec3 _vecWxform; - float _valHalfPersp; + vec3 _vecWRow; + float _valHalfPerspectiveAngle; BrightnessLevel _valMinBright; public: @@ -173,8 +173,8 @@ namespace starfield { matrix = glm::frustum(-hw,hw, -hh,hh, nearClip,10.0f) * glm::affineInverse(matrix); this->_itrOutIndex = (unsigned*) _arrBatchOffs; - this->_vecWxform = vec3(row(matrix, 3)); - this->_valHalfPersp = halfPersp; + this->_vecWRow = vec3(row(matrix, 3)); + this->_valHalfPerspectiveAngle = halfPersp; this->_valMinBright = minBright; TileSelection::Cursor cursor; @@ -397,11 +397,11 @@ namespace starfield { float gz = -cos(azimuth); float exz = cos(altitude); vec3 tileCenter = vec3(gx * exz, sin(altitude), gz * exz); - float w = dot(_vecWxform, tileCenter); + float w = dot(_vecWRow, tileCenter); float daz = halfSlice * cos(std::max(0.0f, abs(altitude) - halfSlice)); float dal = halfSlice; - float adjustedNear = cos(_valHalfPersp + sqrt(daz * daz + dal * dal)); + float adjustedNear = cos(_valHalfPerspectiveAngle + sqrt(daz * daz + dal * dal)); // printLog("Stars.cpp: checking tile #%d, w = %f, near = %f\n", i, w, nearClip); @@ -484,7 +484,7 @@ namespace starfield { "}\n"; _objProgram.addShaderFromSourceCode(QGLShader::Fragment, FRAGMENT_SHADER); _objProgram.link(); - _alphaLocation = _objProgram.uniformLocation("alpha"); + _alphaLocationHandle = _objProgram.uniformLocation("alpha"); glGenBuffersARB(1, & _hndVertexArray); } @@ -532,7 +532,7 @@ namespace starfield { // select shader and vertex array _objProgram.bind(); - _objProgram.setUniformValue(_alphaLocation, alpha); + _objProgram.setUniformValue(_alphaLocationHandle, alpha); glBindBufferARB(GL_ARRAY_BUFFER, _hndVertexArray); glInterleavedArrays(GL_C4UB_V3F, sizeof(GpuVertex), 0l); diff --git a/interface/src/starfield/renderer/Tiling.h b/interface/src/starfield/renderer/Tiling.h index 56df23f30c..4737e318f9 100644 --- a/interface/src/starfield/renderer/Tiling.h +++ b/interface/src/starfield/renderer/Tiling.h @@ -21,19 +21,19 @@ namespace starfield { unsigned _valK; float _valRcpSlice; - unsigned _valBits; + unsigned _valNBits; public: Tiling(unsigned k) : _valK(k), _valRcpSlice(k / Radians::twicePi()) { - _valBits = ceil(log(getTileCount()) * 1.4426950408889634); // log2 + _valNBits = ceil(log(getTileCount()) * 1.4426950408889634); // log2 } unsigned getAzimuthalTiles() const { return _valK; } unsigned getAltitudinalTiles() const { return _valK / 2 + 1; } - unsigned getTileIndexBits() const { return _valBits; } + unsigned getTileIndexBits() const { return _valNBits; } unsigned getTileCount() const { return getAzimuthalTiles() * getAltitudinalTiles();