DragGAN icon indicating copy to clipboard operation
DragGAN copied to clipboard

GLError

Open CharlesDaiii opened this issue 1 year ago • 17 comments

OpenGL.error.GLError: GLError( err = 1282, description = b'invalid operation', baseOperation = glGetUniformLocation, cArguments = (1, b'Texture\x00'), result = -1 )

Run on WSL2 windows11

CharlesDaiii avatar Jun 25 '23 17:06 CharlesDaiii

我的在mac电脑、intel 处理器 ,运行也报上面错误提示

jivaklong avatar Jun 25 '23 19:06 jivaklong

raise self._errorClass(

OpenGL.error.GLError: GLError( err = 1282, description = b'invalid operation', baseOperation = glGetUniformLocation, cArguments = (1, b'Texture\x00'), result = -1 )

jivaklong avatar Jun 25 '23 19:06 jivaklong

Add these lines of code before create window In gui_util>glfw_window.py>line 35

glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
            glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 3)
            glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, GL_TRUE)
            glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)

if that not work Try this https://github.com/NVlabs/stylegan3/issues/66#issuecomment-1006375618

Pawandeep-prog avatar Jun 25 '23 23:06 Pawandeep-prog

I try it: export MESA_GL_VERSION_OVERRIDE=3.3. But the following error still occurred, My computer is configured with MAC 2.4 GHz 8-core Intel Core i9

raise self._errorClass( OpenGL.error.GLError: GLError( err = 1282, description = b'invalid operation', baseOperation = glGetUniformLocation, cArguments = (1, b'Texture\x00'), result = -1 )

jivaklong avatar Jun 26 '23 01:06 jivaklong

Add these lines of code before create window In gui_util>glfw_window.py>line 35

glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
            glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 3)
            glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, GL_TRUE)
            glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)

if that not work Try this NVlabs/stylegan3#66 (comment)

what is GL_TRUE?

NameError: name 'GL_TRUE' is not defined

ikpark09 avatar Jun 26 '23 06:06 ikpark09

export MESA_GL_VERSION_OVERRIDE=3.3, this has solved my issue.

CharlesDaiii avatar Jun 26 '23 17:06 CharlesDaiii

Change GL_TRUE to gl.GL_TRUE

poregon avatar Jun 28 '23 00:06 poregon

Same here with an Intel Mac. Try both export MESA_GL_VERSION_OVERRIDE=3.3 and changes from @Pawandeep-prog in glfw_window.py file, none of the two works for me. I still have these errors:

With glfw_window.py change:

OpenGL.error.GLError: GLError(
	err = 1282,
	description = b'invalid operation',
	baseOperation = glMatrixMode,
	cArguments = (GL_PROJECTION,)
)

With export MESA_GL_VERSION_OVERRIDE=3.3

OpenGL.error.GLError: GLError(
	err = 1282,
	description = b'invalid operation',
	baseOperation = glGetUniformLocation,
	cArguments = (1, b'Texture\x00'),
	result = -1
)

rockynox avatar Jun 28 '23 08:06 rockynox

Same here with an Intel Mac. Try both export MESA_GL_VERSION_OVERRIDE=3.3 and changes from @Pawandeep-prog in glfw_window.py file, none of the two works for me. I still have these errors:

With glfw_window.py change:

OpenGL.error.GLError: GLError(
	err = 1282,
	description = b'invalid operation',
	baseOperation = glMatrixMode,
	cArguments = (GL_PROJECTION,)
)

With export MESA_GL_VERSION_OVERRIDE=3.3

OpenGL.error.GLError: GLError(
	err = 1282,
	description = b'invalid operation',
	baseOperation = glGetUniformLocation,
	cArguments = (1, b'Texture\x00'),
	result = -1
)

Same error with Mac M2 Pro Try both, still errors

suizonghe avatar Jun 30 '23 09:06 suizonghe

same error, Is there any solution to solve this problem?

U-DI-Page avatar Jul 10 '23 01:07 U-DI-Page

same error with Ubuntu 20, any solution?

csh0317 avatar Aug 24 '23 05:08 csh0317

same error with Ubuntu 20, any solution?

ok, i use export MESA_GL_VERSION_OVERRIDE=3.3

than it work

csh0317 avatar Aug 24 '23 05:08 csh0317

Same problem after borth https://github.com/XingangPan/DragGAN/issues/36#issuecomment-1614356178

paullarionov avatar Nov 25 '23 08:11 paullarionov

export MESA_GL_VERSION_OVERRIDE=3.3, this has solved my issue.

Thank u!

shuizk avatar Jan 19 '24 11:01 shuizk

export MESA_GL_VERSION_OVERRIDE=3.3 This fixed the issue. Tested on Ubuntu.

qinliuliuqin avatar Feb 06 '24 22:02 qinliuliuqin

I have met an error using pyopengl OpenGL.error.GLError: GLError( err = 1282, description = b'\xce\xde\xd0\xa7\xb2\xd9\xd7\xf7', baseOperation = glPushMatrix, cArguments = () )

Alphawarheads avatar Feb 11 '24 12:02 Alphawarheads

export MESA_GL_VERSION_OVERRIDE=3.3, this has solved my issue.

thanks!

TuanTuanC avatar Jul 22 '24 02:07 TuanTuanC