-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile under Mac #1
Comments
Hi @ZaferL, Thanks for the OBJ files fix, I have already committed the change. I'll have a look at the changes needed in macOS to run the example. |
Just got it working on Mac, I upgraded Qt from 5.9.3 to 5.11.1. I also added the following line: QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); to CanvasHandler.cpp before QApplication app(argc, argv); is called. |
@ZaferL, While this does fix the problem in the instance, do you have any idea why this would be necessary in this instance? This doesn't work for my solution, as I'm staying away from widgets entirely, so is there a better way of doing it? Does QVTKOpenGL have somewhere else we could get the format? |
If you look at the source code for where
Source: https://gitlab.kitware.com/vtk/vtk/blob/master/GUISupport/Qt/QVTKOpenGLWindow.cxx |
In Mac, I receive this error : |
brew install glew
kshahim <[email protected]> schrieb am Sa., 25. Mai 2019, 14:34:
… In Mac, I receive this error :
"ERROR: In .../VTK-8.1.1/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line
785
vtkGenericOpenGLRenderWindow (0x109966c00): GLEW could not be initialized.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AABPRTDLOSYQUOW3UEJJ7QDPXEW6JA5CNFSM4FKINFYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWHRA2A#issuecomment-495915112>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABPRTGGCRNX2HH3X42INALPXEW6JANCNFSM4FKINFYA>
.
|
Thanks Harmen, here is the message from brew :
Warning: glew 2.1.0 is already installed and up-to-date
To reinstall 2.1.0, run `brew reinstall glew`
but still i receive the same error
… On 25 May 2019, at 14:37, Harmen Stoppels ***@***.***> wrote:
brew install glew
kshahim ***@***.***> schrieb am Sa., 25. Mai 2019, 14:34:
> In Mac, I receive this error :
> "ERROR: In .../VTK-8.1.1/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line
> 785
> vtkGenericOpenGLRenderWindow (0x109966c00): GLEW could not be initialized.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#1?email_source=notifications&email_token=AABPRTDLOSYQUOW3UEJJ7QDPXEW6JA5CNFSM4FKINFYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWHRA2A#issuecomment-495915112>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AABPRTGGCRNX2HH3X42INALPXEW6JANCNFSM4FKINFYA>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#1?email_source=notifications&email_token=AGBIZISTPUZZNXZZRA7HAU3PXEXJFA5CNFSM4FKINFYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWHRCKA#issuecomment-495915304>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AGBIZITW7NDQVGG6QVEFWALPXEXJFANCNFSM4FKINFYA>.
|
the problem was related to VTK compilation, I enabled VTK_USE_SYSTEM_GLEW and now I received this error : VTK is designed to work with OpenGL version 3.2 but it appears it has been given a context that does not support 3.2. VTK will run in a compatibility mode designed to work with earlier versions of OpenGL but some features may not work. then, I added it workes but the rendering quality compare to windows version is poor |
Ie the rendering quality in Mac, somehow related to this? |
I think I find the reason why in Mac, the rendering quality is less than in windows, QOpenGLFramebufferObject *QVTKFramebufferObjectRenderer::createFramebufferObject(const QSize &size) |
Hi,
I just compiled the code in Mac but when I ran it I got:
vtkExternalOpenGLRenderWindow (0x7f862e1e7200): VTK is designed to work with OpenGL version 3.2 but it appears it has been given a context that does not support 3.2. VTK will run in a compatibility mode designed to work with earlier versions of OpenGL but some features may not work.
Searching the web I found a possible solution which was to insert:
QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());
before main app is generated. This time the error message I got was:
QVTKFramebufferObjectItem::setVtkFboRenderer
QVTKFramebufferObjectRenderer::initScene()
QVTKFramebufferObjectRenderer::generatePlatform()
QVTKFramebufferObjectRenderer::updatePlatform()
Segmentation fault: 11
Any ideas?
Also, I was getting error when reading in an obj file (under Linux). Changing:
if (modelFilePathExtension == ".obj")
to
if (modelFilePathExtension == "obj")
fixed the problem....
Z
The text was updated successfully, but these errors were encountered: