Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions rts/Rendering/GlobalRendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,12 @@ void CGlobalRendering::CheckGLExtensions()
if (underExternalDebug)
return;

// In an OpenGL CORE profile context these ARB extensions are not advertised
// by name (they were folded into GL 1.3/2.0/3.0 long ago) but their
// functionality is guaranteed by the spec. Skip the legacy-extension check.
if (globalRenderingInfo.glContextIsCore)
Comment on lines +785 to +788

@lostsquirrel1 lostsquirrel1 Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually load the compatibility profile rather than core; we want to also avoid checking for unnecessary extensions.

Suggested change
// In an OpenGL CORE profile context these ARB extensions are not advertised
// by name (they were folded into GL 1.3/2.0/3.0 long ago) but their
// functionality is guaranteed by the spec. Skip the legacy-extension check.
if (globalRenderingInfo.glContextIsCore)
// All checked ARB extensions are part of the core specification since OpenGL 3.0.
if (globalRenderingInfo.glVersionNum >= 30)

The only problem with my suggestion is that I can't see where glVersionNum gets correctly initialized. Engine 2025.04 apparently did this, but I'm not seeing it, so it would be worth checking - maybe we have anopther bug because a Lua Platform.glVersionNum depends on this value.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glVersionNum was added in 81490a7 but that probably sets the incorrect value, see #3149

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sprunk @lostsquirrel1 is this something that needs to be changed or is the PR okay as is? Or is it blocked by #3149? The next steps here appear to be inconclusive/unclear

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need the suggested change, but yes it is blocked by #3149

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit busy, feel free to pick #3149 up.

return;

char extMsg[ 128] = {0};
char errMsg[2048] = {0};
char* ptr = &extMsg[0];
Expand Down
Loading