Merge pull request #1569 from shun-iwasawa/fix_plastic_tool_osx
Fix Vector Level Disappearing with Plastic Tool in OSX
This commit is contained in:
commit
7ce85485f6
1 changed files with 2 additions and 9 deletions
|
@ -270,8 +270,6 @@ TImageP ImageRasterizer::build(int imFlags, void *extData) {
|
|||
TVectorRenderData rd(TTranslation(-off.x, -off.y), TRect(TPoint(0, 0), d),
|
||||
vpalette, 0, true, true);
|
||||
|
||||
TGlContext oldContext = tglGetCurrentContext();
|
||||
|
||||
// this is too slow.
|
||||
{
|
||||
QSurfaceFormat format;
|
||||
|
@ -279,12 +277,10 @@ TImageP ImageRasterizer::build(int imFlags, void *extData) {
|
|||
|
||||
std::unique_ptr<QOffscreenSurface> surface(new QOffscreenSurface());
|
||||
surface->setFormat(format);
|
||||
// Enabling Qt::AA_ShareOpenGLContexts attribute in main()
|
||||
surface->setScreen(QOpenGLContext::globalShareContext()->screen());
|
||||
surface->create();
|
||||
|
||||
std::unique_ptr<QOpenGLContext> context(new QOpenGLContext());
|
||||
context->create();
|
||||
context->makeCurrent(surface.get());
|
||||
|
||||
TRaster32P ras(d);
|
||||
|
||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||
|
@ -336,9 +332,6 @@ TImageP ImageRasterizer::build(int imFlags, void *extData) {
|
|||
|
||||
glPopAttrib();
|
||||
|
||||
context->doneCurrent();
|
||||
tglMakeCurrent(oldContext);
|
||||
|
||||
TRasterImageP ri = TRasterImageP(ras);
|
||||
ri->setOffset(off + ras->getCenter());
|
||||
|
||||
|
|
Loading…
Reference in a new issue