mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 20:50:59 -05:00
Fix compilation warnings.
This commit is contained in:
+2
-1
@@ -68,8 +68,9 @@ public:
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<ghoul::opengl::Texture>> _textures;
|
||||
size_t _freeTexture;
|
||||
|
||||
const TileTextureInitData _initData;
|
||||
size_t _freeTexture;
|
||||
size_t _numTextures;
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ bool FrustumCuller::isCullable(const Chunk& chunk, const RenderData& data) {
|
||||
// Calculate the MVP matrix
|
||||
glm::dmat4 modelTransform = chunk.owner().modelTransform();
|
||||
glm::dmat4 viewTransform = glm::dmat4(data.camera.combinedViewMatrix());
|
||||
glm::dmat4 modelViewProjectionTransform = glm::dmat4(data.camera.projectionMatrix())
|
||||
glm::dmat4 modelViewProjectionTransform = glm::dmat4(data.camera.sgctInternal.projectionMatrix())
|
||||
* viewTransform * modelTransform;
|
||||
|
||||
const std::vector<glm::dvec4>& corners = chunk.getBoundingPolyhedronCorners();
|
||||
|
||||
@@ -48,7 +48,6 @@ int addLayer(lua_State* L) {
|
||||
// Argument locations
|
||||
const int GlobeLocation = -3;
|
||||
const int LayerGroupLocation = -2;
|
||||
const int DictionaryLocation = -1;
|
||||
|
||||
int nArguments = lua_gettop(L);
|
||||
if (nArguments != 3) {
|
||||
|
||||
@@ -69,14 +69,14 @@ bool PointGlobe::initialize() {
|
||||
|
||||
glBindVertexArray(_vaoID);
|
||||
|
||||
std::array<glm::vec2, 6> quadVertexData = {
|
||||
glm::vec2(-1.0f, -1.0f),
|
||||
glm::vec2(1.0f, -1.0f),
|
||||
glm::vec2(-1.0f, 1.0f),
|
||||
glm::vec2(-1.0f, 1.0f),
|
||||
glm::vec2(1.0f, -1.0f),
|
||||
glm::vec2(1.0f, 1.0f)
|
||||
};
|
||||
std::array<glm::vec2, 6> quadVertexData = {{
|
||||
glm::vec2(-1.0f, -1.0f),
|
||||
glm::vec2(1.0f, -1.0f),
|
||||
glm::vec2(-1.0f, 1.0f),
|
||||
glm::vec2(-1.0f, 1.0f),
|
||||
glm::vec2(1.0f, -1.0f),
|
||||
glm::vec2(1.0f, 1.0f)
|
||||
}};
|
||||
|
||||
// Vertex buffer
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _vertexBufferID);
|
||||
@@ -121,7 +121,7 @@ void PointGlobe::render(const RenderData& data) {
|
||||
float avgRadius = _owner.ellipsoid().averageRadius();
|
||||
float lightIntensity = _lightIntensity.value() * data.modelTransform.scale * avgRadius / distanceToBody;
|
||||
float lightIntensityClamped = glm::min(lightIntensity, _intensityClamp.value());
|
||||
float lightOverflow = glm::max(lightIntensity - lightIntensityClamped, 0.0f);
|
||||
//float lightOverflow = glm::max(lightIntensity - lightIntensityClamped, 0.0f);
|
||||
|
||||
float billboardRadius = lightIntensityClamped * distanceToBody;
|
||||
glm::dmat4 scaleTransform = glm::scale(glm::dmat4(1.0), glm::dvec3(billboardRadius));
|
||||
@@ -134,8 +134,8 @@ void PointGlobe::render(const RenderData& data) {
|
||||
glm::inverse(rotationTransform) *
|
||||
scaleTransform; // Scale
|
||||
glm::dmat4 modelViewTransform = data.camera.combinedViewMatrix() * modelTransform;
|
||||
glm::vec3 directionToSun = glm::normalize(glm::vec3(0) - glm::vec3(bodyPosition));
|
||||
glm::vec3 directionToSunViewSpace = glm::mat3(data.camera.combinedViewMatrix()) * directionToSun;
|
||||
//glm::vec3 directionToSun = glm::normalize(glm::vec3(0) - glm::vec3(bodyPosition));
|
||||
//glm::vec3 directionToSunViewSpace = glm::mat3(data.camera.combinedViewMatrix()) * directionToSun;
|
||||
|
||||
|
||||
_programObject->setUniform("lightIntensityClamped", lightIntensityClamped);
|
||||
|
||||
@@ -83,7 +83,6 @@ protected:
|
||||
GLfloat position[4];
|
||||
GLfloat texture[2];
|
||||
GLfloat normal[3];
|
||||
private:
|
||||
GLubyte padding[28]; // Pads the struct out to 64 bytes for performance increase
|
||||
};
|
||||
|
||||
|
||||
@@ -35,11 +35,6 @@ namespace {
|
||||
|
||||
LayerAdjustment::LayerAdjustment()
|
||||
: properties::PropertyOwner("adjustment")
|
||||
, _typeOption(
|
||||
"type",
|
||||
"Type",
|
||||
properties::OptionProperty::DisplayType::Dropdown
|
||||
)
|
||||
, chromaKeyColor(
|
||||
"chromaKeyColor",
|
||||
"Chroma key color",
|
||||
@@ -54,6 +49,11 @@ LayerAdjustment::LayerAdjustment()
|
||||
0,
|
||||
1
|
||||
)
|
||||
, _typeOption(
|
||||
"type",
|
||||
"Type",
|
||||
properties::OptionProperty::DisplayType::Dropdown
|
||||
)
|
||||
, _onChangeCallback([](){})
|
||||
{
|
||||
// Add options to option properties
|
||||
|
||||
@@ -149,6 +149,9 @@ TileTextureInitData LayerManager::getTileTextureInitData(layergroupid::GroupID i
|
||||
}
|
||||
default: {
|
||||
ghoul_assert(false, "Unknown layer group ID");
|
||||
size_t tileSize = preferredTileSize ? preferredTileSize : 512;
|
||||
return TileTextureInitData(tileSize, tileSize, GL_UNSIGNED_BYTE,
|
||||
ghoul::opengl::Texture::Format::BGRA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,7 +415,10 @@ size_t numberOfRasters(ghoul::opengl::Texture::Format format) {
|
||||
case ghoul::opengl::Texture::Format::BGR: return 3;
|
||||
case ghoul::opengl::Texture::Format::RGBA:; // Intentional fallthrough
|
||||
case ghoul::opengl::Texture::Format::BGRA: return 4;
|
||||
default: ghoul_assert(false, "Unknown format");
|
||||
default: {
|
||||
ghoul_assert(false, "Unknown format");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,8 +433,10 @@ size_t numberOfBytes(GLenum glType) {
|
||||
case GL_HALF_FLOAT: return sizeof(GLhalf);
|
||||
case GL_FLOAT: return sizeof(GLfloat);
|
||||
case GL_DOUBLE: return sizeof(GLdouble);
|
||||
default:
|
||||
default: {
|
||||
ghoul_assert(false, "Unknown data type");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,8 +452,10 @@ size_t getMaximumValue(GLenum glType) {
|
||||
return size_t(1) << 32;
|
||||
case GL_INT:
|
||||
return 1 << 31;
|
||||
default:
|
||||
default: {
|
||||
ghoul_assert(false, "Unknown data type");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,8 +477,10 @@ float interpretFloat(GLenum glType, const char* src) {
|
||||
return static_cast<float>(*reinterpret_cast<const GLfloat*>(src));
|
||||
case GL_DOUBLE:
|
||||
return static_cast<float>(*reinterpret_cast<const GLdouble*>(src));
|
||||
default:
|
||||
default: {
|
||||
ghoul_assert(false, "Unknown data type");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -197,8 +197,6 @@ void DefaultTileProvider::initTexturesFromLoadedData() {
|
||||
void DefaultTileProvider::initAsyncTileDataReader(TileTextureInitData initData) {
|
||||
std::string _loggerCat = "DefaultTileProvider : " + _name;
|
||||
|
||||
RawTileDataReader* tileDataReader = nullptr;
|
||||
|
||||
RawTileDataReader::PerformPreprocessing preprocess =
|
||||
_performPreProcessing ? RawTileDataReader::PerformPreprocessing::Yes :
|
||||
RawTileDataReader::PerformPreprocessing::No;
|
||||
|
||||
@@ -34,10 +34,6 @@
|
||||
|
||||
#include <climits>
|
||||
|
||||
namespace {
|
||||
const char* KeyType = "Type";
|
||||
}
|
||||
|
||||
namespace openspace {
|
||||
namespace globebrowsing {
|
||||
namespace tileprovider {
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
|
||||
namespace {
|
||||
const char* _loggerCat = "TileProviderByLevel";
|
||||
|
||||
const char* KeyProviders = "LevelTileProviders";
|
||||
const char* KeyMaxLevel = "MaxLevel";
|
||||
const char* KeyTileProvider = "TileProvider";
|
||||
@@ -46,7 +48,6 @@ TileProviderByLevel::TileProviderByLevel(const ghoul::Dictionary& dictionary)
|
||||
|
||||
layergroupid::GroupID layerGroupID;
|
||||
dictionary.getValue(KeyLayerGroupID, layerGroupID);
|
||||
const char* _loggerCat = ("TileProviderByLevel" + name).c_str();
|
||||
|
||||
ghoul::Dictionary providers;
|
||||
if (dictionary.hasKeyAndValue<ghoul::Dictionary>(KeyProviders)) {
|
||||
|
||||
Reference in New Issue
Block a user