2
$\begingroup$

All is in the title. I'm not able to make smoothing work, when drawing on a texture.

Here is the code before the drawing:

bgl.glDisable( bgl.GL_SCISSOR_TEST )
bgl.glViewport( 0, 0, imageWidth, imageHeight )

bgl.glMatrixMode( bgl.GL_PROJECTION )
bgl.glLoadIdentity()
bgl.gluOrtho2D( 0, imageWidth, 0, imageHeight )
bgl.glEnable( bgl.GL_TEXTURE_2D )

Then:

    bgl.glClearColor( *defaultColor, 0 )
    bgl.glClear( bgl.GL_COLOR_BUFFER_BIT | bgl.GL_DEPTH_BUFFER_BIT )

And:

                bgl.glEnable( bgl.GL_POLYGON_SMOOTH )
                bgl.glHint( bgl.GL_POLYGON_SMOOTH_HINT, bgl.GL_NICEST )
                bgl.glBegin( bgl.GL_POLYGON )
                ...

But the result is:

enter image description here

$\endgroup$
  • $\begingroup$ Hi, did you find a solution? $\endgroup$ – Влад Киндюшов Nov 16 '17 at 19:49
  • $\begingroup$ @ВладКиндюшов... no I didn't. $\endgroup$ – lemon Nov 17 '17 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.