vtk crashes with opengl needs update using windows 10 and vulkan - python

I am using python wrapping to use VTK. I recently upgraded to Windows 10 64 bit, installed my laptop drivers from the relevant manufacturers.I built VTK 7.0 using MSVSC 2010 64 bit with python wrappings. I have switchable graphics card between NVDIA GeForce GT 555M and  Intel HD 3000 Graphics. If I use NVDIA I don't get any vtk object at the renderwin but only the background. If I use Intel Graphics and  run any VTK examples I get the following error:
ERROR: In ......\src\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 545vtkWin32OpenGLRenderWindow (00000000059F3D40): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2
If I understand right, this happens because Intel HD Graphics installed comes with vulkan, the new generation of OpenGL. But I don't know how can I solve this to work with VTK.Could anyone point out a solution?  Thanks.

Related

habitat-api quick start not running properly - qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""

I am currently trying to run the example from habitat-api but when I run the example it doesn't run properly.
I fixed one issue that was not updated in the code ("pointgoal" should be "pointgoal_with_gps_compass")
This is what the terminal gives me after running python testActions.py:
2020-03-13 17:29:37,024 Initializing dataset PointNav-v1
2020-03-13 17:29:37,217 initializing sim Sim-v0
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0313 17:29:37.234107 303062464 SceneGraph.h:92] Created DrawableGroup:
Renderer: Intel(R) Iris(TM) Plus Graphics 640 by Intel Inc.
OpenGL version: 4.1 INTEL-14.4.23
Using optional features:
GL_ARB_ES2_compatibility
GL_ARB_separate_shader_objects
GL_ARB_texture_filter_anisotropic
GL_ARB_texture_storage
GL_ARB_vertex_array_object
GL_EXT_debug_label
GL_EXT_debug_marker
Using driver workarounds:
no-layout-qualifiers-on-old-glsl
I0313 17:29:37.395491 303062464 ResourceManager.cpp:1072] Importing Basis files as BC3
W0313 17:29:38.644949 303062464 Simulator.cpp:140] :
---
The active scene does not contain semantic annotations.
---
I0313 17:29:38.651930 10376 simulator.py:142] Loaded navmesh data/scene_datasets/habitat-test-scenes/skokloster-castle.navmesh
2020-03-13 17:29:38,737 Initializing task Nav-v0
Environment creation successful
Destination, distance: 5.883259, theta(radians): -0.00
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
zsh: abort python testActions.py
I think there is some issue in the code. I have tried to ask on the GitHub repository (issue #330) but still waiting to see if the error is there. I have been told that the error is with my installation of OpenCV.
I fixed the issue by using an older version of opencv-python
pip unistall opencv-python
pip install opencv-python==4.1.0.25

OpenGL version issue with Panda3d

I am trying to get Panda3d set up and running correctly. I keep getting this error when I try to render a model with the 'pview' method,
:display:gsg:glgsg(warning): Driver possibly misreported GL_VERSION!
Unable to detect correct OpenGL version.
I'm using windows 10 OS, OpenGL 4.5, NIVIDIA Quadro P3200 and Intel graphics card. I've already changed the global settings in the NIVIDIA control panel to use the NIVIDIA GPU by default. Any ideas on how to fix this error and start redering 3d models with panda3d?

DEVICE_NOT_FOUND while calling pyopencl.Context

I am struggling with the following Python code:
import pyopencl as cl
ctx = cl.Context(dev_type=cl.device_type.GPU)
It gives the following exception:
RuntimeError: clcreatecontextfromtype failed: DEVICE_NOT_FOUND
My OS is Linux Mint Debian Edition 2, running on a laptop with i7-5600U. It also has a graphic card, but I do not use it. I am using Python 3.4.2.
I have installed the Debian package amd-opencl-icd (I first tried beignet, but then the command clinfo failed).
I have installed pyopencl using pip and opencl using this tutorial. Note that I did not do the fourth step (creating the symbolic link to intel64.icd), since I did not have this file. The test at the end of the tutorial succeed.
Do you have any hint about what is happening? I am surprised that the C++ test of opencl (in the tutorial) and the installation of pyopencl both succeed, but this simple command of pyopencl fails.
EDIT
After installing the Intel driver, I now have a different issue.
The command clinfo gives the following:
terminate called after throwing an instance of 'unsigned long'
And the above Python code gives:
LogicError: clcreatecontextfromtype failed: INVALID_PLATFORM
You've installed the intel opencl SDK, which gives you the compiler and maybe the CPU runtime. You're trying to create a context consisting of GPU devices, which means that you need the runtime for intel HD graphics. Grab the 64-bit driver from the link below.
https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver
The CPU runtime is also available from that link. You need to follow the same procedure as before for the opencl HD graphics driver (converting .rpm to .deb). The CPU driver has a script you can execute.
The INVALID_PLATFORM error you got after installing the runtime appears to be because it expects the platform to be passed as a property, when creating from device type. It expects the properties as a list of key-tuple pairs. This is shown in the snippet below for the first available platform. The keyword is one of the values in context_properties, and the value is the platform object itself.
import pyopencl as cl
platforms = cl.get_platforms()
ctx = cl.Context(dev_type=cl.device_type.GPU, properties=[(cl.context_properties.PLATFORM, platforms[0])])
print(ctx.devices)
On my platform this prints
[<pyopencl.Device 'Intel(R) HD Graphics 4600' on 'Intel(R) OpenCL' at 0x1c04b217140>]
as my first platform is intel.

Kivy OpenGL requirements feasible for deployment?

I'm currently in the process of finding a nice GUI framework for my new project - and Kivy looks quite good.
There are many questions here (like this one) about Kivy requiring OpenGL >2.0 (not accepting 1.4) and problems arising from that. As I understood, it's the graphics drivers thing to provide a decent OpenGL version.
I'm concerned what problems I'll have deploying my app to users having a certain configuration, that they will not be willing or able to have OpenGL >2.0 on their desktop.
First off, deploying on Windows in regard to OpenGL would not be a problem.. Good support there.
But I'm specifially concerned about people (like me) having an Ubuntu installation (14.4 LTS) with the latest Nvidia binary driver from Ubuntu. It's just the best driver currently, having the best performance (still far superior to nouveau IMHO)..
And it seems (or am I wrong? that would be great) that this driver only provides OpenGL 1.4
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions: [...]
So my question is two-fold
I'm I maybe wrong the nvidia binary driver only supporting OpenGL 1.4?
If yes, doesn't that exclude many users having a quite common configuration (all Ubuntu users using Nvidia cards) from people able to use my Kivy application?
Any way to circumvent that?
I know OpenGL 1.4 is silly old stuff, but the driver is current and the hardware too (GTX 770, quite a beast..)..
Installed driver:
root#host:/home/user# apt-cache policy nvidia-331-updates
nvidia-331-updates:
Installed: 331.38-0ubuntu7
Candidate: 331.38-0ubuntu7
Version table:
Nvidia information:
Version: 331.38
Release Date: 2014.1.13
I really hope I'm wrong..
EDIT There has been said 1.4 is the GLX version, not the OpenGL version.. I've seen that now - but I thought it's 1.4 because when I try to execute an example from the dist, I get this error:
vagrant#ubuntu-14:/usr/local/share/kivy-examples/guide/firstwidget$ python 1_skeleton.py
[WARNING] [Config ] Older configuration version detected (0 instead of 10)
[WARNING] [Config ] Upgrading configuration in progress.
[INFO ] [Logger ] Record log in /home/vagrant/.kivy/logs/kivy_14-06-28_0.txt
[INFO ] Kivy v1.8.1-dev
[INFO ] [Python ] v2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2]
[INFO ] [Factory ] 169 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_pygame, img_gif (img_pil ignored)
[INFO ] [Window ] Provider: pygame(['window_egl_rpi'] ignored)
libGL error: failed to load driver: swrast
[INFO ] [GL ] OpenGL version <1.4 (2.1.2 NVIDIA 331.38)>
[INFO ] [GL ] OpenGL vendor <NVIDIA Corporation>
[INFO ] [GL ] OpenGL renderer <GeForce GTX 770/PCIe/SSE2>
[INFO ] [GL ] OpenGL parsed version: 1, 4
[CRITICAL] [GL ] Minimum required OpenGL version (2.0) NOT found!
OpenGL version detected: 1.4
Version: 1.4 (2.1.2 NVIDIA 331.38)
Vendor: NVIDIA Corporation
Renderer: GeForce GTX 770/PCIe/SSE2
Try upgrading your graphics drivers and/or your graphics hardware in case of problems.
So it actually parses my OpenGL version as 1.4..
EDIT 2: I'm running Kivy from github (master branch) as of today (28th june), so that should be fairly new ;-)
That's not the OpenGL version! It's the GLX version.
AFAIK GLX 1.4 is the latest release. You can use the glxinfo command to check all version numbers. On my machine I get:
$glxinfo | grep 'GLX version'
GLX version: 1.4
$glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile
OpenGL version string: 2.1 Mesa 10.1.3
OpenGL shading language version string: 1.20
OpenGL extensions:
See also How can I check my OpenGL version? for further details.
Summary: you don't have to worry about OpenGL 2.0 compatibility. Almost every device has support for OpenGL 2.0 nowadays. For example, only 0.1% of Android devices supports only OpenGL version 1.1.
I've answered a very similar question before, here. The answer is pasted below for reference:
Kivy, for which OpenGL 2.0 seems to be mandatory.
Strictly, Kivy targets OpenGL ES 2.0 as the minimum requirement. This
is not the same as OpenGL 2.0.
Well, the question is simple. At home I have three computers of which two are quite old with integrated graphics cards, which do not
support OpenGL 2.0.
This is fairly unusual nowadays. Even mobile devices have almost all
supported it for years (where to be clear, 'it' is the opengl es 2 features that kivy relies on).
The only places you tend to see lack of support are older machines
with integrated graphics, like yours, though I have no statistics on
how common these are. Any machine with a 'proper' graphics card, or
integrated graphics from the last few years (e.g. intel's integrated
with sandy bridge etc.), will almost certainly work fine.
I've seen occasional problem in newer machines, e.g. some netbooks
with particularly poorly supported graphics chips, but these are very
much the exception rather than the norm.
Edit: For reference, Google seems to claim that 99.9% of
devices
support OpenGL ES 2 (at the time of writing).
Overall, it's extremely unlikely that you (or indeed, anyone who uses your application) would have any problems related to this.

How to fix Typelib generated by MIDL?

I am trying to generate typelib of INetCfg interface using IDL in this page, seen below:
import "netcfgx.idl";
[
uuid(d99085ff-c5d7-4a4c-a987-91a513e268a9),
version(1.0),
helpstring("NetCfgX 1.0 Type Library")
]
library NetCFGLib
{
interface IEnumNetCfgBindingInterface;
interface IEnumNetCfgBindingPath;
interface IEnumNetCfgComponent;
interface INetCfg;
interface INetCfgProperties;
interface INetCfgLock;
interface INetCfgBindingInterface;
interface INetCfgBindingPath;
interface INetCfgComponentBindings;
interface INetCfgBindingPath;
interface INetCfgClass;
interface INetCfgComponent;
interface INetCfgIdentification;
interface INetCfgClassSetup;
};
Unfortunately, the generated IDL still can't be loaded from comtype, with code given below:
import comtypes.client as cc
cc.GetModule("C:\path\to\netcfg.tlb")
It gives this error WindowsError: [Error -2147312566] Error loading type library/DLL
How do I fix this error?
I am using Windows 7 64 bit, and Python 27 64
As I use Windows 7 64bit, just solved this issue, by first running WDK setenv.bat <path_to_wdk> x64. After that, generate the typelib either using midl netcfg.idl /env x64 (for 64bit TLB) or midl netcfg.idl (for 32bit TLB).
I opted to use generate the 64bit TLB
Hope it helps somebody who just get in touch with this COM beast!

Categories