mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
clarifies some names
This commit is contained in:
parent
2cc5f732ce
commit
989256aad0
3 changed files with 17 additions and 17 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue