def _set_config(c):
 glformat = QGLFormat()
 glformat.setRedBufferSize(c['red_size'])
 glformat.setGreenBufferSize(c['green_size'])
 glformat.setBlueBufferSize(c['blue_size'])
 glformat.setAlphaBufferSize(c['alpha_size'])
 glformat.setAccum(False)
 glformat.setRgba(True)
 glformat.setDoubleBuffer((True if c['double_buffer'] else False))
 glformat.setDepth((True if c['depth_size'] else False))
 glformat.setDepthBufferSize((c['depth_size'] if c['depth_size'] else 0))
 glformat.setStencil((True if c['stencil_size'] else False))
 glformat.setStencilBufferSize((c['stencil_size'] if c['stencil_size'] else 0))
 glformat.setSampleBuffers((True if c['samples'] else False))
 glformat.setSamples((c['samples'] if c['samples'] else 0))
 glformat.setStereo(c['stereo'])
 return glformat

def _set_config ( c ) : glformat = QGLFormat ( ) glformat . setRedBufferSize ( c [ 'red_size' ] ) glformat . setGreenBufferSize ( c [ 'green_size' ] ) glformat . setBlueBufferSize ( c [ 'blue_size' ] ) glformat . setAlphaBufferSize ( c [ 'alpha_size' ] ) glformat . setAccum ( False ) glformat . setRgba ( True ) glformat . setDoubleBuffer ( ( True if c [ 'double_buffer' ] else False ) ) glformat . setDepth ( ( True if c [ 'depth_size' ] else False ) ) glformat . setDepthBufferSize ( ( c [ 'depth_size' ] if c [ 'depth_size' ] else 0 ) ) glformat . setStencil ( ( True if c [ 'stencil_size' ] else False ) ) glformat . setStencilBufferSize ( ( c [ 'stencil_size' ] if c [ 'stencil_size' ] else 0 ) ) glformat . setSampleBuffers ( ( True if c [ 'samples' ] else False ) ) glformat . setSamples ( ( c [ 'samples' ] if c [ 'samples' ] else 0 ) ) glformat . setStereo ( c [ 'stereo' ] ) return glformat
set the opengl configuration .