GlPortal / glPortal

:video_game: Open Source teleportation based first person puzzle-platformer
http://glportal.de
Other
359 stars 109 forks source link

Adding section for Mac to COMPILE.md #156

Closed caffeinum closed 5 years ago

caffeinum commented 5 years ago
caffeinum commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

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.