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

Fix build for GLES < 3.2 #156

Closed
wants to merge 1 commit into from
Closed

Fix build for GLES < 3.2 #156

wants to merge 1 commit into from

Conversation

zorn-v
Copy link
Contributor

@zorn-v zorn-v commented Jan 29, 2024

If you try to build with -DENABLE_OPENGL=ON -DOPENGL_PROFILE=OpenGLES3 you'll get several
error: 'glObjectLabel' was not declared in this scope; did you mean 'glObjectLabelKHR'?

It appears only in 3.2

$ grep glObjectLabel /usr/include/GLES3/*
/usr/include/GLES3/gl32.h:GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);

As it used only for debug purposes I just dummy it out in that case.
Maybe need to do something better like using glObjectLabelKHR (defined in GLES2/gl2ext.h) as supposed.

@JesseTG
Copy link
Owner

JesseTG commented Jan 29, 2024

Thank you for the contribution. Could you please submit this change against dev rather than main?

@zorn-v zorn-v changed the base branch from main to dev January 29, 2024 23:41
@JesseTG
Copy link
Owner

JesseTG commented Jan 30, 2024

Hm...now that I think about it, I'm not sure that this change is necessary, because melonDS doesn't support OpenGL ES. I've already tried, the shaders don't work. Is there something you're trying to accomplish by building the core against OpenGL ES?

@JesseTG JesseTG added the opengl For issues related to OpenGL. label Jan 30, 2024
@zorn-v
Copy link
Contributor Author

zorn-v commented Jan 30, 2024

I tried it for rasPI4b, but no luck, yes )
Maybe just remove/comment that OpenGLES profiles for now to not confuse anyone ?

@JesseTG
Copy link
Owner

JesseTG commented Jan 30, 2024

I tried it for rasPI4b, but no luck, yes ) Maybe just remove/comment that OpenGLES profiles for now to not confuse anyone ?

I did that work before realizing that OpenGL ES wasn't supported upstream. I don't want to get rid of it entirely; if upstream gets OpenGL ES support then enabling it here will be that much simpler. However, I agree that a configure-time warning about this is a good idea. I have other things on my plate, but I'll accept a PR that adds a warning in CMake.

@JesseTG JesseTG closed this Jan 30, 2024
@zorn-v
Copy link
Contributor Author

zorn-v commented Jan 30, 2024

Maybe fatal error then ? There is no sense to continue building not working things )

@zorn-v zorn-v deleted the patch-1 branch January 30, 2024 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opengl For issues related to OpenGL.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants