pyopengl
pyopengl copied to clipboard
visualization error
I want to visualize the 3D mesh into video. I am getting this by running visualization command line
File "C:\Users\hamid.farhidzadeh\Anaconda3\envs\pytorch\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\hamid.farhidzadeh\Anaconda3\envs\pytorch\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\hamid.farhidzadeh\Documents\pifuhd\apps\render_turntable.py", line 69, in
renderer = ColorRender(width=args.width, height=args.height) File "C:\Users\hamid.farhidzadeh\Documents\pifuhd\lib\render\gl\color_render.py", line 34, in init CamRender.init(self, width, height, name, program_files=program_files) File "C:\Users\hamid.farhidzadeh\Documents\pifuhd\lib\render\gl\cam_render.py", line 32, in init Render.init(self, width, height, name, program_files, color_size, ms_rate) File "C:\Users\hamid.farhidzadeh\Documents\pifuhd\lib\render\gl\render.py", line 45, in init _glut_window = glutCreateWindow("My Render .") File "C:\Users\hamid.farhidzadeh\Anaconda3\envs\pytorch\lib\site-packages\OpenGL\GLUT\special.py", line 73, in glutCreateWindow return __glutCreateWindowWithExit(title, _exitfunc) ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
By searching I found out I need to modify : https://github.com/facebookresearch/pifuhd/blob/master/lib/render/gl/render.py#L45 by adding b to name _glut_window = glutCreateWindow(b"My Render .")
After fixing this I got the new error and couldn't find any solution for it. Any input is appropriated.
freeglut (foo): fgInitGL2: fghGenBuffers is NULL Traceback (most recent call last): File "C:\Users\hamid.farhidzadeh\Anaconda3\envs\pytorch\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\hamid.farhidzadeh\Anaconda3\envs\pytorch\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\hamid.farhidzadeh\Documents\pifuhd\apps\render_turntable.py", line 69, in
renderer = ColorRender(width=args.width, height=args.height) File "C:\Users\hamid.farhidzadeh\Documents\pifuhd\lib\render\gl\color_render.py", line 34, in init CamRender.init(self, width, height, name, program_files=program_files) File "C:\Users\hamid.farhidzadeh\Documents\pifuhd\lib\render\gl\cam_render.py", line 32, in init Render.init(self, width, height, name, program_files, color_size, ms_rate) File "C:\Users\hamid.farhidzadeh\Documents\pifuhd\lib\render\gl\render.py", line 50, in init glClampColor(GL_CLAMP_READ_COLOR, GL_FALSE) File "C:\Users\hamid.farhidzadeh\Anaconda3\envs\pytorch\lib\site-packages\OpenGL\platform\baseplatform.py", line 405, in call raise error.NullFunctionError( OpenGL.error.NullFunctionError: Attempt to call an undefined function glClampColor, check for bool(glClampColor) before calling