3D-Viewer: Bind to a texture so glTextEnv will work.
Fixes https://gitlab.com/kicad/code/kicad/issues/11641
This commit is contained in:
parent
5d94d2634e
commit
089d8b9cc1
|
@ -439,7 +439,6 @@ void MODEL_3D::Draw( bool aTransparent, float aOpacity, bool aUseSelectedMateria
|
|||
|
||||
glTexEnvfv( GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, (const float*)¶m.x );
|
||||
|
||||
// BeginDrawMulti();
|
||||
for( const MODEL_3D::MATERIAL& mat : m_materials )
|
||||
{
|
||||
if( ( mat.IsTransparent() != aTransparent )
|
||||
|
|
|
@ -905,6 +905,7 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
|
|||
// Enables Texture Env so it can combine model transparency with each footprint opacity
|
||||
glEnable( GL_TEXTURE_2D );
|
||||
glActiveTexture( GL_TEXTURE0 );
|
||||
glBindTexture( GL_TEXTURE_2D, m_circleTexture ); // Uses an existent texture so the glTexEnv operations will work
|
||||
|
||||
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE );
|
||||
glTexEnvf( GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_INTERPOLATE );
|
||||
|
|
Loading…
Reference in New Issue