Skip to content

Conversation

@Yakvi
Copy link

@Yakvi Yakvi commented Oct 26, 2025

In vendor:SDL3 package, there's currently a notable discrepancy between the SDL_GL_CONTEXT_PROFILE_xyz defines in SDL_video and as specified in sdl3_video.odin:

SDL_VIDEO:

#define SDL_GL_CONTEXT_PROFILE_CORE           0x0001  /**< OpenGL Core Profile context */
#define SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  0x0002  /**< OpenGL Compatibility Profile context */
#define SDL_GL_CONTEXT_PROFILE_ES             0x0004  /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */

sdl3_video.odin:

GLProfileFlag :: enum Uint32 {
	CORE          = 0, /**< OpenGL Core Profile context */
	COMPATIBILITY = 1, /**< OpenGL Compatibility Profile context */
	ES            = 2, /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
}

This error results in unintended behavior, even leading to crashes when used inside a Darwin environment. this PR aims to rectify said discrepancy by enumerating the values as intended.

@gingerBill
Copy link
Member

So this is not a bug since the bit_set is meant to be used for the flags NOT the enum.

@gingerBill gingerBill closed this Oct 27, 2025
@Yakvi
Copy link
Author

Yakvi commented Oct 27, 2025

Right, I got it now. I was confused since SDL2 implementation didn't use the bit sets. Thanks for clarifying!

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

Successfully merging this pull request may close these issues.

2 participants