Skip to content

Commit 8d570b4

Browse files
committed
MacOS does not provide glutBitmapString function
1 parent 9a46e99 commit 8d570b4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

graphics/spirograph.c

+7
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ void test()
106106
#ifdef USE_GLUT // this is set by CMAKE automatically, if available
107107
#ifdef __APPLE__
108108
#include <GLUT/glut.h> // include path on Macs is different
109+
110+
/** A wrapper that is not implemented on MacOS
111+
*/
112+
void glutBitmapString(void *font, char *string) {
113+
for (char *ch = string; *ch != '\0'; ch++) glutBitmapCharacter(font, ch);
114+
}
115+
109116
#else
110117
#include <gl/glut.h>
111118
#endif

0 commit comments

Comments
 (0)