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
+9 -24
View File
@@ -47,7 +47,7 @@ namespace {
BlendModeAdditive
};
static const openspace::properties::Property::PropertyInfo BillboardInfo = {
const openspace::properties::Property::PropertyInfo BillboardInfo = {
"Billboard",
"Billboard mode",
"This value specifies whether the plane is a billboard, which means that it is "
@@ -55,13 +55,13 @@ namespace {
"transformations."
};
static const openspace::properties::Property::PropertyInfo SizeInfo = {
const openspace::properties::Property::PropertyInfo SizeInfo = {
"Size",
"Size (in meters)",
"This value specifies the size of the plane in meters."
};
static const openspace::properties::Property::PropertyInfo BlendModeInfo = {
const openspace::properties::Property::PropertyInfo BlendModeInfo = {
"BlendMode",
"Blending Mode",
"This determines the blending mode that is applied to this plane."
@@ -103,10 +103,6 @@ RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary)
, _billboard(BillboardInfo, false)
, _size(SizeInfo, 10.f, 0.f, 1e25f)
, _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown)
, _shader(nullptr)
, _quad(0)
, _vertexPositionBuffer(0)
, _planeIsDirty(false)
{
documentation::testSpecificationAndThrow(
Documentation(),
@@ -226,19 +222,17 @@ void RenderablePlane::render(const RenderData& data, RendererTasks&) {
_shader->setUniform("texture1", unit);
bool usingFramebufferRenderer =
OsEng.renderEngine().rendererImplementation() ==
RenderEngine::RendererImplementation::Framebuffer;
bool usingFramebufferRenderer = OsEng.renderEngine().rendererImplementation() ==
RenderEngine::RendererImplementation::Framebuffer;
bool usingABufferRenderer =
OsEng.renderEngine().rendererImplementation() ==
RenderEngine::RendererImplementation::ABuffer;
bool usingABufferRenderer = OsEng.renderEngine().rendererImplementation() ==
RenderEngine::RendererImplementation::ABuffer;
if (usingABufferRenderer) {
_shader->setUniform("additiveBlending", _blendMode == BlendModeAdditive);
}
bool additiveBlending = _blendMode == BlendModeAdditive && usingFramebufferRenderer;
bool additiveBlending = (_blendMode == BlendModeAdditive) && usingFramebufferRenderer;
if (additiveBlending) {
glDepthMask(false);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
@@ -259,7 +253,6 @@ void RenderablePlane::bindTexture() {}
void RenderablePlane::unbindTexture() {}
void RenderablePlane::update(const UpdateData&) {
if (_shader->isDirty()) {
_shader->rebuildFromFile();
@@ -267,7 +260,6 @@ void RenderablePlane::update(const UpdateData&) {
if (_planeIsDirty) {
createPlane();
}
}
@@ -287,14 +279,7 @@ void RenderablePlane::createPlane() {
glBindBuffer(GL_ARRAY_BUFFER, _vertexPositionBuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertexData), vertexData, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(
0,
4,
GL_FLOAT,
GL_FALSE,
sizeof(GLfloat) * 6,
nullptr
);
glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, sizeof(GLfloat) * 6, nullptr);
glEnableVertexAttribArray(1);
glVertexAttribPointer(