mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-13 17:09:05 -05:00
WIP3: problems with texture coordinates, needs fix.
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
#include <openspace/properties/stringproperty.h>
|
||||
// ghoul includes
|
||||
#include <ghoul/opengl/programobject.h>
|
||||
#include <ghoul/opengl/texture.h>
|
||||
|
||||
|
||||
namespace openspace{
|
||||
|
||||
@@ -44,17 +46,23 @@ public:
|
||||
void render(const Camera* camera, const psc& position) override;
|
||||
void update() override;
|
||||
|
||||
protected:
|
||||
void loadTexture();
|
||||
|
||||
private:
|
||||
std::ifstream& skipToLine(std::ifstream& file, unsigned int num);
|
||||
bool readSpeckFile(const std::string& path);
|
||||
|
||||
properties::StringProperty _colorTexturePath;
|
||||
|
||||
ghoul::opengl::ProgramObject* _programObject;
|
||||
ghoul::opengl::Texture* _texture;
|
||||
|
||||
std::string _speckPath;
|
||||
|
||||
GLuint _vboID;
|
||||
GLuint _vaoID;
|
||||
//GLint positionAttrib;
|
||||
GLint positionAttrib;
|
||||
int v_size;
|
||||
};
|
||||
|
||||
|
||||
@@ -97,6 +97,15 @@ public:
|
||||
void setPosition(psc pos);
|
||||
const psc& position() const;
|
||||
|
||||
void setModelMatrix(glm::mat4 modelMatrix);
|
||||
const glm::mat4& modelMatrix() const;
|
||||
|
||||
void setViewMatrix(glm::mat4 viewMatrix);
|
||||
const glm::mat4& viewMatrix() const;
|
||||
|
||||
void setProjectionMatrix(glm::mat4 projectionMatrix);
|
||||
const glm::mat4& projectionMatrix() const;
|
||||
|
||||
void setViewProjectionMatrix(glm::mat4 viewProjectionMatrix);
|
||||
const glm::mat4& viewProjectionMatrix() const;
|
||||
|
||||
@@ -126,10 +135,12 @@ private:
|
||||
float _sinMaxFov;
|
||||
psc _position;
|
||||
glm::mat4 _viewProjectionMatrix;
|
||||
glm::mat4 _modelMatrix;
|
||||
glm::mat4 _viewMatrix;
|
||||
glm::mat4 _projectionMatrix;
|
||||
glm::vec3 _viewDirection;
|
||||
glm::vec3 _cameraDirection;
|
||||
glm::vec2 _scaling;
|
||||
|
||||
glm::quat _viewRotation;
|
||||
glm::mat4 _viewRotationMatrix; // compiled from the quaternion
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace renderableplanet {
|
||||
|
||||
namespace renderablestars {
|
||||
const std::string keySpeckFile = "SpeckFile";
|
||||
const std::string keyPathModule = "ModulePath";
|
||||
} // namespace renderablestars
|
||||
|
||||
namespace planetgeometry {
|
||||
|
||||
Reference in New Issue
Block a user