-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for extensions and a version-less context
- Loading branch information
Showing
11 changed files
with
241 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
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,23 @@ | ||
[package] | ||
name = "webgl_stdweb" | ||
version = "0.1.0" | ||
authors = [ | ||
"Diggory Blake", | ||
] | ||
description = "WebGL bindings (stdweb)" | ||
license = "Apache-2.0" | ||
build = "build.rs" | ||
documentation = "https://docs.rs/webgl_stdweb" | ||
homepage = "https://github.com/brendanzab/gl-rs/webgl/" | ||
repository = "https://github.com/brendanzab/gl-rs/" | ||
readme = "README.md" | ||
categories = ["api-bindings", "rendering::graphics-api"] | ||
keywords = ["webgl", "stdweb"] | ||
|
||
[build-dependencies] | ||
webgl_generator = { version = "0.1.0", path = "../webgl_generator" } | ||
|
||
[dependencies] | ||
stdweb = { path = "../../stdweb" } | ||
serde = "1.0.0" | ||
serde_derive = "1.0.0" |
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,3 @@ | ||
# webgl-stdweb | ||
|
||
WebGL bindings using stdweb |
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,29 @@ | ||
// Copyright 2015 Brendan Zabarauskas and the gl-rs developers | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
extern crate webgl_generator; | ||
|
||
use webgl_generator::*; | ||
use std::env; | ||
use std::fs::File; | ||
use std::path::*; | ||
|
||
fn main() { | ||
let dest = env::var("OUT_DIR").unwrap(); | ||
let mut file = File::create(&Path::new(&dest).join("bindings.rs")).unwrap(); | ||
|
||
Registry::new(Api::WebGl2, Exts::ALL) | ||
.write_bindings(StdwebGenerator, &mut file) | ||
.unwrap(); | ||
} |
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,24 @@ | ||
// Copyright 2015 Brendan Zabarauskas and the gl-rs developers | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#![allow(unused_parens, non_camel_case_types)] | ||
#![crate_name = "webgl_stdweb"] | ||
#![crate_type = "lib"] | ||
|
||
#[macro_use] | ||
extern crate stdweb as _stdweb; | ||
#[macro_use] | ||
extern crate serde_derive as _serde_derive; | ||
|
||
include!(concat!(env!("OUT_DIR"), "/bindings.rs")); |
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
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
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
Oops, something went wrong.