[vtkusers] "Invalid pixel format, no opengl support" error

patpat63 at laposte.net patpat63 at laposte.net
Wed Mar 11 04:14:07 EDT 2015


Hi all, 

I am having troubles with the following example using QVTKWidget. 

Windows 7 sp1 64 bits 
I am using : 
Qt 5.4 (msvc2013_64_opengl) 
VS2013 
vtk 6.1 (64 bits compiled with vs2013) 

When compiling and executing 64 bits version, I get this error message "Invalid pixel format, no opengl support" and app is exiting. 
In order to get the error message, just uncomment the line in the example code. 

When I use 32 bits version (qt 4.8.6 ! vtk 6.1.0), i don't have any problems. 

I don't know if the problem is about 64 bits or qt5. 

If someone can provide explanations... :) 


#include <QApplication> 
#include <QMainWindow> 

#include <QVTKWidget.h> 

#include <vtkRenderWindow.h> 
#include <vtkRenderer.h> 

int main(int argc, char **argv) 
{ 
QApplication app(argc, argv); 

QMainWindow *mainWindow = new QMainWindow; 
mainWindow->setWindowTitle("Mainwindow"); 
mainWindow->setFixedSize(640, 360); 

QVTKWidget *widget = new QVTKWidget; 
//widget->GetRenderWindow()->Render(); 
mainWindow->setCentralWidget(widget); 
widget->GetRenderWindow()->Render(); 
mainWindow->show(); 
return app.exec(); 
} 

I simplified the example and deleted the printing of "Hello world" because it changes nothing. 

Thanks for any help. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150311/44b05871/attachment.html>


More information about the vtkusers mailing list