openglonmetal / MGL

OpenGL 4.6 on Metal
Apache License 2.0
769 stars 30 forks source link

MGL Building issues #68

Open redeemarr opened 1 year ago

redeemarr commented 1 year ago

FYI Macos 13.0.1, XCode 14.1 Followed steps is BUILD.md, failed on build_external.sh -> hardcoded absolute paths for MGLContext.h and MGLRenderer.h in external/glfw/src/cocoa_platform.h and mgl_context.m

Xcode build of MGL failed, so I did the following:

  1. Commented out API_AVAILABLE and API_UNAVAILABLE declarations in MGL/include/pixel_utils.h

  2. Added the following after includes of MGL/src/shaders.c

    GLSLANG_SHADER_VULKAN_RULES_RELAXED = 1 << 2;
    void glslang_shader_set_options(glslang_shader_t*, int);
  3. From MGL/external/SPIRV-Tools/source/val added validate_mesh_shading.cpp and validate_ray_tracing_reorder.cpp to project (MGL/SPIRV-Tools)

After that MGL was built successfully. Hope this will be helpful

darkaegisagain commented 1 year ago

It seems that the xcode build has been broken along the way, I originally checked the source in using the xcode project alone for development.. probably the makefile work broke it.

I will take a look and update it.

Mike

"The difference between communism and socialism is that under socialism central planning ends with a gun in your face, whereas under communism central planning begins with a gun in your face." ― Kevin D. Williamson

On Tue, Feb 7, 2023 at 10:23 AM redeemarr @.***> wrote:

FYI Macos 13.0.1, XCode 14.1 Followed steps is BUILD.md, failed on build_external.sh -> hardcoded absolute paths for MGLContext.h and MGLRenderer.h in external/glfw/src/cocoa_platform.h and mgl_context.m

Xcode build of MGL failed, so I did the following:

1.

Commented out API_AVAILABLE and API_UNAVAILABLE declarations in MGL/include/pixel_utils.h 2.

Added

GLSLANG_SHADER_VULKAN_RULES_RELAXED = 1 << 2; void glslang_shader_set_options(glslang_shader_t*, int);

after includes of MGL/src/shaders.c

  1. From MGL/external/SPIRV-Tools/source/val added validate_mesh_shading.cpp and validate_ray_tracing_reorder.cpp to project (MGL/SPIRV-Tools)

After that MGL was built successfully. Hope this will be helpful

— Reply to this email directly, view it on GitHub https://github.com/openglonmetal/MGL/issues/68, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOKD35FHW44OYOHSRGRBH3WWKHJXANCNFSM6AAAAAAUUJWJQA . You are receiving this because you are subscribed to this thread.Message ID: @.***>