/MAC_OpenGL_redbook

OpenGL redbook Samples

Primary LanguageC

OpenGL redbook

OpenGL redbook Samples

OpenGL Programming Guide (redbook)

change the following sample codes to work on macOS
Code samples for the OpenGL v1.1 Programming Guide (Redbook)

System Environment

confirmed the operation of the program in the following System Environment

macOS Version : 10.15.3 (Catalna)
Xcode Version : 11.4
gcc Version : Apple clang version 11.0.3
OpenGL Renderer : Intel(R) HD Graphics 6000
OpenGL Version : 2.1 INTEL-14.4.23
GLUT Version : 5

build asample code

requires

% gcc sample.c -framework OpenGL -framework GLUT

display following warnings when build
but don't mind
warning: 'glClear' is deprecated: first deprecated in macOS 10.14

Note:

Note

removed the following two codes
because latest macOS does not support index color

  • aaindex.c
  • fogindex.c

Reference