Skip to content
Snippets Groups Projects
Commit 6ff52cc1 authored by Mathias Paulin's avatar Mathias Paulin :speech_balloon:
Browse files

improve polygon_offset for wireframeRendering

parent 064279fb
No related branches found
No related tags found
No related merge requests found
......@@ -175,14 +175,14 @@ void WireframePass::execute( const Ra::Engine::Data::ViewingParameters& viewPara
glBlendFuncSeparate( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ZERO );
glPolygonOffset( -4.f, -2.f );
glEnable( GL_POLYGON_OFFSET_FILL );
//glDisable( GL_POLYGON_OFFSET_FILL );
#else
GL_ASSERT( glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) );
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
glEnable( GL_LINE_SMOOTH );
glLineWidth( 1.f );
glPolygonOffset( -1.1f, -0.1f );
glEnable( GL_POLYGON_OFFSET_LINE );
glPolygonOffset( 1.1f, 3.0f );
#endif
for ( const auto& ro : *m_objectsToRender )
......
......@@ -3,8 +3,8 @@
#include <Core/Utils/Color.hpp>
#define ADVANCED_WIREFRAME
#define ADVANCED_WIREFRAME_SHADER
//#define ADVANCED_WIREFRAME
//#define ADVANCED_WIREFRAME_SHADER
#ifdef ADVANCED_WIREFRAME
#include <Engine/Data/DisplayableObject.hpp>
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment