However, the same code don’t do the same thing when rendered using a QVTKOpenGLNativeWidget. In this case, the points are always rendered as spheres (when doing SetRenderPointsAsSpheres(false)) and not rendered at all when SetRenderPointsAsSpheres(true)
Is there a way to enable the ‘console app behavior’ when using a QVTKOpenGLNativeWidget ?
When you execute the Qt application and request the actor to render points as spheres, do you observe any errors or shader warnings in the console? It’s worth noting that opengl errors are turned off by default in VTK release builds. If you encounter this issue, you might need to include these CMake arguments during the configuration of VTK.
If you build your Qt application with qmake, then enable the console with a CONFIG += console in your .pro file. If you build with CMake, make sure the executable target (add_executable(...)) doesn’t have a WIN32 modifier in it and/or you don’t have a set_property(TARGET <your exe target> PROPERTY WIN32_EXECUTABLE true). By default, CMake builds “console applications” in Windows.
None that I know of. The real difference between a “console app” and a “Win32 app” is that the former starts at the void main() and the latter, at the WinMain() function. If you app starts at the WinMain(), a console does not appear when the program loads. So, a “console app” can have graphics in it.
Please, try to link against Qt’s winmain static library when configuring the “Win32 app” mode. This enrures you’re using Qt’s WinMain(). Maybe your program is finding some one else or the compiler is making one for you.