files missing from previous commit

fixes
version
This commit is contained in:
tmj-fstate
2018-06-15 18:56:50 +02:00
committed by milek7
parent db58ec131a
commit 8491c63f3c
10 changed files with 41 additions and 41 deletions

View File

@@ -16,23 +16,6 @@ http://mozilla.org/MPL/2.0/.
#include "Track.h"
#include "renderer.h"
//---------------------------------------------------------------------------
// helper, restores content of a 3d vector from provided input stream
// TODO: review and clean up the helper routines, there's likely some redundant ones
Math3D::vector3 LoadPoint( cParser &Input ) {
// pobranie współrzędnych punktu
Input.getTokens( 3 );
Math3D::vector3 point;
Input
>> point.x
>> point.y
>> point.z;
return point;
}
void
segment_data::deserialize( cParser &Input, Math3D::vector3 const &Offset ) {

View File

@@ -19,6 +19,7 @@ http://mozilla.org/MPL/2.0/.
#include "Globals.h"
#include "Logs.h"
#include "renderer.h"
#include "utilities.h"
//---------------------------------------------------------------------------
/*
@@ -93,17 +94,6 @@ sekcji z sąsiedniego przęsła).
TTraction::TTraction( scene::node_data const &Nodedata ) : basic_node( Nodedata ) {}
glm::dvec3 LoadPoint( cParser &Input ) {
// pobranie współrzędnych punktu
glm::dvec3 point;
Input.getTokens( 3 );
Input
>> point.x
>> point.y
>> point.z;
return point;
}
void
TTraction::Load( cParser *parser, glm::dvec3 const &pOrigin ) {

View File

@@ -841,14 +841,20 @@ opengl_renderer::setup_pass( renderpass_config &Config, rendermode const Mode, f
auto const zfar = Config.draw_range * Global.fDistanceFactor * Zfar;
auto const znear = (
Znear > 0.f ?
Znear * zfar :
0.1f * Global.ZoomFactor );
Znear * zfar :
0.1f * Global.ZoomFactor );
camera.projection() *=
glm::perspective(
glm::radians( Global.FieldOfView / Global.ZoomFactor ),
std::max( 1.f, (float)Global.iWindowWidth ) / std::max( 1.f, (float)Global.iWindowHeight ),
znear,
zfar );
/*
m_sunandviewangle =
glm::dot(
m_sunlight.direction,
glm::vec3( 0.f, 0.f, -1.f ) * glm::mat3( viewmatrix ) );
*/
break;
}
case rendermode::shadows: {
@@ -2985,7 +2991,7 @@ opengl_renderer::Render_Alpha( TTraction *Traction ) {
::glColor4fv(
glm::value_ptr(
glm::vec4{
Traction->wire_color(),
Traction->wire_color() /* * ( DebugModeFlag ? 1.f : clamp( m_sunandviewangle, 0.25f, 1.f ) ) */,
linealpha } ) );
// render
m_geometry.draw( Traction->m_geometry );
@@ -3442,7 +3448,7 @@ opengl_renderer::Update_Pick_Control() {
return control;
}
editor::basic_node const *
scene::basic_node const *
opengl_renderer::Update_Pick_Node() {
#ifdef EU07_USE_PICKING_FRAMEBUFFER
@@ -3477,7 +3483,7 @@ opengl_renderer::Update_Pick_Node() {
unsigned char pickreadout[4];
::glReadPixels( pickbufferpos.x, pickbufferpos.y, 1, 1, GL_BGRA, GL_UNSIGNED_BYTE, pickreadout );
auto const nodeindex = pick_index( glm::ivec3{ pickreadout[ 2 ], pickreadout[ 1 ], pickreadout[ 0 ] } );
editor::basic_node const *node { nullptr };
scene::basic_node const *node { nullptr };
if( ( nodeindex > 0 )
&& ( nodeindex <= m_picksceneryitems.size() ) ) {
node = m_picksceneryitems[ nodeindex - 1 ];

View File

@@ -163,14 +163,14 @@ public:
// utility methods
TSubModel const *
Pick_Control() const { return m_pickcontrolitem; }
editor::basic_node const *
scene::basic_node const *
Pick_Node() const { return m_picksceneryitem; }
// maintenance methods
void
Update( double const Deltatime );
TSubModel const *
Update_Pick_Control();
editor::basic_node const *
scene::basic_node const *
Update_Pick_Node();
// debug methods
std::string const &
@@ -320,7 +320,9 @@ private:
texture_manager m_textures;
opengl_light m_sunlight;
opengllight_array m_lights;
/*
float m_sunandviewangle; // cached dot product of sunlight and camera vectors
*/
gfx::geometry_handle m_billboardgeometry { 0, 0 };
texture_handle m_glaretexture { -1 };
texture_handle m_suntexture { -1 };
@@ -386,8 +388,8 @@ private:
renderpass_config m_cabshadowpass; // parameters of most recent cab shadowmap pass
std::vector<TSubModel const *> m_pickcontrolsitems;
TSubModel const *m_pickcontrolitem { nullptr };
std::vector<editor::basic_node const *> m_picksceneryitems;
editor::basic_node const *m_picksceneryitem { nullptr };
std::vector<scene::basic_node const *> m_picksceneryitems;
scene::basic_node const *m_picksceneryitem { nullptr };
#ifdef EU07_USE_DEBUG_CAMERA
renderpass_config m_worldcamera; // debug item
#endif

View File

@@ -2,6 +2,7 @@
#include "skydome.h"
#include "color.h"
#include "utilities.h"
#include <unistd.h>
// sky gradient based on "A practical analytic model for daylight"
// by A. J. Preetham Peter Shirley Brian Smits (University of Utah)

View File

@@ -90,6 +90,7 @@
#endif
#define GLM_ENABLE_EXPERIMENTAL
#define GLM_FORCE_CTOR_INIT
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/matrix_access.hpp>

View File

@@ -973,7 +973,7 @@ ui_layer::render() {
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glPushAttrib( GL_ENABLE_BIT | GL_CURRENT_BIT | GL_COLOR_BUFFER_BIT ); // blendfunc included since 3rd party gui doesn't play nice
glPushAttrib( GL_ENABLE_BIT | GL_CURRENT_BIT);// | GL_COLOR_BUFFER_BIT ); // blendfunc included since 3rd party gui doesn't play nice
glDisable( GL_LIGHTING );
glDisable( GL_DEPTH_TEST );
glDisable( GL_ALPHA_TEST );

View File

@@ -25,6 +25,7 @@ Copyright (C) 2007-2014 Maciej Cierniak
#include "utilities.h"
#include "Globals.h"
#include "parser.h"
bool DebugModeFlag = false;
bool FreeFlyModeFlag = false;
@@ -387,3 +388,17 @@ substr_path( std::string const &Filename ) {
Filename.substr( 0, Filename.rfind( '/' ) + 1 ) :
"" );
}
// helper, restores content of a 3d vector from provided input stream
// TODO: review and clean up the helper routines, there's likely some redundant ones
glm::dvec3 LoadPoint( cParser &Input ) {
// pobranie współrzędnych punktu
glm::dvec3 point;
Input.getTokens( 3 );
Input
>> point.x
>> point.y
>> point.z;
return point;
}

View File

@@ -16,6 +16,7 @@ http://mozilla.org/MPL/2.0/.
#include <ctime>
#include <vector>
#include <sstream>
#include "dumb3d.h"
/*rozne takie duperele do operacji na stringach w paszczalu, pewnie w delfi sa lepsze*/
/*konwersja zmiennych na stringi, funkcje matematyczne, logiczne, lancuchowe, I/O etc*/
@@ -300,4 +301,5 @@ nearest_segment_point( VecType_ const &Segmentstart, VecType_ const &Segmentend,
return c1 / c2;
}
//---------------------------------------------------------------------------
class cParser;
glm::dvec3 LoadPoint( cParser &Input );

View File

@@ -1 +1 @@
#define VERSION_INFO "M7 15.06.2018, based on tmj e54468f8"
#define VERSION_INFO "M7 16.06.2018, based on tmj ef5811e6"