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

gl: Relax GLSL requirement from 3.3 to 3.1 #137

Merged
merged 2 commits into from
Aug 31, 2022

Conversation

plaes
Copy link
Contributor

@plaes plaes commented Aug 27, 2022

With these changes, it is possible to start dethrace on
Pinebook Pro (Mali-T860 / Panfrost):

OpenGL vendor string: Panfrost
OpenGL renderer string: Mali-T860 (Panfrost)
OpenGL core profile version string: 3.1 Mesa 22.3.0-devel (git-d08bd9a8d8)
OpenGL core profile shading language version string: 1.40

With these changes, it is possible to start dethrace on
Pinebook Pro (Mali-T860 / Panfrost):

OpenGL vendor string: Panfrost
OpenGL renderer string: Mali-T860 (Panfrost)
OpenGL core profile version string: 3.1 Mesa 22.3.0-devel (git-d08bd9a8d8)
OpenGL core profile shading language version string: 1.40
@plaes plaes force-pushed the reduce-opengl-version branch from 4ee3cb6 to d7055bc Compare August 27, 2022 12:33
@dethrace-labs
Copy link
Owner

dethrace-labs commented Aug 28, 2022

thanks! Your core profile reported in your output is 3.1, just curious if you tried to set SDL_GL_CONTEXT_MINOR_VERSION to 1 without any other changes? Does that also compile and run?

Just curious, trying to understand the various OpenGL version conventions!

@plaes
Copy link
Contributor Author

plaes commented Aug 28, 2022

thanks! Your core profile reported in your output is 3.1, just curious if you tried to set SDL_GL_CONTEXT_MINOR_VERSION to 1 without any other changes? Does that also compile and run?

Just curious, trying to understand the various OpenGL version conventions!

After changing the version to 3.1, it built, but failed to compile shaders runtime:

[PANIC] CreateShaderFromFile shader vertex_shader_2d.glsl failed to compile: 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.00 ES, and 3.00 ES

And after fixing the shaders (I eventually settled to lowest possible requirements), it crashed because due to glFrameBufferTexture requires at least OpenGL 3.2. (So calling it resulted in null pointer exception).

@plaes plaes closed this Aug 28, 2022
@plaes plaes reopened this Aug 28, 2022
Copy link
Owner

@dethrace-labs dethrace-labs left a comment

Choose a reason for hiding this comment

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

I have to keep the core profile active since I'm on a Mac and without the core profile it falls back to OpenGL 2.1.

I suggested some changes to the PR that still work on my machine and should work on yours too, in theory!

The change from glFrameBufferTexture to glFrameBufferTexture2D is fine, I actually made the same change myself in a different branch

@dethrace-labs
Copy link
Owner

@plaes when you have a minute, could you help validate the suggested changes? thanks!

@plaes plaes force-pushed the reduce-opengl-version branch from cf07a08 to a6daa80 Compare August 30, 2022 05:53
@plaes
Copy link
Contributor Author

plaes commented Aug 30, 2022

@plaes when you have a minute, could you help validate the suggested changes? thanks!

Pushed the changes and validated they work too.

@dethrace-labs
Copy link
Owner

thanks very much!

@dethrace-labs dethrace-labs changed the title gl: Relax GLSL requirement from 3.3 to 1.3 gl: Relax GLSL requirement from 3.3 to 3.1 Aug 30, 2022
@dethrace-labs
Copy link
Owner

@plaes could you take a quick photo of it running on your pinebook? I'd love to throw it up on our twitter feed :)

@dethrace-labs dethrace-labs merged commit 8c060fa into dethrace-labs:main Aug 31, 2022
@plaes plaes deleted the reduce-opengl-version branch August 31, 2022 04:24
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