Skip to content

jmcdonald-ut/hello_open_gl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hello_open_gl

Simple C program to demonstrate OpenGL on OS X. It looks kinda like this: Imgur

Project Structure

.
├── Makefile          # Handles compiling the project.
├── README.md
├── bin
│   └── hello_open_gl # Compiled program, OpenGL example :)
└── source
    ├── main.c        # Core application file that draws the triangle.
    ├── xsys.c        # Wrapper methods around system calls.
    └── xsys.h

Installation (OS X)

This installation guide assumes you have homebrew.

Dependencies (OS X)

Step 1

X11 is the windowing system that used to ship with Mac OS X by default, but this is no longer the case. Simply download X11 and run the installer.

Step 2

glfw3 is an open source, cross platform, library for creating and managing windows with an OpenGL context. This means that it relies heavily on the windowing system provided by X11.

$ brew tap homebrew/versions
$ brew install glfw3
Step 3

Next let's install glew. This provides a small layer between our code and OpenGL.

$ brew install glew
Step 4

Finally once the dependencies are installed you can run make in the root of the project folder.

$ make
$ ./bin/hello_open_gl

About

Let's say hello to OpenGL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published