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

Using Alacritty on iOS #873

Closed
tbodt opened this issue Oct 27, 2017 · 7 comments
Closed

Using Alacritty on iOS #873

tbodt opened this issue Oct 27, 2017 · 7 comments

Comments

@tbodt
Copy link
Contributor

tbodt commented Oct 27, 2017

I'm building an ios app and considering using alacritty for tty rendering in it. How would the event loop, renderer, etc need to be modified to make Alacritty work in an ios app, not drawing its own windows, instead drawing in an ios view?

Related: #450

@DAddYE
Copy link

DAddYE commented Sep 18, 2021

Hi,

not sure if the maintainers are interested in supporting ios (if so I can submit a PR), but I was able to compile fully alacritty for aarch64-apple-os.

It required patching both the crossfonts and all the crates in this repo to support target_os = "ios" and patching alacritty main loop as glutin/winit's run_return isn't available on ios.

That being said, I'm trying to understand why I'm getting:

There was an error initializing the shaders: Failed compiling shader: ERROR: 0:1: '' :  version '330' is not supported
                                                    ERROR: 0:1: '' : syntax error: #version
                                                    ERROR: 0:3: 'layout' : syntax error: syntax error

while the glutin counterpart example works (on iOs simulator).

I tried all the workarounds in the others' issues (ie. #3624) such as setting env vars
IMG_0073

I tired to generate bindings for Api::Gles2 with the same result.

The only difference a this point I think is that the binding in the glutin example use a StructGenerator while we use a GlobalGenerator.

I'm also a little skeptical in putting a lot of effort as OpenGL is deprecated on iOS device in favor of Metal, and currently the "closest" platform apple-macabi doesn't seem to support OpenGles

@chrisduerr
Copy link
Member

That being said, I'm trying to understand why I'm getting:

Because it doesn't support Alacritty's minimum OpenGL version.

Generally this issue can be closed, there's not much to be done here. Alacritty itself will not be ported to more platforms and components are all pretty much split out into crates already for others to use.

@DAddYE
Copy link

DAddYE commented Sep 18, 2021

I agree that the issue can be closed.

Just for my personal learning, unless I'm mistaken OpenGL ES3 should support OpenGL 3.3, or at least that was my impression looking at glutin's examples. Is there any other limitation?

@chrisduerr
Copy link
Member

Just for my personal learning, unless I'm mistaken OpenGL ES3 should support OpenGL 3.3, or at least that was my impression looking at glutin's examples. Is there any other limitation?

OpenGL 3.3+ is the only limitation I'm aware of at least on desktop systems. I've never tried OpenGL ES systems.

@hronro
Copy link

hronro commented Aug 21, 2022

Time to reopen this issue since #5902 merged?

@unphased
Copy link

@DAddYE do you have any code you can point to that’s related to the patches which you mentioned above?

@kchibisov
Copy link
Member

The current alacritty version supports GLES 2 however we our upstream library glutin doesn't support OpenGL context creation on ios, because there's no one interested in it, so you'd need to at least at support into glutin.

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

No branches or pull requests

6 participants