DLR-RM / AugmentedAutoencoder

Official Code: Implicit 3D Orientation Learning for 6D Object Detection from RGB Images
MIT License
339 stars 97 forks source link

python OpenGL issue. #1

Closed wangg12 closed 5 years ago

wangg12 commented 5 years ago

I followed README to install the packages but got the following error:

'glCreateTextures' is not defined.

@MartinSmeyer Do you have any ideas?

MartinSmeyer commented 5 years ago

Are you running the code on a remote machine? Because currently headless rendering is not supported.

wangg12 commented 5 years ago

@MartinSmeyer No, I am running it on local machine. I've checked the installed PyOpenGL, it seems some functions not exist such as glCreateTextures. I installed it via pip as the README said.

wangg12 commented 5 years ago

I managed to use these functions by installing PyOpenGL from https://github.com/mcfletch/PyOpenGL.

SonOfCoding commented 5 years ago

@wangg12 Hi, have you solved this problem? do you have wechat or qq for discussion?

wangg12 commented 5 years ago

@SonOfCoding I can use the functions now as mentioned above. I don't know if there are other problems.

sinnis1991 commented 5 years ago

@wangg12 I am sorry that the solution you provided did not work. After I re-installed pyopengl as you suggested, I tried to call

>>> glCreateTextures <OpenGL.platform.baseplatform.glCreateTextures object at 0x7f16de11a050>

It seems that the updated version of pyopengl does add this function (or class) but it's creepy that if i try to give it values for initializing:

>>> glCreateTextures(None,None,None) Traceback (most recent call last): File "", line 1, in File "/media/sinnis/ADDDISK/pyopengl/OpenGL/latebind.py", line 41, in call return self._finalCall( *args, *named ) File "/media/sinnis/ADDDISK/pyopengl/OpenGL/wrapper.py", line 689, in wrapperCall result = wrappedOperation( cArguments ) File "/media/sinnis/ADDDISK/pyopengl/OpenGL/platform/baseplatform.py", line 414, in call self.name, self.name, OpenGL.error.NullFunctionError: Attempt to call an undefined function glCreateTextures, check for bool(glCreateTextures) before calling

It seems that the it is checking and considering this call an undefined function. That's how it raises problem in the script texture.py and I find that any glCreate* calls has this problem.

Still no solution to fix this problem. Help!

wangg12 commented 5 years ago

@sinnis1991 It did work for me on several machines with different environments. For example,

In [1]: import OpenGL
In [2]: OpenGL
Out[1]: <module 'OpenGL' from '/data/software/pyopengl/OpenGL/__init__.py'>
In [3]: from OpenGL.GL import *
In [4]: glCreateTextures
Out[2]: <OpenGL.platform.baseplatform.glCreateTextures at 0x7f94b7aab1f8>
In [5]: tex_type=GL_TEXTURE_2D
In [6]: import numpy as np
In [7]: __id = np.empty(1, dtype=np.uint32)
In [8]: glCreateTextures(tex_type, len(__id), __id)
In [9]:
HuaWeitong commented 4 years ago

@wangg12 I am sorry that the solution you provided did not work. After I re-installed pyopengl as you suggested, I tried to call

glCreateTextures <OpenGL.platform.baseplatform.glCreateTextures object at 0x7f16de11a050>

It seems that the updated version of pyopengl does add this function (or class) but it's creepy that if i try to give it values for initializing:

glCreateTextures(None,None,None) Traceback (most recent call last): File "", line 1, in File "/media/sinnis/ADDDISK/pyopengl/OpenGL/latebind.py", line 41, in call return self._finalCall( *args, *named ) File "/media/sinnis/ADDDISK/pyopengl/OpenGL/wrapper.py", line 689, in wrapperCall result = wrappedOperation( cArguments ) File "/media/sinnis/ADDDISK/pyopengl/OpenGL/platform/baseplatform.py", line 414, in call self.name, self.name, OpenGL.error.NullFunctionError: Attempt to call an undefined function glCreateTextures, check for bool(glCreateTextures) before calling

It seems that the it is checking and considering this call an undefined function. That's how it raises problem in the script texture.py and I find that any glCreate* calls has this problem.

Still no solution to fix this problem. Help!

Hi, I met the same problem, have you solved it?

cqq0505 commented 4 years ago

@wangg12 I am sorry that the solution you provided did not work. After I re-installed pyopengl as you suggested, I tried to call

glCreateTextures <OpenGL.platform.baseplatform.glCreateTextures object at 0x7f16de11a050>

It seems that the updated version of pyopengl does add this function (or class) but it's creepy that if i try to give it values for initializing:

glCreateTextures(None,None,None) Traceback (most recent call last): File "", line 1, in File "/media/sinnis/ADDDISK/pyopengl/OpenGL/latebind.py", line 41, in call return self._finalCall( *args, *named ) File "/media/sinnis/ADDDISK/pyopengl/OpenGL/wrapper.py", line 689, in wrapperCall result = wrappedOperation( cArguments ) File "/media/sinnis/ADDDISK/pyopengl/OpenGL/platform/baseplatform.py", line 414, in call self.name, self.name, OpenGL.error.NullFunctionError: Attempt to call an undefined function glCreateTextures, check for bool(glCreateTextures) before calling

It seems that the it is checking and considering this call an undefined function. That's how it raises problem in the script texture.py and I find that any glCreate* calls has this problem. Still no solution to fix this problem. Help!

@wangg12 I am sorry that the solution you provided did not work. After I re-installed pyopengl as you suggested, I tried to call

glCreateTextures <OpenGL.platform.baseplatform.glCreateTextures object at 0x7f16de11a050>

It seems that the updated version of pyopengl does add this function (or class) but it's creepy that if i try to give it values for initializing:

glCreateTextures(None,None,None) Traceback (most recent call last): File "", line 1, in File "/media/sinnis/ADDDISK/pyopengl/OpenGL/latebind.py", line 41, in call return self._finalCall( *args, *named ) File "/media/sinnis/ADDDISK/pyopengl/OpenGL/wrapper.py", line 689, in wrapperCall result = wrappedOperation( cArguments ) File "/media/sinnis/ADDDISK/pyopengl/OpenGL/platform/baseplatform.py", line 414, in call self.name, self.name, OpenGL.error.NullFunctionError: Attempt to call an undefined function glCreateTextures, check for bool(glCreateTextures) before calling

It seems that the it is checking and considering this call an undefined function. That's how it raises problem in the script texture.py and I find that any glCreate* calls has this problem. Still no solution to fix this problem. Help!

Hi! I met the exactly same problem with you, did you solve it ? I've tried re-installed pyopengl from https://github.com/mcfletch/PyOpenGL, but it still doesn't work.

cqq0505 commented 4 years ago

@wangg12 I am sorry that the solution you provided did not work. After I re-installed pyopengl as you suggested, I tried to call

glCreateTextures <OpenGL.platform.baseplatform.glCreateTextures object at 0x7f16de11a050>

It seems that the updated version of pyopengl does add this function (or class) but it's creepy that if i try to give it values for initializing:

glCreateTextures(None,None,None) Traceback (most recent call last): File "", line 1, in File "/media/sinnis/ADDDISK/pyopengl/OpenGL/latebind.py", line 41, in call return self._finalCall( *args, *named ) File "/media/sinnis/ADDDISK/pyopengl/OpenGL/wrapper.py", line 689, in wrapperCall result = wrappedOperation( cArguments ) File "/media/sinnis/ADDDISK/pyopengl/OpenGL/platform/baseplatform.py", line 414, in call self.name, self.name, OpenGL.error.NullFunctionError: Attempt to call an undefined function glCreateTextures, check for bool(glCreateTextures) before calling

It seems that the it is checking and considering this call an undefined function. That's how it raises problem in the script texture.py and I find that any glCreate* calls has this problem. Still no solution to fix this problem. Help!

Hi, I met the same problem, have you solved it?

Hey,did you solve the problem? I met the exactly same question.

lingxiaoZHONG commented 4 years ago

Problem may not from installing pyopengl, this work need at least OpenGL 4.5 version, but some GPU not support high version OpenGL. This work success in my NVIDIA 1080 GPU, but failed in my Intel GPU

davideCremona commented 4 years ago

I'm having the same problem, I have OpenGL 3.1.0 and Python3.6 (of course I have converted the code from Python2.7 to 3.6)