
Ion: Cross-platform OpenGL library from Google - rtsuk
https://github.com/google/ion
======
pierrec
Neat. This and Oryol [1] appear to have similar goals, I think this already
calls for a more in-depth comparison... Either way, this kind of technology
could end up being a better choice than the node-webkit / electron paradigm,
for many projects that want to target in-browser and native platforms.

I've been planning a project like that using raw GL, but with these frameworks
popping up, the concept might go from experimental to very robust.

The native version is inherently lightweight and the emscripten/browser
version could also be very lightweight and efficient, depending on how much
attention they pay to that target while developing the framework. Looking
forward to see how this plays out.

[1]: [http://floooh.github.io/oryol/](http://floooh.github.io/oryol/)

~~~
ricardobeat
The main advantages of electron are html, css and javascript. This is not
going to be an alternative to it unless you implement a browser engine on top
of it, going full circle...

On the other hand, something like react-native for desktop, coupled with a
nice GUI library, could be very interesting.

~~~
pierrec
Sure, this will never be a 100% alternative to electron. People who derive
pleasure from writing HTML, Javascript, and CSS whenever possible will never
stray from that kind of framework. As you say, some also choose these
frameworks because of the extensive browser API features. However, some people
who don't particularly appreciate these languages and API still use electron
because it allows them to target browser and native with a single code base.
This is where things might change.

The sad fact is that most electron applications only use a small fraction of
the massive featureset provided by a full browser, and whenever a tiny GUI
application gets forcibly bundled with 70+MB of browser runtime, a cute fluffy
animal dies. I think this new kind of framework has the potential to save some
cute fluffy animals in the long term, though certainly not all of them.

------
num3ric
I get "ERROR: gyp returned non-zero" while building. Missing dependencies?
(Win10.)

~~~
tylocook
I get the same error. Earlier in the error message it says
generate_ninja_environment.gyp not found

It does not appear to be in the file system.

------
pjmlp
Looks quite nice.

Since it is also from Google, even though not officially, maybe the Android
NDK team could learn a few things about C++ code quality.

Ion's code looks so much nicer than any these APIs

[https://developer.android.com/ndk/reference/index.html](https://developer.android.com/ndk/reference/index.html)

~~~
james4k
The NDK for me is an island of sanity when it comes to dealing with mobile
SDKs.

~~~
pjmlp
Not when compared to tooling offered by iOS and WP SDKs for C++ developers.

------
RamshackleJ
Uhh so how do I use this? the readme makes it sound great but doesn't really
give me any instructions

~~~
voltagex_
[https://github.com/google/ion/tree/master/ion/demos](https://github.com/google/ion/tree/master/ion/demos)
and
[https://github.com/google/ion/tree/master/ion/doc/usersguide...](https://github.com/google/ion/tree/master/ion/doc/usersguide/examples)
may help.

------
axefrog
Looks pretty good, but would like to see more than just a features list. Some
documentation? An issues list? A way to discuss the project with the
developers and other users? (e.g. via Gitter or a Google Group)

------
z3t4
This might be what I need, but it needs guides and tutorials ... Basically
what I'm looking for is a thin client that can render a canvas, or image, and
get keyboard/mouse inputs. And if possible use the HTML Canvas API, and run
JavaScript. Basically something like nw.js or Electron, but with only a
canvas. With cross platform support.

------
giancarlostoro
It would be nice to see screenshots at some point, other than that, maybe
incorporate any / all requirements for building the project if any.

------
aledalgrande
Wish there was something cross-platform like this, but with the syntax,
tooling, performance and compute shaders of Metal.

------
kengonakajima
Build fails in Yosemite inside zlib. I forked it and trying to fix it.. Anyone
did?

~~~
joeld42
I don't really understand their build system so not sure how to fix this
cleanly but I added:

#define NOCRYPT (1) #define NOUNCRYPT (1) at the top of
./third_party/zlib/src/contrib/minizip/zip.c and unzip.c

And that got past the zlib errors on yosemite and built some of the demos (I
will post some screenshots on twitter @joeld42, but it's just boxes and
stuff). However, there was a linker error later with some json parser (maybe
it was in the tests? I can't even tell) that I didn't figure out yet.

I also had to install "ninja" because apparently it needs like six different
build systems.

The "ios" targets build... but I don't know what to do with them. I ended up
with a directory full of .app files. Maybe zip them and rename them ipa?

Anyways, it looks like there's some cool stuff in there but there's a ton of
dependencies and it doesn't really feel "lightweight". I'll definitely keep an
eye on this one but it really could use more documentation for people not
familiar with google's ecosystem.

------
mrpippy
Putting the project name/author in the title would probably draw more
attention (i.e. "Google's Ion: cross-platform C++ OpenGL application
framework")

~~~
ZenPsycho
"not an official google product"

~~~
robotresearcher
"Used by many teams across Google, running on billions of devices through
multiple Google products"

~~~
ZenPsycho
still not appropriate to refer to it as "Google Ion" or even "Google's Ion"

~~~
microcolonel
"Copyright 2016 Google Inc. All Rights Reserved." Is in all of the files. It's
hardly imprudent to call it Google's.

If it's not Google's, it's nobody's.

Could go for "Google publishes Ion, a cross-platform OpenGL abstraction."

~~~
ZenPsycho
There is a subtle and nuanced difference between simply owning the IP for
something, and endorsing it as an officially supported product.

~~~
robotresearcher
That's right. But 'Google's' covers both cases. Evidence:

case a: Bernie Sanders' socks.

case b: Bernie Sanders' campaign promises.

You weren't confused by the nuanced difference in ownership and endorsement,
but you learned more about the socks - and may be more interested in them -
than if the name was omitted.

------
ilaksh
This illustrates one of the serious issues with C++: numerous code files in a
project authored relatively recently that are dedicated to basic application
plumbing such as memory allocation/tracking and concurrency.

Its 2016. There are a number of performant cross-platform systems/languages
that have good built-in facilities for these basic plumbing problems.

C++ is an outdated language, and the entire mindset and ecosystem is wasteful
and constantly reinventing the wheel. C++ was still sort of relevant when I
was playing with it in High School in 1994, but even then it was dated in most
ways.

These are some very poor software engineering choices.

Educate yourselves about the Nim programming language.

~~~
pcwalton
I'm not exactly a fan of C++, but this isn't fair. What you're describing is
more of a problem with this project's coding style than the language. Most of
[https://github.com/google/ion/tree/master/ion/base](https://github.com/google/ion/tree/master/ion/base)
is covered either by the STL or Boost; most of what the C++ committee has been
doing lately consists of trying to encourage people to not do what this
project is doing (by improving the breadth of the standard library).

~~~
pjmlp
I have seen the C sub-community of C++ obsessed with things like what makes
the compiler generate more optimized code, i++ or i = i + 1.

This goes for every code line that one writes, most of the time backed up by
urban legends and popular beliefs instead of profiling the code.

Whereas other programming languages cultures, tend have a more meaningful
approach to optimizing software.

~~~
autoreleasepool
I know a guy who works at an airline company. He's porting all the C++ and
assembly code to 64 bit architecture. He genuinely did not know C++ was a
seperate language from C.

To be fair, he shamelessly bragged about getting the job through nepotism.

