diff --git a/EgtGraphics.rc b/EgtGraphics.rc index 905cc4f..05d5b49 100644 Binary files a/EgtGraphics.rc and b/EgtGraphics.rc differ diff --git a/EgtGraphics.vcxproj b/EgtGraphics.vcxproj index fbb119c..8129c45 100644 --- a/EgtGraphics.vcxproj +++ b/EgtGraphics.vcxproj @@ -150,7 +150,7 @@ copy $(TargetPath) \EgtProg\DllD64 Level3 Use - Full + MaxSpeed true true WIN32;I_AM_EGR;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) @@ -162,7 +162,7 @@ copy $(TargetPath) \EgtProg\DllD64 StreamingSIMDExtensions2 - false + true Windows @@ -182,7 +182,7 @@ copy $(TargetPath) \EgtProg\Dll32 Level3 Use - Full + MaxSpeed true true WIN32;I_AM_EGR;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) @@ -193,7 +193,7 @@ copy $(TargetPath) \EgtProg\Dll32 true - false + true NotSet diff --git a/OpenGL.h b/OpenGL.h index 58361ea..2e40e7b 100644 --- a/OpenGL.h +++ b/OpenGL.h @@ -14,5 +14,6 @@ #pragma once #define GLEW_MX +#define NOMINMAX #include "/EgtDev/Extern/GLEW/Include/glew.h" #include "/EgtDev/Extern/GLEW/Include/wglew.h" diff --git a/SceneBasic.cpp b/SceneBasic.cpp index fd1334f..05b0047 100644 --- a/SceneBasic.cpp +++ b/SceneBasic.cpp @@ -666,10 +666,6 @@ Scene::Draw( void) glDepthFunc( GL_LEQUAL) ; glEnable( GL_DEPTH_TEST) ; - // disegno griglia senza illuminazione - glDisable( GL_LIGHTING) ; - DrawGrid() ; - // aggiorno il colore di default if ( m_pGeomDB != nullptr) m_pGeomDB->GetDefaultMaterial( m_colDef) ; @@ -682,6 +678,8 @@ Scene::Draw( void) case SM_WIREFRAME : // disabilito illuminazione glDisable( GL_LIGHTING) ; + // disegno griglia senza illuminazione (già impostato) + DrawGrid() ; // imposto disegno wireframe anche per poligoni glPolygonMode( GL_FRONT_AND_BACK, GL_LINE) ; // disegno le geometrie del DB in una sola passata @@ -699,11 +697,16 @@ Scene::Draw( void) DrawGroup( GDB_ID_ROOT, 1, MdStMk( GDB_MD_STD, GDB_ST_ON, GDB_MK_OFF)) ; glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE) ; glDisable( GL_POLYGON_OFFSET_FILL) ; + // disegno griglia senza illuminazione (già impostato) + DrawGrid() ; // seconda passata per tutto in forma 0dim e curve glPolygonMode( GL_FRONT_AND_BACK, GL_LINE) ; DrawGroup( GDB_ID_ROOT, 2, MdStMk( GDB_MD_STD, GDB_ST_ON, GDB_MK_OFF)) ; break ; case SM_SHADING : + // disegno griglia senza illuminazione + glDisable( GL_LIGHTING) ; + DrawGrid() ; // imposto disegno shading per poligoni con davanti e dietro diversificati glPolygonMode( GL_FRONT_AND_BACK, GL_FILL) ; glLightModeli( GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE) ; diff --git a/SceneGrid.cpp b/SceneGrid.cpp index 853f061..946a3f2 100644 --- a/SceneGrid.cpp +++ b/SceneGrid.cpp @@ -15,8 +15,8 @@ #include "stdafx.h" #include "Scene.h" #include "EGrUtils.h" - - +#include + using namespace std ; //---------------------------------------------------------------------------- @@ -33,7 +33,7 @@ bool Scene::SetGridGeo( double dSnapStep, int nMinLineSstep, int nMajLineSstep, int nExtSstep) { const double MIN_SNAP_STEP = 0.1 ; - m_dSnapStep = max( fabs( dSnapStep), MIN_SNAP_STEP) ; + m_dSnapStep = std::max( fabs( dSnapStep), MIN_SNAP_STEP) ; m_nMinLineSstep = abs( nMinLineSstep) ; m_nMajLineSstep = abs( nMajLineSstep) ; m_nExtSstep = abs( nExtSstep) ;