mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-21 01:59:15 -05:00
Check_style fixes
This commit is contained in:
@@ -445,7 +445,7 @@ void mainRenderFunc() {
|
||||
|
||||
glm::mat4 projectionMatrix = SgctEngine->getCurrentProjectionMatrix();
|
||||
#ifdef OPENVR_SUPPORT
|
||||
const bool currentWindowIsHMD = FirstOpenVRWindow == SgctEngine->getCurrentWindowPtr();
|
||||
bool currentWindowIsHMD = FirstOpenVRWindow == SgctEngine->getCurrentWindowPtr();
|
||||
if (sgct::SGCTOpenVR::isHMDActive() && currentWindowIsHMD) {
|
||||
projectionMatrix = sgct::SGCTOpenVR::getHMDCurrentViewProjectionMatrix(
|
||||
SgctEngine->getCurrentFrustumMode()
|
||||
@@ -623,8 +623,8 @@ void setSgctDelegateFunctions() {
|
||||
for (size_t i = 0; i < n; ++i) {
|
||||
glClearColor(clearColor.r, clearColor.g, clearColor.b, clearColor.a);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
GLFWwindow* win = sgct::Engine::instance()->getWindowPtr(i)->getWindowHandle();
|
||||
glfwSwapBuffers(win);
|
||||
GLFWwindow* w = sgct::Engine::instance()->getWindowPtr(i)->getWindowHandle();
|
||||
glfwSwapBuffers(w);
|
||||
}
|
||||
};
|
||||
sgctDelegate.windowHasResized = []() {
|
||||
|
||||
+1
-1
Submodule ext/ghoul updated: d79383f035...432835a77b
@@ -117,7 +117,7 @@ void RenderablePlaneImageLocal::loadTexture() {
|
||||
ghoul::opengl::Texture* t = _texture;
|
||||
|
||||
unsigned int hash = ghoul::hashCRC32File(_texturePath);
|
||||
|
||||
|
||||
_texture = BaseModule::TextureManager.request(
|
||||
std::to_string(hash),
|
||||
[path = _texturePath]() -> std::unique_ptr<ghoul::opengl::Texture> {
|
||||
|
||||
@@ -1042,7 +1042,7 @@ void RenderableBillboardsCloud::update(const UpdateData&) {
|
||||
ghoul::io::TextureReader::ref().loadTexture(
|
||||
absPath(path)
|
||||
);
|
||||
|
||||
|
||||
t->uploadTexture();
|
||||
t->setFilter(ghoul::opengl::Texture::FilterMode::AnisotropicMipMap);
|
||||
return t;
|
||||
|
||||
@@ -591,7 +591,8 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&,
|
||||
_program->setUniform(_uniformCache.galaxyTexture, unit);
|
||||
int currentTextureIndex = -1;
|
||||
|
||||
for (const std::unordered_map<int, PlaneAggregate>::reference pAMapItem : _planesMap) {
|
||||
for (const std::unordered_map<int, PlaneAggregate>::reference pAMapItem : _planesMap)
|
||||
{
|
||||
// For planes with undefined textures references
|
||||
if (pAMapItem.first == 30) {
|
||||
continue;
|
||||
@@ -604,7 +605,7 @@ void RenderablePlanesCloud::renderPlanes(const RenderData&,
|
||||
glBindVertexArray(pAMapItem.second.vao);
|
||||
glDrawArrays(GL_TRIANGLES, 0, 6 * pAMapItem.second.numberOfPlanes);
|
||||
}
|
||||
|
||||
|
||||
glBindVertexArray(0);
|
||||
_program->deactivate();
|
||||
|
||||
@@ -1294,7 +1295,7 @@ void RenderablePlanesCloud::createPlanes() {
|
||||
};
|
||||
|
||||
int textureIndex = static_cast<int>(_fullData[p + _textureVariableIndex]);
|
||||
std::unordered_map<int, PlaneAggregate>::iterator found =
|
||||
std::unordered_map<int, PlaneAggregate>::iterator found =
|
||||
_planesMap.find(textureIndex);
|
||||
if (found != _planesMap.end()) {
|
||||
for (int i = 0; i < PLANES_VERTEX_DATA_SIZE; ++i) {
|
||||
@@ -1312,7 +1313,7 @@ void RenderablePlanesCloud::createPlanes() {
|
||||
pA.planesCoordinates.push_back(vertexData[i]);
|
||||
}
|
||||
_planesMap.insert(std::pair<int, PlaneAggregate>(textureIndex, pA));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Send data to GPU
|
||||
@@ -1321,7 +1322,8 @@ void RenderablePlanesCloud::createPlanes() {
|
||||
glBindBuffer(GL_ARRAY_BUFFER, pAMapItem.second.vbo);
|
||||
glBufferData(
|
||||
GL_ARRAY_BUFFER,
|
||||
sizeof(GLfloat) * PLANES_VERTEX_DATA_SIZE * pAMapItem.second.numberOfPlanes,
|
||||
sizeof(GLfloat) * PLANES_VERTEX_DATA_SIZE *
|
||||
pAMapItem.second.numberOfPlanes,
|
||||
pAMapItem.second.planesCoordinates.data(),
|
||||
GL_STATIC_DRAW
|
||||
);
|
||||
@@ -1348,7 +1350,7 @@ void RenderablePlanesCloud::createPlanes() {
|
||||
);
|
||||
|
||||
glBindVertexArray(0);
|
||||
}
|
||||
}
|
||||
|
||||
_dataIsDirty = false;
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ void GUI::initializeGL() {
|
||||
absPath("${MODULE_IMGUI}/shaders/gui_vs.glsl"),
|
||||
absPath("${MODULE_IMGUI}/shaders/gui_fs.glsl")
|
||||
);
|
||||
|
||||
|
||||
ghoul::opengl::updateUniformLocations(*_program, _uniformCache, UniformNames);
|
||||
|
||||
int nWindows = global::windowDelegate.nWindows();
|
||||
|
||||
@@ -417,7 +417,7 @@ void GuiSpaceTimeComponent::render() {
|
||||
|
||||
_deltaTime -= _slidingDelta;
|
||||
}
|
||||
|
||||
|
||||
const bool isPaused = global::timeManager.isPaused();
|
||||
const bool pauseChanged = ImGui::Button(
|
||||
isPaused ? "Resume" : "Pause",
|
||||
|
||||
@@ -697,7 +697,7 @@ void RenderablePlanetProjection::render(const RenderData& data, RendererTasks&)
|
||||
void RenderablePlanetProjection::update(const UpdateData& data) {
|
||||
if (_programObject->isDirty()) {
|
||||
_programObject->rebuildFromFile();
|
||||
|
||||
|
||||
ghoul::opengl::updateUniformLocations(
|
||||
*_programObject,
|
||||
_mainUniformCache,
|
||||
|
||||
@@ -235,7 +235,7 @@ bool ImageSequencer::imagePaths(std::vector<Image>& captures,
|
||||
const bool instrumentActive = isInstrumentActive(time, instrumentRequest);
|
||||
const bool hasCurrentTime = _subsetMap[projectee]._range.includes(time);
|
||||
const bool hasSinceTime = _subsetMap[projectee]._range.includes(sinceTime);
|
||||
|
||||
|
||||
if (!instrumentActive || (!hasCurrentTime && !hasSinceTime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user