mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-22 12:59:07 -06:00
Testing...
This commit is contained in:
@@ -38,10 +38,10 @@ namespace {
|
||||
constexpr const char* ProgramName = "EphemerisProgram";
|
||||
constexpr const char* KeyTranslation = "Translation";
|
||||
|
||||
constexpr const std::array<const char*, 13> UniformNames = {
|
||||
constexpr const std::array<const char*, 14> UniformNames = {
|
||||
"opacity", "modelViewTransform", "projectionTransform", "color", "useLineFade",
|
||||
"lineFade", "vertexSortingMethod", "idOffset", "nVertices", "stride", "pointSize",
|
||||
"renderPhase", "resolution"
|
||||
"renderPhase", "resolution", "lineWidth"
|
||||
};
|
||||
|
||||
// The possible values for the _renderingModes property
|
||||
@@ -327,14 +327,15 @@ void RenderableTrail::render(const RenderData& data, RendererTasks&) {
|
||||
(_appearance.renderingModes == RenderingModeLinesPoints);
|
||||
|
||||
if (renderLines) {
|
||||
glLineWidth(_appearance.lineWidth);
|
||||
glLineWidth(ceil((2.f * 1.f + _appearance.lineWidth) * std::sqrt(2.f)));
|
||||
}
|
||||
if (renderPoints) {
|
||||
glEnable(GL_PROGRAM_POINT_SIZE);
|
||||
}
|
||||
|
||||
auto render = [renderLines, renderPoints, p = _programObject, &data,
|
||||
&modelTransform, pointSize = _appearance.pointSize.value(), c = _uniformCache]
|
||||
&modelTransform, pointSize = _appearance.pointSize.value(),
|
||||
c = _uniformCache, lw = _appearance.lineWidth]
|
||||
(RenderInformation& info, int nVertices, int offset)
|
||||
{
|
||||
// We pass in the model view transformation matrix as double in order to maintain
|
||||
@@ -357,7 +358,9 @@ void RenderableTrail::render(const RenderData& data, RendererTasks&) {
|
||||
|
||||
glm::ivec2 resolution = global::renderEngine.renderingResolution();
|
||||
p->setUniform(c.resolution, resolution);
|
||||
|
||||
|
||||
p->setUniform(c.lineWidth, ceil((2.f * 1.f + lw) * std::sqrt(2.f)));
|
||||
|
||||
if (renderPoints) {
|
||||
// The stride parameter determines the distance between larger points and
|
||||
// smaller ones
|
||||
@@ -373,8 +376,6 @@ void RenderableTrail::render(const RenderData& data, RendererTasks&) {
|
||||
|
||||
glBindVertexArray(info._vaoID);
|
||||
if (renderLines) {
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
|
||||
p->setUniform(c.renderPhase, RenderPhaseLines);
|
||||
// Subclasses of this renderer might be using the index array or might now be
|
||||
// so we check if there is data available and if there isn't, we use the
|
||||
@@ -394,7 +395,6 @@ void RenderableTrail::render(const RenderData& data, RendererTasks&) {
|
||||
reinterpret_cast<void*>(info.first * sizeof(unsigned int))
|
||||
);
|
||||
}
|
||||
glDisable(GL_LINE_SMOOTH);
|
||||
}
|
||||
if (renderPoints) {
|
||||
// Subclasses of this renderer might be using the index array or might now be
|
||||
|
||||
Reference in New Issue
Block a user