Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
BradLarson committed Jan 7, 2016
1 parent 8f8c5b9 commit 9425b9d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
Empty file added Package.swift
Empty file.
31 changes: 30 additions & 1 deletion README.md
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.
5 changes: 5 additions & 0 deletions module.modulemap
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 *
}

0 comments on commit 9425b9d

Please sign in to comment.