-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f8c5b9
commit 9425b9d
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
# COpenGL | ||
A quickie Swift module map for OpenGL on Linux | ||
|
||
This is a simple module map for OpenGL, most likely to be used for Linux. I've used this in a couple of projects in Ubuntu 14.04 after installing the Mesa headers. | ||
|
||
To use, have something like the following in your application's Package.swift: | ||
|
||
``` | ||
import PackageDescription | ||
let package = Package( | ||
dependencies: [ | ||
.Package(url: "https://github.com/BradLarson/COpenGL.git", majorVersion: 1) | ||
] | ||
) | ||
``` | ||
|
||
or clone this locally and use | ||
|
||
``` | ||
swiftc -I ./COpenGL myfile.swift | ||
``` | ||
|
||
or the like to pull it in. | ||
|
||
Then you just need an | ||
|
||
``` | ||
import COpenGL | ||
``` | ||
|
||
in your Swift code to import the OpenGL functions and types. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module COpenGL [system] { | ||
header "/usr/include/GL/gl.h" | ||
link "GL" | ||
export * | ||
} |