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

Adding section for Mac to COMPILE.md #156

Merged
merged 5 commits into from
Jan 4, 2019
Merged

Conversation

caffeinum
Copy link
Contributor

@caffeinum caffeinum commented Jan 4, 2019

sed -i.backup s/version\ 130/version\ 140/ data/shaders/*.*

add freeimage – without it failed on `make` at 37%

```
[ 37%] Building CXX object external/RadixEngine/CMakeFiles/RadixEngine.dir/source/core/gl/Framebuffer.cpp.o
/Users/caffeinum/glPortal/external/RadixEngine/source/core/gl/Framebuffer.cpp:4:10: fatal error: 
      'FreeImage.h' file not found
#include <FreeImage.h>
         ^~~~~~~~~~~~~
1 error generated.
make[3]: *** [external/RadixEngine/CMakeFiles/RadixEngine.dir/source/core/gl/Framebuffer.cpp.o] Error 1
make[2]: *** [external/RadixEngine/CMakeFiles/RadixEngine.dir/all] Error 2
make[1]: *** [source/CMakeFiles/run.dir/rule] Error 2
make: *** [run] Error 2
```
@caffeinum
Copy link
Contributor Author

@hhirsch unfortunately, I still wasn't able to run it due to shader compile issues.
I solved the version 130 error, but stuck with this:
image

this error even shows for this small shader:

$ cat data/shaders/whitefill.frag
#version 140

out vec4 out_Color;

void main(void) {
	out_Color = vec4(1, 1, 1, 1);
}

@caffeinum
Copy link
Contributor Author

Actually, I hope to try and compile it to run on iOS somehow. I am not much familiar with OpenGL, but am a quick learner (and professional google searcher). I plan to build an open-source Google Cardboard VR game on iPhone.

@ElementW
Copy link
Contributor

ElementW commented Jan 6, 2019

@caffeinum Running glPortal on iOS (or Android for that matter) won't be particularly easy since we use OpenGL 3.0 and mobile platforms only gives access to OpenGL ES 3.0 at most, the most available still being ES 2.0 (yes, 2.0, not even 2.1) ; and there are major differences between ES/non-ES GL versions, especially when it comes to shaders.

Oh and also Apple deprecated GL ES in iOS 12...

@caffeinum
Copy link
Contributor Author

@ElementW oh... so I need to use Apple's Metal framework instead of OpenGL, right? And there's no easy way to bind/facade them?

@ElementW
Copy link
Contributor

ElementW commented Jan 6, 2019

There's no straightforward way to translate OpenGL into Metal, they're just too different, same for GL → Vulkan. There are external solutions like MoltenGL that provide an implementation of GL ES on top of Metal, or we could refactor the engine to have a rendering architecture supporting multiple back-end APIs, a thing I already talked in GlPortal/RadixEngine#119 (before I ran out of time to give to the project).

If we create a Vulkan-based renderer we can just use MoltenVK, which is free & open source, unlike MoltenGL, and is lightweight since Metal and Vulkan are similarly based on AMD's Mantle experimental API. DX12 translation would also become easy for Windows-based platforms.

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.

3 participants