diff --git a/components/raylib/raylibConstShader.swift b/components/raylib/raylibConstShader.swift index c3fbe61..c61c21e 100644 --- a/components/raylib/raylibConstShader.swift +++ b/components/raylib/raylibConstShader.swift @@ -1,5 +1,5 @@ let RAYLIB_SHADER_MAIN_FS = """ -#version 330 +#version 150 in vec3 vWorldPos; in vec3 vNormal; @@ -94,10 +94,10 @@ void main() """ let RAYLIB_SHADER_MAIN_VS = """ -#version 330 -layout(location = 0) in vec3 vertexPosition; -layout(location = 1) in vec2 vertexTexCoord; -layout(location = 2) in vec3 vertexNormal; +#version 150 +in vec3 vertexPosition; +in vec2 vertexTexCoord; +in vec3 vertexNormal; uniform mat4 mvp; uniform mat4 matModel; @@ -120,7 +120,7 @@ void main() """ let RAYLIB_SHADER_SHADOW_FS = """ -#version 330 +#version 150 out vec4 finalColor; void main() { @@ -129,8 +129,8 @@ void main() """ let RAYLIB_SHADER_SHADOW_VS = """ -#version 330 -layout(location = 0) in vec3 vertexPosition; +#version 150 +in vec3 vertexPosition; uniform mat4 mvp; void main() { diff --git a/components/root/mac/view/RaylibGLView.swift b/components/root/mac/view/RaylibGLView.swift index a449299..1d01801 100644 --- a/components/root/mac/view/RaylibGLView.swift +++ b/components/root/mac/view/RaylibGLView.swift @@ -26,7 +26,7 @@ final class RaylibGLNSView: NSOpenGLView { override init(frame frameRect: NSRect) { let attributes: [NSOpenGLPixelFormatAttribute] = [ - UInt32(NSOpenGLPFAOpenGLProfile), UInt32(NSOpenGLProfileVersion4_1Core), + UInt32(NSOpenGLPFAOpenGLProfile), UInt32(NSOpenGLProfileVersion3_2Core), UInt32(NSOpenGLPFAColorSize), 24, UInt32(NSOpenGLPFAAlphaSize), 8, UInt32(NSOpenGLPFADepthSize), 24, @@ -36,7 +36,7 @@ final class RaylibGLNSView: NSOpenGLView { ] guard let format = NSOpenGLPixelFormat(attributes: attributes) else { - fatalError("Unable to create an OpenGL 4.1 core pixel format") + fatalError("Unable to create an OpenGL 3.2 core pixel format") } super.init(frame: frameRect, pixelFormat: format)!