Skip to content

chore: Remove OpenGL graphics API#3069

Open
xen2 wants to merge 5 commits intostride3d:masterfrom
xen2:remove-opengl
Open

chore: Remove OpenGL graphics API#3069
xen2 wants to merge 5 commits intostride3d:masterfrom
xen2:remove-opengl

Conversation

@xen2
Copy link
Member

@xen2 xen2 commented Feb 15, 2026

PR Details

Remove OpenGL.
git grepping "OpenGL", most references left are related to the shader converter (HLSL => GLSL) used by Vulkan.

TODO:

  • review if we need a package upgrader for that.
  • check if iOS/Android compiles (testing/fixing the whole platform is out of scope for this PR)

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@xen2 xen2 marked this pull request as draft February 15, 2026 12:04
</PropertyGroup>

<PropertyGroup Condition="'$(StridePlatform)' == 'Linux'">
<StrideGraphicsApis Condition="'$(StrideGraphicsApis)' == ''">OpenGL</StrideGraphicsApis>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not be removed and set to Vulkan instead

Copy link
Member Author

@xen2 xen2 Feb 16, 2026

Choose a reason for hiding this comment

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

I originally did it on purpose, because Linux now had only a single Graphics API, not multiple, so it was supposedly set by StrideGraphicsApi (without a s).
However I noticed some other issue with this system so currently reviewing the changes.
I might revert them for now.

@@ -1,8 +1,5 @@
<!-- Build file pre-included by all Stride projects -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(StridePlatform)' == 'Linux'">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same thing here

@Jklawreszuk
Copy link
Collaborator

Besides my few notes It looks great. I cant wait to see being merged😀

Copy link
Contributor

@Ethereal77 Ethereal77 left a comment

Choose a reason for hiding this comment

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

Just left a few comments. Btw, now that OpenGL is gone, the GLSL-specific part of the shader compiler (that now is only for Vulkan) is inside a directory named OpenGL.


public override void DeviceChanged(GraphicsDevice currentDevice, GraphicsDeviceInformation deviceInformation)
{
// TODO: Check when it needs to be disabled on iOS (OpenGL)?
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment mentions iOS on a file named GamePlatformAndroid. Is this correct?

Comment on lines -408 to -409
// TODO: Remove when the Tiff format is supported on Android
sourceFormat == ImageFileType.Tiff),
Copy link
Contributor

Choose a reason for hiding this comment

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

This check is for TIFF format on Android, not only for OpenGL, is it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point.
I will just leave this special case removed and see when we get Android working again if it needs to be readded.

@xen2 xen2 marked this pull request as ready for review March 8, 2026 08:14
@xen2 xen2 changed the title Remove opengl chore: Remove OpenGL graphics API Mar 8, 2026
@meriaizen86
Copy link
Contributor

meriaizen86 commented Mar 16, 2026

While I'm agree to The decision of getting rid off GL in desktop, I sugest to consider on keep OpenGL ES at least. Some devices such android phones, emulation consoles or even Raspberry pi are still using It.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants