Mac users have experienced problems with some of the tutorials.
IOS/Mac .cpp file:
uncomment:
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // To make MacOS happy;
not needed by other OS
only if needed change line 487 of LoadOGLCore.mm from:
gl_dyld = dlopen("OpenGL",RTLD_LAZY)
to:
gl_dyld = dlopen(“/System/Library/Frameworks/OpenGL.framework/OpenGL”, RTLD_LAZY);
Xcode compiles but does not start automatically: set execution target as follows:
Product: Scheme: Edit Scheme: Executable dropdown select tutorial, e.g. tutorial02_red_triangle
glfw3.h not found error:
Change in the include "glfw3.h” to "GLFW/glfw3.h"
Ignore errors or remove AntTweakBar (upper left hand corner box).
line 22: #include
line ~160-165: TwInit(TW_OPENGL_CORE, NULL);
TwWindowSize(window_width, window_height);
TwBar * GUI = TwNewBar("Picking");
TwSetParam(GUI, NULL, "refresh", TW_PARAM_CSTRING, 1, "0.1");
TwAddVarRW(GUI, "Last picked object", TW_TYPE_STDSTRING, &gMessage, NULL);
line ~438: TwDraw();
error with Vertices in CreateObjects() (only on some versions of macOS):
use Vertex SetCoords() and SetColor():
float position0[] = {1.0f, 1.0f, 0.0f, 1.0f}; float color0[] = { 1.0f, 0.0f, 0.0f, 1.0f };
Vertices[0].SetCoords(position0); Vertices[0].SetColor(color0);
When installing xcode make sure you install also the c++ library.
No compiler yields no code. Often clang is used
ONLY if you somehow you skippeed the step when downloading xcode, try
sudo xcode-select —install
sudo xcode-select -s /Library/Developer/CommandLineTools
sudo xcode-select —reset
Natalie's problem solver pages:
argument outside
new tutorial
tutorial01_first_window does nothing (Macs don't show a window if there's nothing in it?)
MS: my PC has two graphics cards, one of them high-end.
I get an error that OpenGL 3.3 is not supported.
--- Quick hack: Right-click on .exe and select the high-end graphics card
(often the default is the more energy-saving low-end graphics card)
--- Long term: make your high-end graphics card the default (open NVidia or
AMD graphics card interface)
Failed to open the GLFW window. If you have an intel GPU,
they are not 3.3 compatible. Try version 2.1 of the tutorials
--- see above. Do not use version 2.1 !!!
OneDrive:
execution errors :"network problem"
--- Make sure program is local, do not place on OneDrive
I am using VS15 community and get the error: C compiler not found
--- You need to explicitly link a C program for the compiler to install.
Upgrade. VS 17 and 19 should work.