Files
OpenSpace/include/openspace/rendering/renderableplanet.h
Jonas Strandstedt 89eeae62d0 Restructuring for OpenSpace tests
- Moved all OpenSpace headers to separate include directory
- Added OpenSpaceTests binary with OPENSPACE_HAVE_TESTS define
- Added CMake setting of BASE_DIR
- Added OpenSpace initial tests for SceneGraph and SceneGraphNodes
- Added OpenSpace initial tests for psc and pss
- Restructured OpenSpace so no GL functions are called in constructors
to make the classes testable

- Todo: Make the base dir possible to set through command line argument
and configuration file
2014-03-19 14:57:10 -04:00

45 lines
969 B
C++

#ifndef RENDERABLEPLANET_H
#define RENDERABLEPLANET_H
// open space includes
#include <openspace/rendering/renderable.h>
#include <openspace/util/powerscaledsphere.h>
// ghoul includes
#include <ghoul/opengl/programobject.h>
#include <ghoul/opengl/texture.h>
namespace openspace {
class RenderablePlanet: public Renderable {
public:
// constructors & destructor
RenderablePlanet(const ghoul::Dictionary& dictionary);
~RenderablePlanet();
bool initialize();
bool deinitialize();
void setProgramObject(ghoul::opengl::ProgramObject *programObject = nullptr);
void setTexture(ghoul::opengl::Texture *texture);
virtual void render(const Camera *camera, const psc &thisPosition);
virtual void update();
private:
// shader
ghoul::opengl::ProgramObject *programObject_;
// texture
std::string _texturePath;
ghoul::opengl::Texture *texture_;
// Object
PowerScaledSphere *planet_;
};
} // namespace openspace
#endif