MonoGame / MonoGame.Dependencies

The MonoGame binary dependencies submodule.
38 stars 51 forks source link

GLSLOptimizerSharp #95

Closed Jjagg closed 7 years ago

Jjagg commented 7 years ago

Add GLSLOptimizerSharp stuff for MonoGame/MonoGame#5354

KonajuGames commented 7 years ago

Is the source going to be included for the GLSLOptimizer.dll?

Jjagg commented 7 years ago

You mean like add it as a submodule?

KonajuGames commented 7 years ago

Where is it built from? Can anyone rebuild it easily in the future?

Jjagg commented 7 years ago

I built it from Deans repo over here: https://github.com/infinitespace-studios/GLSLOptimizerSharp

KonajuGames commented 7 years ago

I have now forked that repo into the MonoGame account. So all is good.

Jjagg commented 7 years ago

I had to build the native .so from the original repo by wrapping the glsl_optimizer.h file in a "extern C" as done in this PR. Then I set the BUILD_SHARED_LIBS option in the CMakeLists file so it would produce a shared object rather than a static lib. Maybe we should also fork the original and apply these changes.

There's a bit of an inconsistency here in terms of version of the glsl_optimizer libs. Nothing breaking, but some minor bugfixes are only in the .so lib since I just compiled that. The dylib and dll were already in the GLSLOptimizerSharp repo so I just used those. Might be better to get those up to date too if only for consistency.

KonajuGames commented 7 years ago

Build the DLL and dylib from the same source so they are consistent. I can fork the repo later and we can add the extern definition to it.

Jjagg commented 7 years ago

Will do that tomorrow. I'll squash the commits so the older binaries aren't kept in history, bloating the repo.

Jjagg commented 7 years ago

This needs the Mac dylib. Can anyone with a Mac give a hand here?

We need a build of https://github.com/aras-p/glsl-optimizer. There are XCode project files in the repo. You probably need to change the application type from static to dynamic (I had to for Windows and Linux). Then just build it to get a dylib.

Jjagg commented 7 years ago

@KonajuGames Did you build the Mac .dylib?

KonajuGames commented 7 years ago

@Jjagg Try this dylib.

KonajuGames commented 7 years ago

Merging.