mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
opengl 3.3 renderer integration, minor renderer tweaks
This commit is contained in:
@@ -11,7 +11,6 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "openglskydome.h"
|
||||
|
||||
#include "simulationenvironment.h"
|
||||
#include "openglgeometrybank.h"
|
||||
|
||||
opengl_skydome::~opengl_skydome() {
|
||||
|
||||
@@ -58,7 +57,14 @@ void opengl_skydome::update() {
|
||||
if( true == skydome.is_dirty() ) {
|
||||
if( ( m_coloursbuffer > 0 ) && ( m_coloursbuffer != (GLuint)-1 ) ) {
|
||||
::glBindBuffer( GL_ARRAY_BUFFER, m_coloursbuffer );
|
||||
auto const &colors { skydome.colors() };
|
||||
auto &colors{ skydome.colors() };
|
||||
/*
|
||||
float twilightfactor = clamp( -simulation::Environment.sun().getAngle(), 0.0f, 18.0f ) / 18.0f;
|
||||
auto gamma = interpolate( glm::vec3( 0.45f ), glm::vec3( 1.0f ), twilightfactor );
|
||||
for( auto & color : colors ) {
|
||||
color = glm::pow( color, gamma );
|
||||
}
|
||||
*/
|
||||
::glBufferSubData( GL_ARRAY_BUFFER, 0, colors.size() * sizeof( glm::vec3 ), colors.data() );
|
||||
skydome.is_dirty() = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user