mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-02 01:30:34 -06:00
- 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
45 lines
969 B
C++
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 |