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

Android.Opengl.GLES20 is missing constant for GL_CULL_FACE. #8612

Closed
AngryKittyMeow opened this issue Jan 2, 2024 · 1 comment · Fixed by #9009
Closed

Android.Opengl.GLES20 is missing constant for GL_CULL_FACE. #8612

AngryKittyMeow opened this issue Jan 2, 2024 · 1 comment · Fixed by #9009
Assignees
Labels
Area: Mono.Android Issues with the Android API binding (Mono.Android.dll). bug Component does not function as intended.
Milestone

Comments

@AngryKittyMeow
Copy link

Android application type

Classic Xamarin.Android (MonoAndroid13.0, etc.)

Affected platform version

Anything using Android.opengl

Description

In order to cull faces in opengl, the developer needs to call glEnable(GL_CULL_FACE);. There is no such enumeration in Android.Opengl. There is a work-around. If the developer manually passes in 0x0B44 into glEnable then the developer can enable face culling. Without knowing this little cheat, it is not possible to enable face culling using Android.opengl as far as I can tell.
I'm sorry if this isn't a great issue report. I'm not a professional software developer, just a hobbyist.

Steps to Reproduce

Just try to look for an enum to pass into glEnable( ) that will activate face culling in an opengl project.

Did you find any workaround?

Yes, manually pass in 0x0B44 into glEnable() in order to activate face culling.

Relevant log output

No response

@AngryKittyMeow AngryKittyMeow added the needs-triage Issues that need to be assigned. label Jan 2, 2024
@jpobst
Copy link
Contributor

jpobst commented Jan 3, 2024

It looks like this constant gets removed because when it goes through our capitalization correction it becomes GLES20.GlCullFace which then conflicts with the method named GLES20.GlCullFace (int):

warning BG8401: Skipping 'Android.Opengl.GLES20.GlCullFace' due to a duplicate method name. (Java type: 'android.opengl.GLES20')

References:

We will need to rename it to something else to prevent the conflict.

Note: also affects Android.Opengl.GLES10.GlCullFace.

@jpobst jpobst added Area: Mono.Android Issues with the Android API binding (Mono.Android.dll). and removed needs-triage Issues that need to be assigned. labels Jan 3, 2024
@jpobst jpobst added this to the .NET 9 milestone Jan 3, 2024
@jpobst jpobst changed the title Android.opengl is missing an enum for GL_CULL_FACE. Android.Opengl.GLES20 is missing constant for GL_CULL_FACE. Jan 3, 2024
@jpobst jpobst added the bug Component does not function as intended. label Jan 24, 2024
jonpryor pushed a commit that referenced this issue Jun 7, 2024
Fixes: #8612

Some OpenGL constants get removed because they conflict with method
names after they go through our capitalization correction.
For example, [`GLES20.GL_CULL_FACE`][0] *would* be bound as
`GLES20.GlCullFace`, which then conflicts with the method named
[`GLES20.GlCullFace(int)`][1], so it is skipped::

	warning BG8401: Skipping 'Android.Opengl.GLES20.GlCullFace' due to a duplicate method name. (Java type: 'android.opengl.GLES20')

Fix these cases by using metadata to assign explicit `managedName`
values that are the expected constant name + `Const` to avoid the
name collision.

[0]: ]https://developer.android.com/reference/android/opengl/GLES20#GL_CULL_FACE
[1]: ]https://developer.android.com/reference/android/opengl/GLES20#glCullFace(int)
@github-actions github-actions bot locked and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: Mono.Android Issues with the Android API binding (Mono.Android.dll). bug Component does not function as intended.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants