mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
Merge branch 'master' into feature/loadingscreen-refactor
This commit is contained in:
@@ -52,7 +52,7 @@ bool MultiModelGeometry::loadModel(const std::string& filename) {
|
||||
_vertices.push_back(vv);
|
||||
}
|
||||
|
||||
_indices.resize(indices.size());
|
||||
_indices.resize(indices.size());
|
||||
std::copy(indices.begin(), indices.end(), _indices.begin());
|
||||
|
||||
return true;
|
||||
|
||||
@@ -165,7 +165,7 @@ void RenderableModel::initializeGL() {
|
||||
|
||||
loadTexture();
|
||||
|
||||
_geometry->initialize(this);
|
||||
_geometry->initialize(this);
|
||||
}
|
||||
|
||||
void RenderableModel::deinitializeGL() {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <memory>
|
||||
|
||||
namespace ghoul::opengl {
|
||||
class ProgramObject;
|
||||
class ProgramObject;
|
||||
class Texture;
|
||||
} // namespace ghoul::opengl
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ void RenderablePlane::deinitializeGL() {
|
||||
void RenderablePlane::render(const RenderData& data, RendererTasks&) {
|
||||
_shader->activate();
|
||||
//if (_projectionListener){
|
||||
// //get parent node-texture and set with correct dimensions
|
||||
// //get parent node-texture and set with correct dimensions
|
||||
// SceneGraphNode* textureNode = OsEng.renderEngine().scene()->sceneGraphNode(
|
||||
// _nodeName
|
||||
// )->parent();
|
||||
@@ -342,7 +342,7 @@ void RenderablePlane::createPlane() {
|
||||
|
||||
glEnableVertexAttribArray(1);
|
||||
glVertexAttribPointer(
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
GL_FLOAT,
|
||||
GL_FALSE,
|
||||
|
||||
@@ -60,7 +60,7 @@ class Translation;
|
||||
*
|
||||
* Trails can be rendered either as lines, as points, or a combination of both with
|
||||
* varying colors, line thicknesses, or fading settings. If trails are rendered as points,
|
||||
* the RenderInformation's \c stride parameter determines the number of points between
|
||||
* the RenderInformation's \c stride parameter determines the number of points between
|
||||
* larger points. A potential use case for this is showing the passage of time along a
|
||||
* trail by using a point separation of one hour and a subsampling of 4, you would get a
|
||||
* point every 15 minutes with every hourly point being bigger.
|
||||
@@ -109,7 +109,7 @@ protected:
|
||||
std::unique_ptr<Translation> _translation;
|
||||
|
||||
/// The RenderInformation contains information filled in by the concrete subclasses to
|
||||
/// be used by this class.
|
||||
/// be used by this class.
|
||||
struct RenderInformation {
|
||||
enum class VertexSorting {
|
||||
NewestFirst = 0, ///< Newer vertices have a lower index than older ones
|
||||
@@ -117,13 +117,13 @@ protected:
|
||||
NoSorting ///< No ordering in the vertices; no fading applied
|
||||
};
|
||||
/// The first element in the vertex buffer to be rendered
|
||||
GLint first = 0;
|
||||
GLint first = 0;
|
||||
/// The number of values to be rendered
|
||||
GLsizei count = 0;
|
||||
/// The stride between 'major' points in the array
|
||||
int stride = 1;
|
||||
/// Sorting of the vertices; required for correct fading
|
||||
VertexSorting sorting = VertexSorting::NoSorting;
|
||||
VertexSorting sorting = VertexSorting::NoSorting;
|
||||
|
||||
/// Local model matrix transformation, used for rendering in camera space
|
||||
glm::dmat4 _localTransform = glm::dmat4(1.0);
|
||||
@@ -156,7 +156,7 @@ private:
|
||||
/// The option determining which rendering method to use
|
||||
properties::OptionProperty _renderingModes;
|
||||
|
||||
/// Program object used to render the data stored in RenderInformation
|
||||
/// Program object used to render the data stored in RenderInformation
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _programObject;
|
||||
};
|
||||
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
// ---------------------------------------------------------------------------------
|
||||
// | FF | | | | | | | | | | | | | | | |
|
||||
// ---------------------------------------------------------------------------------
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
// <------ newer in time oldest
|
||||
//
|
||||
// In the begining the floating value starts at 0; this means that array element 0 is
|
||||
// updated and uploaded to the GPU at every frame. The FF+1 element is the newest fixed
|
||||
// updated and uploaded to the GPU at every frame. The FF+1 element is the newest fixed
|
||||
// location and FF-1 element is the oldest fixed location (including wrapping around the
|
||||
// array) with the times of _lastPointTime and _firstPointTime.
|
||||
//
|
||||
@@ -53,7 +53,7 @@
|
||||
// ---------------------------------------------------------------------------------
|
||||
// | | | | | | | | | | | | | | | | FF |
|
||||
// ---------------------------------------------------------------------------------
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
// <------ newer in time oldest
|
||||
//
|
||||
// Thus making the floating point traverse backwards through the array and element 0 being
|
||||
@@ -257,7 +257,7 @@ void RenderableTrailOrbit::update(const UpdateData& data) {
|
||||
// Only update the changed ones
|
||||
// Since we are using a ring buffer, the number of updated needed might be
|
||||
// bigger than our current points, which means we have to split the upload
|
||||
// into two calls.
|
||||
// into two calls.
|
||||
if (report.nUpdated > 0) {
|
||||
// deltaT is positive, so the pointer is moving backwards and update has
|
||||
// to happen towards the front
|
||||
@@ -277,7 +277,7 @@ void RenderableTrailOrbit::update(const UpdateData& data) {
|
||||
// The current index is too close to the wrap around part, so we need
|
||||
// to split the upload into two parts:
|
||||
// 1. from the current index to the end of the array
|
||||
// 2. the rest starting from the beginning of the array
|
||||
// 2. the rest starting from the beginning of the array
|
||||
int first = s - i;
|
||||
int second = n - first;
|
||||
upload(i, first); // 1
|
||||
|
||||
@@ -68,7 +68,7 @@ private:
|
||||
static const int All = 0; ///< The entire array was touched in the update
|
||||
|
||||
/// If \c true at least one point was touched
|
||||
bool needsUpdate;
|
||||
bool needsUpdate;
|
||||
/// Returns the number of fixed points that were touched in the update method
|
||||
/// If this value is negative, the newest values were replaced, if positive the
|
||||
/// oldest
|
||||
|
||||
@@ -54,7 +54,7 @@ documentation::Documentation ScreenSpaceFramebuffer::Documentation() {
|
||||
};
|
||||
}
|
||||
|
||||
ScreenSpaceFramebuffer::ScreenSpaceFramebuffer(const ghoul::Dictionary& dictionary)
|
||||
ScreenSpaceFramebuffer::ScreenSpaceFramebuffer(const ghoul::Dictionary& dictionary)
|
||||
: ScreenSpaceRenderable(dictionary)
|
||||
, _size(SizeInfo, glm::vec4(0), glm::vec4(0), glm::vec4(16384))
|
||||
, _framebuffer(nullptr)
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace openspace {
|
||||
namespace modelgeometry {
|
||||
|
||||
WavefrontGeometry::WavefrontGeometry(const ghoul::Dictionary& dictionary)
|
||||
: ModelGeometry(dictionary)
|
||||
: ModelGeometry(dictionary)
|
||||
{
|
||||
loadObj(_file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user