Merge-in all updates from master

This commit is contained in:
Gene Payne
2024-03-25 18:35:57 -06:00
634 changed files with 13476 additions and 9937 deletions

View File

@@ -115,7 +115,7 @@ void RenderableConstellationBounds::initialize() {
if (it == options.end()) {
// The user has specified a constellation name that doesn't exist
LWARNING(fmt::format(
LWARNING(std::format(
"Option '{}' not found in list of constellations", s
));
}
@@ -146,11 +146,11 @@ void RenderableConstellationBounds::initializeGL() {
glBufferData(
GL_ARRAY_BUFFER,
_vertexValues.size() * 3 * sizeof(float),
&_vertexValues[0],
_vertexValues.data(),
GL_STATIC_DRAW
);
GLint positionAttrib = _program->attributeLocation("in_position");
const GLint positionAttrib = _program->attributeLocation("in_position");
glEnableVertexAttribArray(positionAttrib);
glVertexAttribPointer(positionAttrib, 3, GL_FLOAT, GL_FALSE, 0, nullptr);
@@ -209,7 +209,7 @@ void RenderableConstellationBounds::render(const RenderData& data, RendererTasks
}
bool RenderableConstellationBounds::loadData() {
bool success = loadVertexFile();
const bool success = loadVertexFile();
if (!success) {
throw ghoul::RuntimeError("Error loading data");
}
@@ -246,10 +246,10 @@ bool RenderableConstellationBounds::loadVertexFile() {
// @CHECK: Is this the best way of doing this? ---abock
std::stringstream s(currentLine);
float ra;
float ra = 0.f;
s >> ra;
float dec;
float dec = 0.f;
s >> dec;
std::string abbreviation;
@@ -258,8 +258,8 @@ bool RenderableConstellationBounds::loadVertexFile() {
if (!s.good()) {
// If this evaluates to true, the stream was not completely filled, which
// means that the line was incomplete, so there was an error
LERROR(fmt::format(
"Error reading file {} at line #{}", fileName, currentLineNumber
LERROR(std::format(
"Error reading file '{}' at line #{}", fileName, currentLineNumber
));
break;
}
@@ -276,7 +276,8 @@ bool RenderableConstellationBounds::loadVertexFile() {
currentBound.isEnabled = true;
currentBound.constellationAbbreviation = abbreviation;
std::string name = constellationFullName(abbreviation);
currentBound.constellationFullName = name.empty() ? abbreviation : name;
currentBound.constellationFullName =
name.empty() ? abbreviation : std::move(name);
currentBound.startIndex = static_cast<GLsizei>(_vertexValues.size());
}
@@ -290,8 +291,8 @@ bool RenderableConstellationBounds::loadVertexFile() {
// Convert the (right ascension, declination) to rectangular coordinates)
// The 1.0 is the distance of the celestial sphere, we will scale that in the
// render function
double rectangularValues[3];
radrec_c(1.0, ra, dec, rectangularValues);
std::array<double, 3> rectangularValues;
radrec_c(1.0, ra, dec, rectangularValues.data());
// Add the new vertex to our list of vertices
_vertexValues.push_back({