Code cleanup branch (#618)

* Make height map fallback layer work again
  * Add documentation to joystick button bindings
  * Removed grouped property headers
  * Add new version number constant generated by CMake
  * Make Joystick deadzone work properly
  * Change the startup date on Earth to today
  * Fix key modifier handling
  * Add debugging indices for TreeNodeDebugging
  * Fix script schedule for OsirisRex
  * Do not open Mission schedule automatically
  * Upload default projection texture automatically

  * General code cleanup
  * Fix check_style_guide warnings
  * Remove .clang-format
  * MacOS compile fixes
  * Clang analyzer fixes
This commit is contained in:
Alexander Bock
2018-06-10 04:47:34 +00:00
committed by GitHub
parent 5de728442d
commit 4952f8f977
796 changed files with 22428 additions and 24063 deletions
+8 -9
View File
@@ -23,13 +23,11 @@
****************************************************************************************/
#include <modules/globebrowsing/cache/texturecontainer.h>
#include <modules/globebrowsing/tile/tiletextureinitdata.h>
namespace openspace::globebrowsing::cache {
TextureContainer::TextureContainer(TileTextureInitData initData, size_t numTextures)
: _initData(initData)
, _freeTexture(0)
: _initData(std::move(initData))
, _numTextures(numTextures)
{
reset();
@@ -39,19 +37,20 @@ void TextureContainer::reset() {
_textures.clear();
_freeTexture = 0;
for (size_t i = 0; i < _numTextures; ++i) {
auto tex = std::make_unique<ghoul::opengl::Texture>(
using namespace ghoul::opengl;
std::unique_ptr<Texture> tex = std::make_unique<Texture>(
_initData.dimensions(),
_initData.ghoulTextureFormat(),
_initData.glTextureFormat(),
_initData.glType(),
ghoul::opengl::Texture::FilterMode::Linear,
ghoul::opengl::Texture::WrappingMode::ClampToEdge,
ghoul::opengl::Texture::AllocateData(_initData.shouldAllocateDataOnCPU())
Texture::FilterMode::Linear,
Texture::WrappingMode::ClampToEdge,
Texture::AllocateData(_initData.shouldAllocateDataOnCPU())
);
tex->setDataOwnership(ghoul::opengl::Texture::TakeOwnership::Yes);
tex->setDataOwnership(Texture::TakeOwnership::Yes);
tex->uploadTexture();
tex->setFilter(ghoul::opengl::Texture::FilterMode::AnisotropicMipMap);
tex->setFilter(Texture::FilterMode::AnisotropicMipMap);
_textures.push_back(std::move(tex));
}