macOS
Opened this issue · 4 comments
coolbutuseless commented
I got it to compile OK on macOS using the following Makevars
(with 'glfw` and 'glew' installed via homebrew)
PKG_CPPFLAGS = -I. -I/opt/homebrew/include
PKG_LIBS = -lglfw -lm -L/opt/homebrew/lib -framework Cocoa -framework OpenGL
However, trying to run camera_mouse_zoom.R
fails here:
> program <- build_program(vert = vs, frag = fs)
Error in build_program(vert = vs, frag = fs) :
Validation Failed: No vertex array object bound.
sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: aarch64-apple-darwin20
Running under: macOS Sonoma 14.5
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] magick_2.8.3 glfw_3.3.0
ramiromagno commented
Thanks @coolbutuseless for reporting this issue. I need to get my hands on a macOS to debug this.
ramiromagno commented
As per this post: https://stackoverflow.com/questions/54181078/opengl-3-3-mac-error-validating-program-validation-failed-no-vertex-array-ob, could you try:
moving these lines:
vs <- system.file("tutorials/learnopengl/camera/camera.vs", package = "glfw")
fs <- system.file("tutorials/learnopengl/camera/camera.fs", package = "glfw")
program <- build_program(vert = vs, frag = fs)
to line 196 of camera_mouse_zoom.R
:
gl_enable_vertex_attrib_array(1L)
coolbutuseless commented
ramiromagno commented
That's awesome!