resolved conflict

This commit is contained in:
Erik Broberg
2016-04-01 13:49:59 -04:00
2 changed files with 7 additions and 21 deletions

View File

@@ -51,6 +51,7 @@ namespace openspace {
PlanetMesh::PlanetMesh(const ghoul::Dictionary& dictionary)
: DistanceSwitch()
, _programObject(nullptr)
, _grid(10, 10, Geometry::Positions::Yes, Geometry::TextureCoordinates::No, Geometry::Normals::No)
, _rotation("rotation", "Rotation", 0, 0, 360)
{
std::string name;
@@ -67,25 +68,6 @@ namespace openspace {
// Mainly for debugging purposes @AA
addProperty(_rotation);
// Create a simple triangle for testing the geometry
std::vector<unsigned int> triangleElements;
std::vector<glm::vec4> trianglePositions;
trianglePositions.push_back(glm::vec4(0, 0, 0, 1));
trianglePositions.push_back(glm::vec4(10000000, 0, 0, 1));
trianglePositions.push_back(glm::vec4(10000000, 10000000, 0, 1));
triangleElements.push_back(0);
triangleElements.push_back(1);
triangleElements.push_back(2);
_testGeometry = std::unique_ptr<Geometry>(new Geometry(
triangleElements,
Geometry::Positions::Yes,
Geometry::TextureCoordinates::No,
Geometry::Normals::No));
_testGeometry->setVertexPositions(trianglePositions);
}
PlanetMesh::~PlanetMesh() {
@@ -156,7 +138,8 @@ namespace openspace {
glCullFace(GL_BACK);
// render
_testGeometry->drawUsingActiveProgram();
// _testGeometry->drawUsingActiveProgram();
_grid.drawUsingActiveProgram();
// disable shader
_programObject->deactivate();

View File

@@ -32,6 +32,7 @@
#include <openspace/util/updatestructures.h>
#include <modules/planetbrowsing/rendering/geometry.h>
#include <modules/planetbrowsing/rendering/gridgeometry.h>
#include <modules/planetbrowsing/rendering/distanceswitch.h>
#include <modules/planetbrowsing/rendering/planetmesh.h>
@@ -59,7 +60,9 @@ namespace openspace {
private:
std::unique_ptr<ghoul::opengl::ProgramObject> _programObject;
std::unique_ptr<Geometry> _testGeometry;
//std::unique_ptr<Geometry> _testGeometry;
GridGeometry _grid;
properties::IntProperty _rotation;