Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLError #36

Open
CharlesDaiii opened this issue Jun 25, 2023 · 17 comments
Open

GLError #36

CharlesDaiii opened this issue Jun 25, 2023 · 17 comments

Comments

@CharlesDaiii
Copy link

CharlesDaiii commented Jun 25, 2023

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

Run on WSL2 windows11

@jivaklong
Copy link

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

@jivaklong
Copy link

raise self._errorClass(

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

@Pawandeep-prog
Copy link

Pawandeep-prog commented Jun 25, 2023

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)

@jivaklong
Copy link

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
)

@ikpark09
Copy link

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

@CharlesDaiii
Copy link
Author

export MESA_GL_VERSION_OVERRIDE=3.3, this has solved my issue.

@poregon
Copy link

poregon commented Jun 28, 2023

Change GL_TRUE to gl.GL_TRUE

@rockynox
Copy link

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
)

@suizonghe
Copy link

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

@U-DI-Page
Copy link

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

@csh0317
Copy link

csh0317 commented Aug 24, 2023

same error with Ubuntu 20, any solution?

@csh0317
Copy link

csh0317 commented Aug 24, 2023

same error with Ubuntu 20, any solution?

ok, i use export MESA_GL_VERSION_OVERRIDE=3.3

than it work

@paullarionov
Copy link

Same problem after borth #36 (comment)

@shuizk
Copy link

shuizk commented Jan 19, 2024

export MESA_GL_VERSION_OVERRIDE=3.3, this has solved my issue.

Thank u!

@qinliuliuqin
Copy link

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

@Alphawarheads
Copy link

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 = ()
)

@TuanTuanC
Copy link

export MESA_GL_VERSION_OVERRIDE=3.3, this has solved my issue.

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests