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

OpenGL backend does not work on old OpenGL hardware (e.g. OpenGL ES 2) #931

Closed
reivilibre opened this issue Jun 26, 2021 · 8 comments · Fixed by #1160
Closed

OpenGL backend does not work on old OpenGL hardware (e.g. OpenGL ES 2) #931

reivilibre opened this issue Jun 26, 2021 · 8 comments · Fixed by #1160
Labels

Comments

@reivilibre
Copy link

The current OpenGL (glow) backend does not work on OpenGL ES 2 hardware (such as the PinePhone [Mali 400 GPU] in my case, with the latest GLSL version supported being 1.20).

However, it's not too far from being able to run there. By removing the use of instanced rendering and switching to older GLSL syntax, I managed to get it running on my PinePhone.

I have a fork at https://bics.ga/reivilibre/iced-mobile/src/commit/2dc42b4a22ffc31a83297bfed7641e3737a0a940 which I am using .

I'm not sure if I can contribute any changes back immediately (since there may be a performance cost for hardware which does support instanced rendering etc, but I felt compelled to leave a note here in case anyone may find it useful.

(as an aside: I have left a comment about my experience with Iced on the PinePhone on the mobile issue here: #302 (comment))

I wonder what the best approach might be here; would we prefer to have both a modern implementation and an old one and use the modern one if we can?

@sourcebox
Copy link

sourcebox commented Jun 27, 2021

I have a similar problem on my notebook that uses older Intel onboard graphics. This leads to the somewhat uncomfortable situation that I can compile my project for Linux (beside Windows and macOS) but not run it.

@13r0ck
Copy link
Member

13r0ck commented Jun 28, 2021

Would it be possible to PR this as an Iced feature? So that way it is off by default, but can be enabled when needed?

@hecrj hecrj added the feature New feature or request label Jun 28, 2021
@dvdsk
Copy link

dvdsk commented Jul 22, 2021

So back in December I wanted to build a podcast app for the PinePhone and did the (same see: https://github.com/dskleingeld/iced). I have little to no experience in GPU programming therefore didn't PR assuming the code quality was quite bad.

One of the things I ran into was OpenGL2ES not running on modern hardware. For now my fork adds a feature glow_OpenGL2ES that I enable when building for the PinePhone. I wonder if @13r0ck ran into the same issue?

I quickly compared our forks and did not found huge differences except me targeting GLSL version 100ES and needind an vector + allocation to remove instancing where @13r0ck needed none 👍.

Still my fork might be useful to underline the wish for older OpenGL support.

@philpax
Copy link

philpax commented Oct 5, 2021

Hi there! Just wondering if there's been any progress on this; would be great to see it upstreamed if possible.

(also interested in this for the PinePhone - how did y'all go with getting it running?)

@dvdsk
Copy link

dvdsk commented Oct 5, 2021

(also interested in this for the PinePhone - how did y'all go with getting it running?)

I have a really early build for a podcast player with quite detailed build instructions that might help you out: https://github.com/dvdsk/pods. I cross compile to the PinePhone though you can also compile on the device. That just takes forever as you well need to do a release build or your app will be really laggy on the PinePhone.

Just wondering if there's been any progress on this; would be great to see it upstreamed if possible.

It might be best to wait till iced switches to iced_wgpu for OpenGL support. If you need an up to date fork you can make an issue on mine and Ill merge the latest iced master changes in.

@0x192
Copy link
Contributor

0x192 commented Oct 19, 2021

@dvdsk

If you need an up to date fork you can make an issue on mine and Ill merge the latest iced master changes in.

I would really appreciate if you could update your fork with the latest iced master changes. I have a user running a very old version of OpenGL and I'd like to release a special build for them.

Thanks you.

PS: You've disabled the issues in your repo.

@dvdsk
Copy link

dvdsk commented Oct 20, 2021

Fork is now updated 👍

It might already work for your user but if it doesn't you can enable the OpenGL2ES feature enabling even older shaders. Though this breaks rendering on newer systems........ I added a compile time feature to my app so I can easily switch for testing like this

PS: You've disabled the issues in your repo.

It seems to do that by default on forks, thanks for letting me know, I fixed it

PS: your app is gorgeous, definitely gonna steal the looks of that scroll list!

@0x192
Copy link
Contributor

0x192 commented Oct 21, 2021

Thanks you for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants